소스 검색

提交代码

JX.Li 1 년 전
부모
커밋
abf1a7d560
23개의 변경된 파일134개의 추가작업 그리고 110개의 파일을 삭제
  1. 1 1
      .gitignore
  2. 0 10
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MCourtyardNetworkManagementController.java
  3. 10 13
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MEmergencyRepairController.java
  4. 3 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MNoticeController.java
  5. 0 10
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MRegulatorBoxController.java
  6. 10 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MSysController.java
  7. 12 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MUserController.java
  8. 0 7
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MWarningPileController.java
  9. 1 1
      ruoyi-admin/src/main/resources/application.yml
  10. 8 11
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/GEmergencyRepair.java
  11. 1 1
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/GRegulatorBox.java
  12. 9 6
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GEmergencyRepairBo.java
  13. 3 3
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GRegulatorBoxBo.java
  14. 11 11
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GEmergencyRepairVo.java
  15. 4 4
      ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GRegulatorBoxVo.java
  16. 1 1
      ruoyi-gas/src/main/java/com/ruoyi/gas/service/impl/GNoticeServiceImpl.java
  17. 1 1
      ruoyi-gas/src/main/java/com/ruoyi/gas/service/impl/GRegulatorBoxServiceImpl.java
  18. 14 14
      ruoyi-gas/src/main/resources/mapper/GEmergencyRepairMapper.xml
  19. 3 12
      ruoyi-gas/src/main/resources/mapper/GRegulatorBoxMapper.xml
  20. 4 0
      ruoyi-mobile/src/main/java/com/ruoyi/mobile/mapper/MUserMapper.java
  21. 3 0
      ruoyi-mobile/src/main/java/com/ruoyi/mobile/service/IMUserService.java
  22. 6 0
      ruoyi-mobile/src/main/java/com/ruoyi/mobile/service/impl/MUserServiceImpl.java
  23. 29 0
      ruoyi-mobile/src/main/resources/mapper/mobile/MUserMapper.xml

+ 1 - 1
.gitignore

@@ -24,7 +24,7 @@ target/
 *.iml
 *.ipr
 
-/logs/**
+/logs/
 ### JRebel ###
 rebel.xml
 

+ 0 - 10
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MCourtyardNetworkManagementController.java

@@ -46,7 +46,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 查询庭院网管列表
      */
     @ApiOperation("查询庭院网管列表")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:list')")
     @GetMapping("/list")
     public TableDataInfo<GCourtyardNetworkManagementVo> list(@Validated(QueryGroup.class) GCourtyardNetworkManagementBo bo) {
         return iGCourtyardNetworkManagementService.queryPageList(bo);
@@ -56,8 +55,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 导出庭院网管列表
      */
     @ApiOperation("导出庭院网管列表")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:export')")
-    @Log(title = "庭院网管", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public void export(@Validated GCourtyardNetworkManagementBo bo, HttpServletResponse response) {
         List<GCourtyardNetworkManagementVo> list = iGCourtyardNetworkManagementService.queryList(bo);
@@ -68,7 +65,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 获取庭院网管详细信息
      */
     @ApiOperation("获取庭院网管详细信息")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:query')")
     @GetMapping("/{id}")
     public AjaxResult<GCourtyardNetworkManagementVo> getInfo(@NotNull(message = "主键不能为空")
                                                   @PathVariable("id") Long id) {
@@ -79,8 +75,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 新增庭院网管
      */
     @ApiOperation("新增庭院网管")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:add')")
-    @Log(title = "庭院网管", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
     public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GCourtyardNetworkManagementBo bo) {
@@ -91,8 +85,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 修改庭院网管
      */
     @ApiOperation("修改庭院网管")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:edit')")
-    @Log(title = "庭院网管", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
     public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GCourtyardNetworkManagementBo bo) {
@@ -103,8 +95,6 @@ public class MCourtyardNetworkManagementController extends BaseController {
      * 删除庭院网管
      */
     @ApiOperation("删除庭院网管")
-    @PreAuthorize("@ss.hasPermi('gas:courtyardNetworkManagement:remove')")
-    @Log(title = "庭院网管" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
                                        @PathVariable Long[] ids) {

+ 10 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MEmergencyRepairController.java

@@ -1,6 +1,5 @@
 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;
@@ -8,7 +7,6 @@ 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;
-import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.gas.domain.bo.GEmergencyRepairBo;
 import com.ruoyi.gas.domain.vo.GEmergencyRepairVo;
@@ -17,7 +15,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -46,7 +43,7 @@ public class MEmergencyRepairController extends BaseController {
      * 查询抢险维修列表
      */
     @ApiOperation("查询抢险维修列表")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:list')")
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:list')")
     @GetMapping("/list")
     public TableDataInfo<GEmergencyRepairVo> list(@Validated(QueryGroup.class) GEmergencyRepairBo bo) {
         return iGEmergencyRepairService.queryPageList(bo);
@@ -56,8 +53,8 @@ public class MEmergencyRepairController extends BaseController {
      * 导出抢险维修列表
      */
     @ApiOperation("导出抢险维修列表")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:export')")
-    @Log(title = "抢险维修", businessType = BusinessType.EXPORT)
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:export')")
+//    @Log(title = "抢险维修", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public void export(@Validated GEmergencyRepairBo bo, HttpServletResponse response) {
         List<GEmergencyRepairVo> list = iGEmergencyRepairService.queryList(bo);
@@ -68,7 +65,7 @@ public class MEmergencyRepairController extends BaseController {
      * 获取抢险维修详细信息
      */
     @ApiOperation("获取抢险维修详细信息")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:query')")
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:query')")
     @GetMapping("/{id}")
     public AjaxResult<GEmergencyRepairVo> getInfo(@NotNull(message = "主键不能为空")
                                                   @PathVariable("id") Long id) {
@@ -79,8 +76,8 @@ public class MEmergencyRepairController extends BaseController {
      * 新增抢险维修
      */
     @ApiOperation("新增抢险维修")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:add')")
-    @Log(title = "抢险维修", businessType = BusinessType.INSERT)
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:add')")
+//    @Log(title = "抢险维修", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
     public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GEmergencyRepairBo bo) {
@@ -91,8 +88,8 @@ public class MEmergencyRepairController extends BaseController {
      * 修改抢险维修
      */
     @ApiOperation("修改抢险维修")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:edit')")
-    @Log(title = "抢险维修", businessType = BusinessType.UPDATE)
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:edit')")
+//    @Log(title = "抢险维修", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
     public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GEmergencyRepairBo bo) {
@@ -103,8 +100,8 @@ public class MEmergencyRepairController extends BaseController {
      * 删除抢险维修
      */
     @ApiOperation("删除抢险维修")
-    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:remove')")
-    @Log(title = "抢险维修" , businessType = BusinessType.DELETE)
+//    @PreAuthorize("@ss.hasPermi('gas:emergencyRepair:remove')")
+//    @Log(title = "抢险维修" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
                                        @PathVariable Long[] ids) {

+ 3 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MNoticeController.java

@@ -10,7 +10,6 @@ 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.GNotice;
 import com.ruoyi.gas.domain.bo.GNoticeBo;
 import com.ruoyi.gas.domain.vo.GNoticeVo;
 import com.ruoyi.gas.service.IGNoticeService;
@@ -57,10 +56,10 @@ public class MNoticeController extends BaseController {
      * 查询公告管理列表
      */
     @ApiOperation("查询公告管理列表")
-    @PreAuthorize("@ss.hasPermi('gas:notice:list')")
+//    @PreAuthorize("@ss.hasPermi('gas:notice:list')")/
     @GetMapping("/getNotice")
-    public List<GNotice> getNotice() {
-        return iGNoticeService.getNotice();
+    public AjaxResult getNotice() {
+        return AjaxResult.success(iGNoticeService.getNotice());
     }
 
     /**

+ 0 - 10
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MRegulatorBoxController.java

@@ -46,7 +46,6 @@ public class MRegulatorBoxController extends BaseController {
      * 查询调压箱管理列表
      */
     @ApiOperation("查询调压箱管理列表")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:list')")
     @GetMapping("/list")
     public TableDataInfo<GRegulatorBoxVo> list(@Validated(QueryGroup.class) GRegulatorBoxBo bo) {
         return iGRegulatorBoxService.queryPageList(bo);
@@ -56,8 +55,6 @@ public class MRegulatorBoxController extends BaseController {
      * 导出调压箱管理列表
      */
     @ApiOperation("导出调压箱管理列表")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:export')")
-    @Log(title = "调压箱管理", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public void export(@Validated GRegulatorBoxBo bo, HttpServletResponse response) {
         List<GRegulatorBoxVo> list = iGRegulatorBoxService.queryList(bo);
@@ -68,7 +65,6 @@ public class MRegulatorBoxController extends BaseController {
      * 获取调压箱管理详细信息
      */
     @ApiOperation("获取调压箱管理详细信息")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:query')")
     @GetMapping("/{id}")
     public AjaxResult<GRegulatorBoxVo> getInfo(@NotNull(message = "主键不能为空")
                                                   @PathVariable("id") Long id) {
@@ -79,8 +75,6 @@ public class MRegulatorBoxController extends BaseController {
      * 新增调压箱管理
      */
     @ApiOperation("新增调压箱管理")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:add')")
-    @Log(title = "调压箱管理", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
     public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GRegulatorBoxBo bo) {
@@ -91,8 +85,6 @@ public class MRegulatorBoxController extends BaseController {
      * 修改调压箱管理
      */
     @ApiOperation("修改调压箱管理")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:edit')")
-    @Log(title = "调压箱管理", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
     public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GRegulatorBoxBo bo) {
@@ -103,8 +95,6 @@ public class MRegulatorBoxController extends BaseController {
      * 删除调压箱管理
      */
     @ApiOperation("删除调压箱管理")
-    @PreAuthorize("@ss.hasPermi('gas:regulatorBox:remove')")
-    @Log(title = "调压箱管理" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
                                        @PathVariable Long[] ids) {

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MSysController.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.mobile;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.mobile.domain.bo.MdictBo;
+import com.ruoyi.mobile.service.IMUserService;
 import com.ruoyi.system.service.ISysDictTypeService;
 import io.swagger.annotations.Api;
 import lombok.RequiredArgsConstructor;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class MSysController {
    @Autowired
    private ISysDictTypeService sysDictTypeService;
+   @Autowired
+   private IMUserService imUserService;
    @GetMapping("dict")
    public AjaxResult dict(String type)
    {
@@ -37,5 +40,12 @@ public class MSysController {
               });
       return  AjaxResult.success(map);
    }
+
+   @GetMapping("search")
+   public AjaxResult search(String value)
+   {
+      return  AjaxResult.success(imUserService.search(value));
+   }
+
 }
 

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MUserController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.mobile;
 
+import com.ruoyi.gas.service.IGUserService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -27,6 +28,7 @@ import io.swagger.annotations.ApiOperation;
 public class MUserController extends BaseController {
 
     private final IMUserService iMUserService;
+    private final IGUserService igUserService;
 
     /**
      * 获取用户详细信息
@@ -65,4 +67,14 @@ public class MUserController extends BaseController {
     public AjaxResult getName() {
         return AjaxResult.success(iMUserService.getName());
     }
+
+
+    /**
+     * 工人下拉
+     * @return
+     */
+    @GetMapping("/getWorker")
+    public AjaxResult getWorker() {
+        return AjaxResult.success(igUserService.getWorker());
+    }
 }

+ 0 - 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MWarningPileController.java

@@ -46,7 +46,6 @@ public class MWarningPileController extends BaseController {
      * 查询警示桩列表
      */
     @ApiOperation("查询警示桩列表")
-    @PreAuthorize("@ss.hasPermi('gas:warningPile:list')")
     @GetMapping("/list")
     public TableDataInfo<GWarningPileVo> list(@Validated(QueryGroup.class) GWarningPileBo bo) {
         return iGWarningPileService.queryPageList(bo);
@@ -56,7 +55,6 @@ public class MWarningPileController extends BaseController {
      * 查询警示桩列表
      */
     @ApiOperation("查询警示桩列表")
-    //@PreAuthorize("@ss.hasPermi('gas:warningPile:list')")
     @GetMapping("/getList")
     public AjaxResult getList(@Validated(QueryGroup.class) GWarningPileBo bo) {
         return AjaxResult.success(iGWarningPileService.getList(bo)) ;
@@ -66,8 +64,6 @@ public class MWarningPileController extends BaseController {
      * 导出警示桩列表
      */
     @ApiOperation("导出警示桩列表")
-    @PreAuthorize("@ss.hasPermi('gas:warningPile:export')")
-    @Log(title = "警示桩", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public void export(@Validated GWarningPileBo bo, HttpServletResponse response) {
         List<GWarningPileVo> list = iGWarningPileService.queryList(bo);
@@ -78,7 +74,6 @@ public class MWarningPileController extends BaseController {
      * 获取警示桩详细信息
      */
     @ApiOperation("获取警示桩详细信息")
-   // @PreAuthorize("@ss.hasPermi('gas:warningPile:query')")
     @GetMapping("/{id}")
     public AjaxResult<GWarningPileVo> getInfo(@NotNull(message = "主键不能为空")
                                                   @PathVariable("id") Long id) {
@@ -89,8 +84,6 @@ public class MWarningPileController extends BaseController {
      * 新增警示桩
      */
     @ApiOperation("新增警示桩")
-    @PreAuthorize("@ss.hasPermi('gas:warningPile:add')")
-    @Log(title = "警示桩", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
     public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GWarningPileBo bo) {

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -25,7 +25,7 @@ captcha:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
+  port: 8081
   servlet:
     # 应用的访问路径
     context-path: /

+ 8 - 11
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/GEmergencyRepair.java

@@ -1,16 +1,13 @@
 package com.ruoyi.gas.domain;
 
-import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BaseEntity;
 import lombok.Data;
-import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
-import java.io.Serializable;
-import java.util.Date;
-import java.math.BigDecimal;
 
 import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 抢险维修对象 g_emergency_repair
@@ -34,10 +31,10 @@ public class GEmergencyRepair extends BaseEntity {
      * 报修时间
      */
     private Date repairTime;
-    /**
-     * 单元id
-     */
-    private Long unitId;
+//    /**
+//     * 单元id
+//     */
+//    private Long unitId;
     /**
      * 报修人名称
      */

+ 1 - 1
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/GRegulatorBox.java

@@ -30,7 +30,7 @@ public class GRegulatorBox extends BaseEntity {
     /**
      * 单元id
      */
-    private Long unitId;
+    private Long areaId;
     /**
      * 管理所
      */

+ 9 - 6
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GEmergencyRepairBo.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;
@@ -39,14 +40,15 @@ public class GEmergencyRepairBo extends BaseEntity {
      */
     @ApiModelProperty(value = "报修时间", required = true)
     @NotNull(message = "报修时间不能为空", groups = { AddGroup.class, EditGroup.class })
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
     private Date repairTime;
 
-    /**
-     * 单元id
-     */
-    @ApiModelProperty(value = "单元id", required = true)
-    @NotNull(message = "单元id不能为空", groups = { AddGroup.class, EditGroup.class })
-    private Long unitId;
+//    /**
+//     * 单元id
+//     */
+//    @ApiModelProperty(value = "单元id", required = true)
+//    @NotNull(message = "单元id不能为空", groups = { AddGroup.class, EditGroup.class })
+//    private Long unitId;
 
     /**
      * 报修人名称
@@ -116,6 +118,7 @@ public class GEmergencyRepairBo extends BaseEntity {
      */
     @ApiModelProperty(value = "维修时间", required = true)
     @NotNull(message = "维修时间不能为空", groups = { AddGroup.class, EditGroup.class })
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
     private Date maintenanceTime;
 
     /**

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

@@ -36,9 +36,9 @@ public class GRegulatorBoxBo extends BaseEntity {
     /**
      * 单元id
      */
-    @ApiModelProperty(value = "单元id", required = true)
-    @NotNull(message = "单元id不能为空", groups = { AddGroup.class, EditGroup.class })
-    private Long unitId;
+    @ApiModelProperty(value = "小区id", required = true)
+    @NotNull(message = "小区id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long areaId;
 
     /**
      * 管理所

+ 11 - 11
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GEmergencyRepairVo.java

@@ -23,11 +23,11 @@ public class GEmergencyRepairVo {
 
 	private static final long serialVersionUID = 1L;
 
-	private Long areaId;
-	private String areaName;
-	private Long buildingId;
-	private String buildingName;
-	private String unitName;
+//	private Long areaId;
+//	private String areaName;
+//	private Long buildingId;
+//	private String buildingName;
+//	private String unitName;
 	private List<String> photoList;
 
     /**
@@ -43,12 +43,12 @@ public class GEmergencyRepairVo {
 	@ApiModelProperty("报修时间")
 	private Date repairTime;
 
-    /**
-     * 单元id
-     */
-	@ExcelProperty(value = "单元id")
-	@ApiModelProperty("单元id")
-	private Long unitId;
+//    /**
+//     * 单元id
+//     */
+//	@ExcelProperty(value = "单元id")
+//	@ApiModelProperty("单元id")
+//	private Long unitId;
 
     /**
      * 报修人名称

+ 4 - 4
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GRegulatorBoxVo.java

@@ -25,11 +25,11 @@ public class GRegulatorBoxVo {
 
 	private static final long serialVersionUID = 1L;
 
-	private Long areaId;
+//	private Long areaId;
 	private String areaName;
-	private Long buildingId;
-	private String buildingName;
-	private String unitName;
+//	private Long buildingId;
+//	private String buildingName;
+//	private String unitName;
 	private List<String> photoList;
     /**
      * 主键

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

@@ -47,7 +47,7 @@ public class GNoticeServiceImpl extends ServicePlusImpl<GNoticeMapper, GNotice,
     @Override
     public List<GNotice> getNotice() {
         QueryWrapper<GNotice> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().last(" ORDER BY time LIMIT 3");
+        queryWrapper.lambda().last(" ORDER BY time");
         return baseMapper.selectList(queryWrapper);
     }
 

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

@@ -59,7 +59,7 @@ public class GRegulatorBoxServiceImpl extends ServicePlusImpl<GRegulatorBoxMappe
     private LambdaQueryWrapper<GRegulatorBox> buildQueryWrapper(GRegulatorBoxBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<GRegulatorBox> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getUnitId() != null, GRegulatorBox::getUnitId, bo.getUnitId());
+        lqw.eq(bo.getAreaId() != null, GRegulatorBox::getAreaId, bo.getAreaId());
         lqw.eq(StringUtils.isNotBlank(bo.getAdministrativeOffice()), GRegulatorBox::getAdministrativeOffice, bo.getAdministrativeOffice());
         lqw.eq(StringUtils.isNotBlank(bo.getNumber()), GRegulatorBox::getNumber, bo.getNumber());
         lqw.eq(bo.getBusinessService() != null, GRegulatorBox::getBusinessService, bo.getBusinessService());

+ 14 - 14
ruoyi-gas/src/main/resources/mapper/GEmergencyRepairMapper.xml

@@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="com.ruoyi.gas.domain.GEmergencyRepair" id="GEmergencyRepairResult">
         <result property="id" column="id"/>
         <result property="repairTime" column="repair_time"/>
-        <result property="unitId" column="unit_id"/>
+<!--        <result property="unitId" column="unit_id"/>-->
         <result property="repairName" column="repair_name"/>
         <result property="repairPhone" column="repair_phone"/>
         <result property="repairType" column="repair_type"/>
@@ -34,14 +34,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="getList" resultType="com.ruoyi.gas.domain.vo.GEmergencyRepairVo">
-        select a.*,
-               b.name AS unitName,
-               c.name AS buildingName,
-               d.name AS areaName
+        select a.*
+--                ,b.name AS unitName,
+--                c.name AS buildingName,
+--                d.name AS areaName
         from g_emergency_repair a
-        left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
-        left join g_building c on b.building_id = c.id and c.del_flag = '0'
-        left join g_area d on d.id = c.area_id and d.del_flag = '0'
+--         left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
+--         left join g_building c on b.building_id = c.id and c.del_flag = '0'
+--         left join g_area d on d.id = c.area_id and d.del_flag = '0'
         <where>
             a.del_flag = '0'
             <if test="p.repairName != null  and p.repairName != ''">
@@ -59,13 +59,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="getById" resultType="com.ruoyi.gas.domain.vo.GEmergencyRepairVo">
-        select a.*,
-               c.id AS buildingId,
-               d.id AS areaId
+        select a.*
+--                ,c.id AS buildingId,
+--                d.id AS areaId
         from g_emergency_repair a
-                 left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
-                 left join g_building c on b.building_id = c.id and c.del_flag = '0'
-                 left join g_area d on d.id = c.area_id and d.del_flag = '0'
+--                  left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
+--                  left join g_building c on b.building_id = c.id and c.del_flag = '0'
+--                  left join g_area d on d.id = c.area_id and d.del_flag = '0'
         where a.id = #{id}
           and a.del_flag = '0'
     </select>

+ 3 - 12
ruoyi-gas/src/main/resources/mapper/GRegulatorBoxMapper.xml

@@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="com.ruoyi.gas.domain.GRegulatorBox" id="GRegulatorBoxResult">
         <result property="id" column="id"/>
-        <result property="unitId" column="unit_id"/>
+        <result property="areaId" column="area_id"/>
         <result property="administrativeOffice" column="administrative_office"/>
         <result property="number" column="number"/>
         <result property="businessService" column="business_service"/>
@@ -53,25 +53,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           and del_flag = '0'
     </select>
     <select id="getById" resultType="com.ruoyi.gas.domain.vo.GRegulatorBoxVo">
-        select a.*,
-               c.id AS buildingId,
-               d.id AS areaId
+        select a.*
         from g_regulator_box a
-                 left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
-                 left join g_building c on b.building_id = c.id and c.del_flag = '0'
-                 left join g_area d on d.id = c.area_id and d.del_flag = '0'
         where a.id = #{id}
           and a.del_flag = '0'
     </select>
     <select id="getList" resultType="com.ruoyi.gas.domain.vo.GRegulatorBoxVo">
         select a.*,
-        b.name AS unitName,
-        c.name AS buildingName,
         d.name AS areaName
         from g_regulator_box a
-        left join g_unit b on a.unit_id = b.id and b.del_flag = '0'
-        left join g_building c on b.building_id = c.id and c.del_flag = '0'
-        left join g_area d on d.id = c.area_id and d.del_flag = '0'
+        left join g_area d on d.id = a.area_id and d.del_flag = '0'
         <where>
             a.del_flag = '0'
             <if test="p.administrativeOffice != null  and p.administrativeOffice != ''">

+ 4 - 0
ruoyi-mobile/src/main/java/com/ruoyi/mobile/mapper/MUserMapper.java

@@ -3,6 +3,9 @@ package com.ruoyi.mobile.mapper;
 import com.ruoyi.common.core.domain.entity.MUser;
 import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 用户Mapper接口
  *
@@ -10,5 +13,6 @@ import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
  * @date 2021-11-18
  */
 public interface MUserMapper extends BaseMapperPlus<MUser> {
+    List<Map> search(String value);
 
 }

+ 3 - 0
ruoyi-mobile/src/main/java/com/ruoyi/mobile/service/IMUserService.java

@@ -5,6 +5,7 @@ import com.ruoyi.mobile.domain.vo.MUserVo;
 import com.ruoyi.mobile.domain.bo.MUserBo;
 import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -14,6 +15,8 @@ import java.util.Map;
  * @date 2021-11-18
  */
 public interface IMUserService extends IServicePlus<MUser, MUserVo> {
+
+	List<Map> search(String value);
 	/**
 	 * 查询单个
 	 * @return

+ 6 - 0
ruoyi-mobile/src/main/java/com/ruoyi/mobile/service/impl/MUserServiceImpl.java

@@ -20,6 +20,7 @@ import com.ruoyi.mobile.mapper.MUserMapper;
 import com.ruoyi.mobile.service.IMUserService;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -35,6 +36,11 @@ public class MUserServiceImpl extends ServicePlusImpl<MUserMapper, MUser, MUserV
     private MobileTokenService mobileTokenService;
 
     @Override
+    public List<Map> search(String value) {
+        return baseMapper.search(value);
+    }
+
+    @Override
     public MUser getInfo(){
         return baseMapper.selectById(1);
     }

+ 29 - 0
ruoyi-mobile/src/main/resources/mapper/mobile/MUserMapper.xml

@@ -17,5 +17,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="password" column="password"/>
     </resultMap>
 
+    <select id="search" resultType="java.util.Map">
+        SELECT a.id                    AS id,
+               a.administrative_office AS name,
+               "1"                     AS type
+        FROM `g_regulator_box` a
+        WHERE a.number LIKE concat('%',#{value},'%')
+           OR a.administrative_office LIKE concat('%',#{value},'%')
+        UNION ALL
+        SELECT b.id   AS id,
+               b.remarks AS NAME,
+               "2"    AS type
+        FROM `g_courtyard_network_management` b
+        WHERE b.remarks LIKE concat('%',#{value},'%')
+        UNION ALL
+        SELECT c.id             AS id,
+               c.repair_content AS name,
+               "3"              AS type
+        FROM `g_emergency_repair` c
+        WHERE c.repair_content LIKE concat('%',#{value},'%')
+           OR c.remarks LIKE concat('%',#{value},'%')
+        UNION ALL
+        SELECT d.id   AS id,
+               d.NAME AS name,
+               "4"    AS type
+        FROM `g_warning_pile` d
+        WHERE d.NAME LIKE concat('%',#{value},'%')
+           OR d.remarks LIKE concat('%',#{value},'%')
+           OR d.warning_pile_info LIKE concat('%',#{value},'%')
+    </select>
 
 </mapper>