Przeglądaj źródła

物业管理端

tjf 4 miesięcy temu
rodzic
commit
ae797dbc8b
19 zmienionych plików z 884 dodań i 91 usunięć
  1. 23 14
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/assets/CommunityAssetsController.java
  2. 15 11
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  3. 97 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/suggestionFj/SuggestionFjController.java
  4. 22 0
      ruoyi-common/pom.xml
  5. 98 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ImageSizeUtil.java
  6. 27 14
      ruoyi-system/src/main/java/com/ruoyi/system/domain/assets/CommunityAssets.java
  7. 15 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/complaintSuggestion/ComplaintSuggestion.java
  8. 6 7
      ruoyi-system/src/main/java/com/ruoyi/system/domain/propertyRepair/PropertyRepair.java
  9. 126 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/suggestionFj/SuggestionFj.java
  10. 14 8
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommunityAssetsMapper.java
  11. 69 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SuggestionFjMapper.java
  12. 13 8
      ruoyi-system/src/main/java/com/ruoyi/system/service/ICommunityAssetsService.java
  13. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISuggestionFjService.java
  14. 28 10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommunityAssetsServiceImpl.java
  15. 18 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComplaintSuggestionServiceImpl.java
  16. 9 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalParkingServiceImpl.java
  17. 97 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SuggestionFjServiceImpl.java
  18. 25 16
      ruoyi-system/src/main/resources/mapper/system/CommunityAssetsMapper.xml
  19. 121 0
      ruoyi-system/src/main/resources/mapper/system/SuggestionFjMapper.xml

+ 23 - 14
ruoyi-admin/src/main/java/com/ruoyi/web/controller/assets/CommunityAssetsController.java

@@ -11,7 +11,6 @@ import com.ruoyi.system.service.ICommunityAssetsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
@@ -19,7 +18,7 @@ import java.util.List;
  * 社区资产Controller
  *
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-24
  */
 @RestController
 @RequestMapping("/wuYe/assets")
@@ -30,7 +29,7 @@ public class CommunityAssetsController extends BaseController {
     /**
      * 查询社区资产列表
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:list')")
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:list')")
     @GetMapping("/list")
     public TableDataInfo list(CommunityAssets communityAssets) {
         startPage();
@@ -41,7 +40,7 @@ public class CommunityAssetsController extends BaseController {
     /**
      * 导出社区资产列表
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:export')")
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:export')")
     @Log(title = "社区资产", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, CommunityAssets communityAssets) {
@@ -53,39 +52,49 @@ public class CommunityAssetsController extends BaseController {
     /**
      * 获取社区资产详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:query')")
-    @GetMapping(value = "/{assetId}")
-    public AjaxResult getInfo(@PathVariable("assetId") Long assetId) {
-        return success(communityAssetsService.selectCommunityAssetsByAssetId(assetId));
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:query')")
+    @GetMapping(value = "/{communityAssetId}")
+    public AjaxResult getInfo(@PathVariable("communityAssetId") Long communityAssetId) {
+        return success(communityAssetsService.selectCommunityAssetsByCommunityAssetId(communityAssetId));
     }
 
     /**
      * 新增社区资产
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:add')")
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:add')")
     @Log(title = "社区资产", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody CommunityAssets communityAssets) {
+        if (!communityAssetsService.checkEquipmentNumberUnique(communityAssets)){
+            {
+                return error("新增资产'" + communityAssets.getAssetName() + "'失败,资产编号已存在");
+            }
+        }
         return toAjax(communityAssetsService.insertCommunityAssets(communityAssets));
     }
 
     /**
      * 修改社区资产
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:edit')")
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:edit')")
     @Log(title = "社区资产", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
     public AjaxResult edit(@RequestBody CommunityAssets communityAssets) {
+        if (!communityAssetsService.checkEquipmentNumberUnique(communityAssets)){
+            {
+                return error("新增资产'" + communityAssets.getAssetName() + "'失败,资产编号已存在");
+            }
+        }
         return toAjax(communityAssetsService.updateCommunityAssets(communityAssets));
     }
 
     /**
      * 删除社区资产
      */
-    @PreAuthorize("@ss.hasPermi('system:assets:remove')")
+    @PreAuthorize("@ss.hasPermi('wuYe:assets:remove')")
     @Log(title = "社区资产", businessType = BusinessType.DELETE)
-    @GetMapping("/delete/{assetIds}")
-    public AjaxResult remove(@PathVariable Long[] assetIds) {
-        return toAjax(communityAssetsService.deleteCommunityAssetsByAssetIds(assetIds));
+    @GetMapping("/delete/{communityAssetIds}")
+    public AjaxResult remove(@PathVariable Long[] communityAssetIds) {
+        return toAjax(communityAssetsService.deleteCommunityAssetsByCommunityAssetIds(communityAssetIds));
     }
 }

+ 15 - 11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -1,9 +1,13 @@
 package com.ruoyi.web.controller.common;
 
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.ImageSizeUtil;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+import com.ruoyi.framework.config.ServerConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,13 +17,11 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.file.FileUploadUtils;
-import com.ruoyi.common.utils.file.FileUtils;
-import com.ruoyi.framework.config.ServerConfig;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 通用请求处理
@@ -77,6 +79,8 @@ public class CommonController
     {
         try
         {
+            //压缩图片
+            file = ImageSizeUtil.compressImg(file);
             // 上传文件路径
             String filePath = RuoYiConfig.getUploadPath();
             // 上传并返回新文件名称

+ 97 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/suggestionFj/SuggestionFjController.java

@@ -0,0 +1,97 @@
+package com.ruoyi.web.controller.suggestionFj;
+
+import com.ruoyi.common.annotation.Log;
+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.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
+import com.ruoyi.system.service.ISuggestionFjService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 投诉建议_附件Controller
+ *
+ * @author boman
+ * @date 2025-02-24
+ */
+@RestController
+@RequestMapping("/wuYe/suggestionFj")
+public class SuggestionFjController extends BaseController
+{
+    @Autowired
+    private ISuggestionFjService suggestionFjService;
+
+/**
+ * 查询投诉建议_附件列表
+ */
+@PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:list')")
+@GetMapping("/list")
+    public TableDataInfo list(SuggestionFj suggestionFj)
+    {
+        startPage();
+        List<SuggestionFj> list = suggestionFjService.selectSuggestionFjList(suggestionFj);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出投诉建议_附件列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:export')")
+    @Log(title = "投诉建议_附件", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SuggestionFj suggestionFj)
+    {
+        List<SuggestionFj> list = suggestionFjService.selectSuggestionFjList(suggestionFj);
+        ExcelUtil<SuggestionFj> util = new ExcelUtil<SuggestionFj>(SuggestionFj.class);
+        util.exportExcel(response, list, "投诉建议_附件数据");
+    }
+
+    /**
+     * 获取投诉建议_附件详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:query')")
+    @GetMapping(value = "/{suggestionFjId}")
+    public AjaxResult getInfo(@PathVariable("suggestionFjId") Long suggestionFjId)
+    {
+        return success(suggestionFjService.selectSuggestionFjBySuggestionFjId(suggestionFjId));
+    }
+
+    /**
+     * 新增投诉建议_附件
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:add')")
+    @Log(title = "投诉建议_附件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SuggestionFj suggestionFj)
+    {
+        return toAjax(suggestionFjService.insertSuggestionFj(suggestionFj));
+    }
+
+    /**
+     * 修改投诉建议_附件
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:edit')")
+    @Log(title = "投诉建议_附件", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody SuggestionFj suggestionFj)
+    {
+        return toAjax(suggestionFjService.updateSuggestionFj(suggestionFj));
+    }
+
+    /**
+     * 删除投诉建议_附件
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:suggestionFj:remove')")
+    @Log(title = "投诉建议_附件", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{suggestionFjIds}")
+    public AjaxResult remove(@PathVariable Long[] suggestionFjIds)
+    {
+        return toAjax(suggestionFjService.deleteSuggestionFjBySuggestionFjIds(suggestionFjIds));
+    }
+}

+ 22 - 0
ruoyi-common/pom.xml

@@ -16,6 +16,28 @@
     </description>
 
     <dependencies>
+        <!--thumbnailator 压缩工具-->
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+        <!--二维码-->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.5.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.5.1</version>
+        </dependency>
         <!--通用工具hutool-->
         <dependency>
             <groupId>cn.hutool</groupId>

+ 98 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/ImageSizeUtil.java

@@ -0,0 +1,98 @@
+package com.ruoyi.common.utils;
+
+import net.coobird.thumbnailator.Thumbnails;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import java.io.*;
+
+/**
+ * 获取图片尺寸和截图 工具类
+ *
+ * @author zhangxiaoyan
+ */
+public class ImageSizeUtil {
+    /**
+     * 压缩图片 并返回MultipartFile
+     * @param multiFile
+     * @return
+     * @throws Exception
+     */
+    public static MultipartFile compressImg(MultipartFile multiFile) {
+        long size = multiFile.getSize();
+        if (size> 0){
+            double fileSizeMb = size / (1024.0 * 1024.0);
+            if (fileSizeMb < 5){
+                return multiFile;
+            }
+        }
+        // 压缩图片
+        InputStream inputStream = null;
+        ByteArrayOutputStream bos = null;
+        MultipartFile multipartFile = null;
+        InputStream fileInput= null;
+        try {
+            inputStream = multiFile.getInputStream();
+            bos = new ByteArrayOutputStream();
+            // 压缩图片核心代码 scale设置压缩比例 越小压缩图片越小
+            Thumbnails.of(inputStream).scale(0.5f).outputQuality(1f).toOutputStream(bos);
+            fileInput = new ByteArrayInputStream(bos.toByteArray());
+            // 转换 MultipartFile
+            String fieldName = multiFile.getName();
+            String fileName = multiFile.getOriginalFilename();
+            String contentType = multiFile.getContentType();
+            multipartFile = getMulFileByFile(fileInput, fieldName, contentType, fileName);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (inputStream != null){
+                    inputStream.close();
+                }
+                if (bos != null){
+                    bos.close();
+                }
+                if (fileInput != null){
+                    fileInput.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+
+            }
+        }
+        return multipartFile;
+    }
+
+    public static MultipartFile getMulFileByFile(InputStream fis,String fieldName,String contentType,String fileName) {
+        FileItem fileItem = createFileItem(fis,fieldName,contentType,fileName);
+        MultipartFile mfile = new CommonsMultipartFile(fileItem);
+        return mfile;
+    }
+
+    public static FileItem createFileItem(InputStream fis,String fieldName,String contentType,String fileName){
+        FileItemFactory factory = new DiskFileItemFactory(16, null);
+        FileItem item = factory.createItem(fieldName, contentType, false,fileName);
+        int bytesRead = 0;
+        byte[] buffer = new byte[8192];
+        try
+        {
+            OutputStream os = item.getOutputStream();
+            while ((bytesRead = fis.read(buffer, 0, 8192))!= -1)
+            {
+                os.write(buffer, 0, bytesRead);
+            }
+            os.close();
+            fis.close();
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+        return item;
+    }
+}
+
+

+ 27 - 14
ruoyi-system/src/main/java/com/ruoyi/system/domain/assets/CommunityAssets.java

@@ -13,18 +13,22 @@ import java.util.Date;
  * 社区资产对象 community_assets
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-24
  */
 public class CommunityAssets extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
     /** 资产ID */
+    private Long communityAssetId;
+
+    /** 资产类型id */
+    @Excel(name = "资产类型id")
     private Long assetId;
 
     /** 资产类型,如设备、车辆等 */
     @Excel(name = "资产类型,如设备、车辆等")
-    private String ssetType;
+    private String assetName;
 
     /** 设备名称 */
     @Excel(name = "设备名称")
@@ -108,8 +112,17 @@ public class CommunityAssets extends BaseEntity
 
     /** 折旧率(百分比) */
     @Excel(name = "折旧率", readConverterExp = "百=分比")
-    private BigDecimal depreciationRate;
+    private String depreciationRate;
+
+    public void setCommunityAssetId(Long communityAssetId) 
+    {
+        this.communityAssetId = communityAssetId;
+    }
 
+    public Long getCommunityAssetId() 
+    {
+        return communityAssetId;
+    }
     public void setAssetId(Long assetId) 
     {
         this.assetId = assetId;
@@ -119,14 +132,14 @@ public class CommunityAssets extends BaseEntity
     {
         return assetId;
     }
-    public void setSsetType(String ssetType) 
+    public void setAssetName(String assetName) 
     {
-        this.ssetType = ssetType;
+        this.assetName = assetName;
     }
 
-    public String getSsetType() 
+    public String getAssetName() 
     {
-        return ssetType;
+        return assetName;
     }
     public void setEquipmentName(String equipmentName) 
     {
@@ -299,21 +312,21 @@ public class CommunityAssets extends BaseEntity
     {
         return warrantyPeriod;
     }
-    public void setDepreciationRate(BigDecimal depreciationRate) 
-    {
-        this.depreciationRate = depreciationRate;
-    }
 
-    public BigDecimal getDepreciationRate() 
-    {
+    public String getDepreciationRate() {
         return depreciationRate;
     }
 
+    public void setDepreciationRate(String depreciationRate) {
+        this.depreciationRate = depreciationRate;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("communityAssetId", getCommunityAssetId())
             .append("assetId", getAssetId())
-            .append("ssetType", getSsetType())
+            .append("assetName", getAssetName())
             .append("equipmentName", getEquipmentName())
             .append("equipmentCoverPhoto", getEquipmentCoverPhoto())
             .append("equipmentNumber", getEquipmentNumber())

+ 15 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/complaintSuggestion/ComplaintSuggestion.java

@@ -3,10 +3,12 @@ package com.ruoyi.system.domain.complaintSuggestion;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * 投诉建议对象 complaint_suggestion
@@ -56,8 +58,20 @@ public class ComplaintSuggestion extends BaseEntity
 
     /** 是否删除:Y(删除)、N(不删除) */
     private String isDel;
+    /**
+     * 回复附件表
+     */
+    private List<SuggestionFj> suggestionFjList;
 
-    public void setSuggestionId(Long suggestionId) 
+    public List<SuggestionFj> getSuggestionFjList() {
+        return suggestionFjList;
+    }
+
+    public void setSuggestionFjList(List<SuggestionFj> suggestionFjList) {
+        this.suggestionFjList = suggestionFjList;
+    }
+
+    public void setSuggestionId(Long suggestionId)
     {
         this.suggestionId = suggestionId;
     }

+ 6 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/propertyRepair/PropertyRepair.java

@@ -30,8 +30,8 @@ public class PropertyRepair extends BaseEntity
     private String houseAddress;
 
     /** 报修时间,记录报修提交的时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "报修时间,记录报修提交的时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "报修时间,记录报修提交的时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date repairTime;
 
     /** 报修用户手机号码 */
@@ -65,14 +65,13 @@ public class PropertyRepair extends BaseEntity
     /** 维修人员ID */
     @Excel(name = "维修人员ID")
     private Long staffId;
-
     /** 维修人员手机号 */
     @Excel(name = "维修人员手机号")
     private String staffPhone;
 
     /** 上门时间,记录维修人员上门的时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "上门时间,记录维修人员上门的时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "上门时间,记录维修人员上门的时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date visitTime;
 
     /** 上门拍照,存储图片路径或URL */
@@ -80,8 +79,8 @@ public class PropertyRepair extends BaseEntity
     private String visitPhoto;
 
     /** 维修结束时间,记录维修完成的时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "维修结束时间,记录维修完成的时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "维修结束时间,记录维修完成的时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date completionTime;
 
     /** 维修结束拍照,存储图片路径或URL */

+ 126 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/suggestionFj/SuggestionFj.java

@@ -0,0 +1,126 @@
+package com.ruoyi.system.domain.suggestionFj;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 投诉建议_附件对象 suggestion_fj
+ * 
+ * @author boman
+ * @date 2025-02-24
+ */
+public class SuggestionFj extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 附件ID */
+    private Long suggestionFjId;
+
+    /** 投诉建议id */
+    @Excel(name = "投诉建议id")
+    private Long suggestionId;
+
+    /** 原文件名称 */
+    @Excel(name = "原文件名称")
+    private String oldName;
+
+    /** 附件名称 */
+    @Excel(name = "附件名称")
+    private String name;
+
+    /** 附件地址 */
+    @Excel(name = "附件地址")
+    private String url;
+
+    /** 文件分类:1:基础附件 */
+    @Excel(name = "文件分类:1:基础附件")
+    private String bigType;
+
+    /** 文件类型 1:投诉建议 */
+    @Excel(name = "文件类型 1:投诉建议")
+    private String type;
+
+    public void setSuggestionFjId(Long suggestionFjId) 
+    {
+        this.suggestionFjId = suggestionFjId;
+    }
+
+    public Long getSuggestionFjId() 
+    {
+        return suggestionFjId;
+    }
+    public void setSuggestionId(Long suggestionId) 
+    {
+        this.suggestionId = suggestionId;
+    }
+
+    public Long getSuggestionId() 
+    {
+        return suggestionId;
+    }
+    public void setOldName(String oldName) 
+    {
+        this.oldName = oldName;
+    }
+
+    public String getOldName() 
+    {
+        return oldName;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setUrl(String url) 
+    {
+        this.url = url;
+    }
+
+    public String getUrl() 
+    {
+        return url;
+    }
+    public void setBigType(String bigType) 
+    {
+        this.bigType = bigType;
+    }
+
+    public String getBigType() 
+    {
+        return bigType;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("suggestionFjId", getSuggestionFjId())
+            .append("suggestionId", getSuggestionId())
+            .append("oldName", getOldName())
+            .append("name", getName())
+            .append("url", getUrl())
+            .append("bigType", getBigType())
+            .append("type", getType())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 14 - 8
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommunityAssetsMapper.java

@@ -1,6 +1,5 @@
 package com.ruoyi.system.mapper;
 
-
 import com.ruoyi.system.domain.assets.CommunityAssets;
 
 import java.util.List;
@@ -9,17 +8,17 @@ import java.util.List;
  * 社区资产Mapper接口
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-24
  */
 public interface CommunityAssetsMapper 
 {
     /**
      * 查询社区资产
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 社区资产
      */
-    public CommunityAssets selectCommunityAssetsByAssetId(Long assetId);
+    public CommunityAssets selectCommunityAssetsByCommunityAssetId(Long communityAssetId);
 
     /**
      * 查询社区资产列表
@@ -48,16 +47,23 @@ public interface CommunityAssetsMapper
     /**
      * 删除社区资产
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 结果
      */
-    public int deleteCommunityAssetsByAssetId(Long assetId);
+    public int deleteCommunityAssetsByCommunityAssetId(Long communityAssetId);
 
     /**
      * 批量删除社区资产
      * 
-     * @param assetIds 需要删除的数据主键集合
+     * @param communityAssetIds 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteCommunityAssetsByAssetIds(Long[] assetIds);
+    public int deleteCommunityAssetsByCommunityAssetIds(Long[] communityAssetIds);
+
+    /**
+     * 校验资产编号的唯一性
+     * @param equipmentNumber
+     * @return
+     */
+    public CommunityAssets checkEquipmentNumberUnique(String equipmentNumber);
 }

+ 69 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SuggestionFjMapper.java

@@ -0,0 +1,69 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
+
+import java.util.List;
+
+/**
+ * 投诉建议_附件Mapper接口
+ * 
+ * @author boman
+ * @date 2025-02-24
+ */
+public interface SuggestionFjMapper 
+{
+    /**
+     * 查询投诉建议_附件
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 投诉建议_附件
+     */
+    public SuggestionFj selectSuggestionFjBySuggestionFjId(Long suggestionFjId);
+
+    /**
+     * 查询投诉建议_附件列表
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 投诉建议_附件集合
+     */
+    public List<SuggestionFj> selectSuggestionFjList(SuggestionFj suggestionFj);
+
+    /**
+     * 新增投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    public int insertSuggestionFj(SuggestionFj suggestionFj);
+
+    /**
+     * 修改投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    public int updateSuggestionFj(SuggestionFj suggestionFj);
+
+    /**
+     * 删除投诉建议_附件
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 结果
+     */
+    public int deleteSuggestionFjBySuggestionFjId(Long suggestionFjId);
+
+    /**
+     * 批量删除投诉建议_附件
+     * 
+     * @param suggestionFjIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSuggestionFjBySuggestionFjIds(Long[] suggestionFjIds);
+
+    /**
+     * 批量新增
+     * @param suggestionFj
+     * @return
+     */
+   int batchSuggestionFj(List<SuggestionFj> suggestionFj);
+}

+ 13 - 8
ruoyi-system/src/main/java/com/ruoyi/system/service/ICommunityAssetsService.java

@@ -1,6 +1,5 @@
 package com.ruoyi.system.service;
 
-
 import com.ruoyi.system.domain.assets.CommunityAssets;
 
 import java.util.List;
@@ -9,17 +8,17 @@ import java.util.List;
  * 社区资产Service接口
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-24
  */
 public interface ICommunityAssetsService 
 {
     /**
      * 查询社区资产
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 社区资产
      */
-    public CommunityAssets selectCommunityAssetsByAssetId(Long assetId);
+    public CommunityAssets selectCommunityAssetsByCommunityAssetId(Long communityAssetId);
 
     /**
      * 查询社区资产列表
@@ -48,16 +47,22 @@ public interface ICommunityAssetsService
     /**
      * 批量删除社区资产
      * 
-     * @param assetIds 需要删除的社区资产主键集合
+     * @param communityAssetIds 需要删除的社区资产主键集合
      * @return 结果
      */
-    public int deleteCommunityAssetsByAssetIds(Long[] assetIds);
+    public int deleteCommunityAssetsByCommunityAssetIds(Long[] communityAssetIds);
 
     /**
      * 删除社区资产信息
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 结果
      */
-    public int deleteCommunityAssetsByAssetId(Long assetId);
+    public int deleteCommunityAssetsByCommunityAssetId(Long communityAssetId);
+    /**
+     * 校验资产编号的唯一性
+     * @param communityAssets
+     * @return
+     */
+    public boolean checkEquipmentNumberUnique(CommunityAssets communityAssets);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISuggestionFjService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
+
+import java.util.List;
+/**
+ * 投诉建议_附件Service接口
+ * 
+ * @author boman
+ * @date 2025-02-24
+ */
+public interface ISuggestionFjService 
+{
+    /**
+     * 查询投诉建议_附件
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 投诉建议_附件
+     */
+    public SuggestionFj selectSuggestionFjBySuggestionFjId(Long suggestionFjId);
+
+    /**
+     * 查询投诉建议_附件列表
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 投诉建议_附件集合
+     */
+    public List<SuggestionFj> selectSuggestionFjList(SuggestionFj suggestionFj);
+
+    /**
+     * 新增投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    public int insertSuggestionFj(SuggestionFj suggestionFj);
+
+    /**
+     * 修改投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    public int updateSuggestionFj(SuggestionFj suggestionFj);
+
+    /**
+     * 批量删除投诉建议_附件
+     * 
+     * @param suggestionFjIds 需要删除的投诉建议_附件主键集合
+     * @return 结果
+     */
+    public int deleteSuggestionFjBySuggestionFjIds(Long[] suggestionFjIds);
+
+    /**
+     * 删除投诉建议_附件信息
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 结果
+     */
+    public int deleteSuggestionFjBySuggestionFjId(Long suggestionFjId);
+}

+ 28 - 10
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommunityAssetsServiceImpl.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.service.impl;
 
+import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.assets.CommunityAssets;
 import com.ruoyi.system.mapper.CommunityAssetsMapper;
 import com.ruoyi.system.service.ICommunityAssetsService;
@@ -13,7 +15,7 @@ import java.util.List;
  * 社区资产Service业务层处理
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-24
  */
 @Service
 public class CommunityAssetsServiceImpl implements ICommunityAssetsService 
@@ -24,13 +26,13 @@ public class CommunityAssetsServiceImpl implements ICommunityAssetsService
     /**
      * 查询社区资产
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 社区资产
      */
     @Override
-    public CommunityAssets selectCommunityAssetsByAssetId(Long assetId)
+    public CommunityAssets selectCommunityAssetsByCommunityAssetId(Long communityAssetId)
     {
-        return communityAssetsMapper.selectCommunityAssetsByAssetId(assetId);
+        return communityAssetsMapper.selectCommunityAssetsByCommunityAssetId(communityAssetId);
     }
 
     /**
@@ -74,24 +76,40 @@ public class CommunityAssetsServiceImpl implements ICommunityAssetsService
     /**
      * 批量删除社区资产
      * 
-     * @param assetIds 需要删除的社区资产主键
+     * @param communityAssetIds 需要删除的社区资产主键
      * @return 结果
      */
     @Override
-    public int deleteCommunityAssetsByAssetIds(Long[] assetIds)
+    public int deleteCommunityAssetsByCommunityAssetIds(Long[] communityAssetIds)
     {
-        return communityAssetsMapper.deleteCommunityAssetsByAssetIds(assetIds);
+        return communityAssetsMapper.deleteCommunityAssetsByCommunityAssetIds(communityAssetIds);
     }
 
     /**
      * 删除社区资产信息
      * 
-     * @param assetId 社区资产主键
+     * @param communityAssetId 社区资产主键
      * @return 结果
      */
     @Override
-    public int deleteCommunityAssetsByAssetId(Long assetId)
+    public int deleteCommunityAssetsByCommunityAssetId(Long communityAssetId)
     {
-        return communityAssetsMapper.deleteCommunityAssetsByAssetId(assetId);
+        return communityAssetsMapper.deleteCommunityAssetsByCommunityAssetId(communityAssetId);
+    }
+
+    /**
+     * 校验资产编号的唯一性
+     * @param communityAssets
+     * @return
+     */
+    @Override
+    public boolean checkEquipmentNumberUnique(CommunityAssets communityAssets) {
+        Long communityAssetId = StringUtils.isNull(communityAssets.getCommunityAssetId()) ? -1L : communityAssets.getCommunityAssetId();
+        CommunityAssets info = communityAssetsMapper.checkEquipmentNumberUnique(communityAssets.getAssetName());
+        if (StringUtils.isNotNull(info) && info.getCommunityAssetId().longValue() != communityAssetId.longValue())
+        {
+            return UserConstants.NOT_UNIQUE;
+        }
+        return UserConstants.UNIQUE;
     }
 }

+ 18 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComplaintSuggestionServiceImpl.java

@@ -2,7 +2,9 @@ package com.ruoyi.system.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.complaintSuggestion.ComplaintSuggestion;
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
 import com.ruoyi.system.mapper.ComplaintSuggestionMapper;
+import com.ruoyi.system.mapper.SuggestionFjMapper;
 import com.ruoyi.system.service.IComplaintSuggestionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -21,6 +23,9 @@ public class ComplaintSuggestionServiceImpl implements IComplaintSuggestionServi
     @Autowired
     private ComplaintSuggestionMapper complaintSuggestionMapper;
 
+    @Autowired
+    private SuggestionFjMapper suggestionFjMapper;
+
     /**
      * 查询投诉建议
      * 
@@ -30,7 +35,14 @@ public class ComplaintSuggestionServiceImpl implements IComplaintSuggestionServi
     @Override
     public ComplaintSuggestion selectComplaintSuggestionBySuggestionId(Long suggestionId)
     {
-        return complaintSuggestionMapper.selectComplaintSuggestionBySuggestionId(suggestionId);
+        ComplaintSuggestion complaintSuggestion = complaintSuggestionMapper.selectComplaintSuggestionBySuggestionId(suggestionId);
+        SuggestionFj suggestionFj = new SuggestionFj();
+        suggestionFj.setSuggestionId(suggestionId);
+        List<SuggestionFj> suggestionFjs = suggestionFjMapper.selectSuggestionFjList(suggestionFj);
+        if (suggestionFjs != null && suggestionFjs.size() > 0){
+            complaintSuggestion.setSuggestionFjList(suggestionFjs);
+        }
+        return complaintSuggestion;
     }
 
     /**
@@ -67,6 +79,11 @@ public class ComplaintSuggestionServiceImpl implements IComplaintSuggestionServi
     @Override
     public int updateComplaintSuggestion(ComplaintSuggestion complaintSuggestion)
     {
+        //判断是否有附件
+        List<SuggestionFj> suggestionFjList = complaintSuggestion.getSuggestionFjList();
+        if (suggestionFjList != null && suggestionFjList.size() > 0){
+            suggestionFjMapper.batchSuggestionFj(suggestionFjList);
+        }
         complaintSuggestion.setUpdateTime(DateUtils.getNowDate());
         return complaintSuggestionMapper.updateComplaintSuggestion(complaintSuggestion);
     }

+ 9 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalParkingServiceImpl.java

@@ -50,8 +50,16 @@ public class IllegalParkingServiceImpl implements IIllegalParkingService
     @Override
     public List<IllegalParking> selectIllegalParkingList(IllegalParking illegalParking)
     {
-
         List<IllegalParking> illegalParkings = illegalParkingMapper.selectIllegalParkingList(illegalParking);
+        if (illegalParkings != null && illegalParkings.size() > 0){
+            for (IllegalParking parking : illegalParkings) {
+                String plateNumber = parking.getPlateNumber();
+                List<IllegalParking> illegalParkingC = illegalParkingMapper.selectIllegalParkingByPlateNumber(plateNumber);
+                if (illegalParkingC != null && illegalParkingC.size() > 0){
+                    illegalParking.setChildren(illegalParkingC);
+                }
+            }
+        }
         return illegalParkings;
     }
 

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SuggestionFjServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
+import com.ruoyi.system.mapper.SuggestionFjMapper;
+import com.ruoyi.system.service.ISuggestionFjService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 投诉建议_附件Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-02-24
+ */
+@Service
+public class SuggestionFjServiceImpl implements ISuggestionFjService 
+{
+    @Autowired
+    private SuggestionFjMapper suggestionFjMapper;
+
+    /**
+     * 查询投诉建议_附件
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 投诉建议_附件
+     */
+    @Override
+    public SuggestionFj selectSuggestionFjBySuggestionFjId(Long suggestionFjId)
+    {
+        return suggestionFjMapper.selectSuggestionFjBySuggestionFjId(suggestionFjId);
+    }
+
+    /**
+     * 查询投诉建议_附件列表
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 投诉建议_附件
+     */
+    @Override
+    public List<SuggestionFj> selectSuggestionFjList(SuggestionFj suggestionFj)
+    {
+        return suggestionFjMapper.selectSuggestionFjList(suggestionFj);
+    }
+
+    /**
+     * 新增投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    @Override
+    public int insertSuggestionFj(SuggestionFj suggestionFj)
+    {
+        suggestionFj.setCreateTime(DateUtils.getNowDate());
+        return suggestionFjMapper.insertSuggestionFj(suggestionFj);
+    }
+
+    /**
+     * 修改投诉建议_附件
+     * 
+     * @param suggestionFj 投诉建议_附件
+     * @return 结果
+     */
+    @Override
+    public int updateSuggestionFj(SuggestionFj suggestionFj)
+    {
+        suggestionFj.setUpdateTime(DateUtils.getNowDate());
+        return suggestionFjMapper.updateSuggestionFj(suggestionFj);
+    }
+
+    /**
+     * 批量删除投诉建议_附件
+     * 
+     * @param suggestionFjIds 需要删除的投诉建议_附件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSuggestionFjBySuggestionFjIds(Long[] suggestionFjIds)
+    {
+        return suggestionFjMapper.deleteSuggestionFjBySuggestionFjIds(suggestionFjIds);
+    }
+
+    /**
+     * 删除投诉建议_附件信息
+     * 
+     * @param suggestionFjId 投诉建议_附件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSuggestionFjBySuggestionFjId(Long suggestionFjId)
+    {
+        return suggestionFjMapper.deleteSuggestionFjBySuggestionFjId(suggestionFjId);
+    }
+}

+ 25 - 16
ruoyi-system/src/main/resources/mapper/system/CommunityAssetsMapper.xml

@@ -5,8 +5,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.ruoyi.system.mapper.CommunityAssetsMapper">
     
     <resultMap type="CommunityAssets" id="CommunityAssetsResult">
+        <result property="communityAssetId"    column="community_asset_id"    />
         <result property="assetId"    column="asset_id"    />
-        <result property="ssetType"    column="sset_type"    />
+        <result property="assetName"    column="asset_name"    />
         <result property="equipmentName"    column="equipment_name"    />
         <result property="equipmentCoverPhoto"    column="equipment_cover_photo"    />
         <result property="equipmentNumber"    column="equipment_number"    />
@@ -35,13 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCommunityAssetsVo">
-        select asset_id, sset_type, equipment_name, equipment_cover_photo, equipment_number, equipment_qr_code, equipment_status, equipment_model, purchase_date, equipment_purpose, equipment_location, equipment_price, storage_time, storage_person, outbound_time, outbound_person, plate_number, equipment_photos, maintenance_date, maintenance_person, warranty_period, depreciation_rate, create_by, create_time, update_by, update_time, remark from community_assets
+        select community_asset_id, asset_id, asset_name, equipment_name, equipment_cover_photo, equipment_number, equipment_qr_code, equipment_status, equipment_model, purchase_date, equipment_purpose, equipment_location, equipment_price, storage_time, storage_person, outbound_time, outbound_person, plate_number, equipment_photos, maintenance_date, maintenance_person, warranty_period, depreciation_rate, create_by, create_time, update_by, update_time, remark from community_assets
     </sql>
 
     <select id="selectCommunityAssetsList" parameterType="CommunityAssets" resultMap="CommunityAssetsResult">
         <include refid="selectCommunityAssetsVo"/>
         <where>  
-            <if test="ssetType != null  and ssetType != ''"> and sset_type = #{ssetType}</if>
+            <if test="assetId != null "> and asset_id = #{assetId}</if>
+            <if test="assetName != null  and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
             <if test="equipmentName != null  and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
             <if test="equipmentCoverPhoto != null  and equipmentCoverPhoto != ''"> and equipment_cover_photo = #{equipmentCoverPhoto}</if>
             <if test="equipmentNumber != null  and equipmentNumber != ''"> and equipment_number = #{equipmentNumber}</if>
@@ -65,15 +67,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectCommunityAssetsByAssetId" parameterType="Long" resultMap="CommunityAssetsResult">
+    <select id="selectCommunityAssetsByCommunityAssetId" parameterType="Long" resultMap="CommunityAssetsResult">
         <include refid="selectCommunityAssetsVo"/>
-        where asset_id = #{assetId}
+        where community_asset_id = #{communityAssetId}
+    </select>
+    <select id="checkEquipmentNumberUnique" parameterType="String" resultMap="CommunityAssetsResult">
+        <include refid="selectCommunityAssetsVo"/>
+        where equipment_number = #{equipmentNumber} limit 1
     </select>
 
-    <insert id="insertCommunityAssets" parameterType="CommunityAssets" useGeneratedKeys="true" keyProperty="assetId">
+    <insert id="insertCommunityAssets" parameterType="CommunityAssets" useGeneratedKeys="true" keyProperty="communityAssetId">
         insert into community_assets
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="ssetType != null and ssetType != ''">sset_type,</if>
+            <if test="assetId != null">asset_id,</if>
+            <if test="assetName != null and assetName != ''">asset_name,</if>
             <if test="equipmentName != null and equipmentName != ''">equipment_name,</if>
             <if test="equipmentCoverPhoto != null">equipment_cover_photo,</if>
             <if test="equipmentNumber != null">equipment_number,</if>
@@ -101,7 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="ssetType != null and ssetType != ''">#{ssetType},</if>
+            <if test="assetId != null">#{assetId},</if>
+            <if test="assetName != null and assetName != ''">#{assetName},</if>
             <if test="equipmentName != null and equipmentName != ''">#{equipmentName},</if>
             <if test="equipmentCoverPhoto != null">#{equipmentCoverPhoto},</if>
             <if test="equipmentNumber != null">#{equipmentNumber},</if>
@@ -133,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateCommunityAssets" parameterType="CommunityAssets">
         update community_assets
         <trim prefix="SET" suffixOverrides=",">
-            <if test="ssetType != null and ssetType != ''">sset_type = #{ssetType},</if>
+            <if test="assetId != null">asset_id = #{assetId},</if>
+            <if test="assetName != null and assetName != ''">asset_name = #{assetName},</if>
             <if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
             <if test="equipmentCoverPhoto != null">equipment_cover_photo = #{equipmentCoverPhoto},</if>
             <if test="equipmentNumber != null">equipment_number = #{equipmentNumber},</if>
@@ -160,17 +169,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
         </trim>
-        where asset_id = #{assetId}
+        where community_asset_id = #{communityAssetId}
     </update>
 
-    <delete id="deleteCommunityAssetsByAssetId" parameterType="Long">
-        delete from community_assets where asset_id = #{assetId}
+    <delete id="deleteCommunityAssetsByCommunityAssetId" parameterType="Long">
+        delete from community_assets where community_asset_id = #{communityAssetId}
     </delete>
 
-    <delete id="deleteCommunityAssetsByAssetIds" parameterType="String">
-        delete from community_assets where asset_id in 
-        <foreach item="assetId" collection="array" open="(" separator="," close=")">
-            #{assetId}
+    <delete id="deleteCommunityAssetsByCommunityAssetIds" parameterType="String">
+        delete from community_assets where community_asset_id in 
+        <foreach item="communityAssetId" collection="array" open="(" separator="," close=")">
+            #{communityAssetId}
         </foreach>
     </delete>
 </mapper>

+ 121 - 0
ruoyi-system/src/main/resources/mapper/system/SuggestionFjMapper.xml

@@ -0,0 +1,121 @@
+<?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.ruoyi.system.mapper.SuggestionFjMapper">
+
+    <resultMap type="SuggestionFj" id="SuggestionFjResult">
+        <result property="suggestionFjId" column="suggestion_fj_id"/>
+        <result property="suggestionId" column="suggestion_id"/>
+        <result property="oldName" column="old_name"/>
+        <result property="name" column="name"/>
+        <result property="url" column="url"/>
+        <result property="bigType" column="big_type"/>
+        <result property="type" column="type"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectSuggestionFjVo">
+        select suggestion_fj_id,
+               suggestion_id,
+               old_name,
+               name,
+               url,
+               big_type,
+               type,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from suggestion_fj
+    </sql>
+
+    <select id="selectSuggestionFjList" parameterType="SuggestionFj" resultMap="SuggestionFjResult">
+        <include refid="selectSuggestionFjVo"/>
+        <where>
+            <if test="suggestionId != null ">and suggestion_id = #{suggestionId}</if>
+            <if test="oldName != null  and oldName != ''">and old_name like concat('%', #{oldName}, '%')</if>
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="url != null  and url != ''">and url = #{url}</if>
+            <if test="bigType != null  and bigType != ''">and big_type = #{bigType}</if>
+            <if test="type != null  and type != ''">and type = #{type}</if>
+        </where>
+    </select>
+
+    <select id="selectSuggestionFjBySuggestionFjId" parameterType="Long" resultMap="SuggestionFjResult">
+        <include refid="selectSuggestionFjVo"/>
+        where suggestion_fj_id = #{suggestionFjId}
+    </select>
+
+    <insert id="insertSuggestionFj" parameterType="SuggestionFj" useGeneratedKeys="true" keyProperty="suggestionFjId">
+        insert into suggestion_fj
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="suggestionId != null">suggestion_id,</if>
+            <if test="oldName != null">old_name,</if>
+            <if test="name != null and name != ''">name,</if>
+            <if test="url != null">url,</if>
+            <if test="bigType != null">big_type,</if>
+            <if test="type != null">type,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="suggestionId != null">#{suggestionId},</if>
+            <if test="oldName != null">#{oldName},</if>
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="url != null">#{url},</if>
+            <if test="bigType != null">#{bigType},</if>
+            <if test="type != null">#{type},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+        </trim>
+    </insert>
+    <insert id="batchSuggestionFj">
+        insert into suggestion_fj( suggestion_id, old_name, name,url,create_time) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            ( #{item.suggestionId}, #{item.oldName}, #{item.name},#{item.url},sysdate())
+        </foreach>
+    </insert>
+
+    <update id="updateSuggestionFj" parameterType="SuggestionFj">
+        update suggestion_fj
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="suggestionId != null">suggestion_id = #{suggestionId},</if>
+            <if test="oldName != null">old_name = #{oldName},</if>
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="url != null">url = #{url},</if>
+            <if test="bigType != null">big_type = #{bigType},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where suggestion_fj_id = #{suggestionFjId}
+    </update>
+
+    <delete id="deleteSuggestionFjBySuggestionFjId" parameterType="Long">
+        delete
+        from suggestion_fj
+        where suggestion_fj_id = #{suggestionFjId}
+    </delete>
+
+    <delete id="deleteSuggestionFjBySuggestionFjIds" parameterType="String">
+        delete from suggestion_fj where suggestion_fj_id in
+        <foreach item="suggestionFjId" collection="array" open="(" separator="," close=")">
+            #{suggestionFjId}
+        </foreach>
+    </delete>
+</mapper>