Przeglądaj źródła

新增 农事系统基地管理迁移SAAS平台

zhaiyifei 1 rok temu
rodzic
commit
ce731a9c1d

+ 4 - 6
src/main/java/com/yunfeiyun/agmp/fms/controller/FmsLandController.java

@@ -5,19 +5,17 @@ import com.yunfeiyun.agmp.common.constant.ErrorCode;
 import com.yunfeiyun.agmp.common.constant.ResConstants;
 import com.yunfeiyun.agmp.common.core.controller.BaseController;
 import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
-import com.yunfeiyun.agmp.common.core.domain.entity.SysDept;
 import com.yunfeiyun.agmp.common.core.page.TableDataInfo;
 import com.yunfeiyun.agmp.common.enums.BusinessType;
 import com.yunfeiyun.agmp.common.framework.manager.ResManager;
-import com.yunfeiyun.agmp.common.utils.DateUtils;
 import com.yunfeiyun.agmp.common.utils.SecurityUtils;
 import com.yunfeiyun.agmp.common.utils.poi.ExcelUtil;
 import com.yunfeiyun.agmp.common.web.system.domain.SysRes;
 import com.yunfeiyun.agmp.fms.domain.FmsLand;
 import com.yunfeiyun.agmp.fms.domain.resvo.FmsLandTotalResVo;
-import com.yunfeiyun.agmp.fms.util.DataAuthUtil;
 import com.yunfeiyun.agmp.fms.service.IFmsBlockService;
 import com.yunfeiyun.agmp.fms.service.IFmsLandService;
+import com.yunfeiyun.agmp.fms.util.DataAuthUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -60,7 +58,7 @@ public class FmsLandController extends BaseController
         if (b) {
             //true需要进行权限校验。基地列表需要分配的基地才能查询
             List<String> strings = dataAuthUtil.landList();
-            if (strings.size() == 0) {
+            if (strings.isEmpty()) {
                 return getDataTable(new ArrayList<>());
             }
             fmsLand.setDataFilter(true);
@@ -81,7 +79,7 @@ public class FmsLandController extends BaseController
         if (b) {
             //true需要进行权限校验。基地列表需要分配的基地才能查询
             List<String> strings = dataAuthUtil.landList();
-            if (strings.size() == 0) {
+            if (strings.isEmpty()) {
                 return getDataTable(new ArrayList<>());
             }
             fmsLand.setDataFilter(true);
@@ -147,7 +145,7 @@ public class FmsLandController extends BaseController
         if (b) {
             //true需要进行权限校验。下拉框基地列表查询需要包含分配的基地以及分配地块所属基地
             List<String> strings = dataAuthUtil.landListOfBlock();
-            if (strings.size() == 0) {
+            if (strings.isEmpty()) {
                 FmsLandTotalResVo resVo = new FmsLandTotalResVo();
                 resVo.setCount("0");
                 resVo.setLandAreaSum("0");

+ 8 - 8
src/main/resources/mapper/FmsLandMapper.xml

@@ -28,15 +28,15 @@
 
     <select id="selectFmsLandList" parameterType="FmsLand" resultType="FmsLand">
         SELECT l.landId, l.landName, l.landArea, bc.landBlockcount, l.landManager, l.landTel, l.landLocation,
-        l.landRemark, l.landLatitude, l.landLongitude,l.landSeq,l.tid,
-        (select GROUP_CONCAT(resUrl) from SysRes r where r.resBusId = l.landId) landPreview,
-        (select GROUP_CONCAT(resId) from SysRes r where r.resBusId = l.landId) resIds,
-        (SELECT COUNT(tmnlandId) FROM TmnLand tl WHERE tl.landId = l.landId) landDevcount,
-        (SELECT u.userName FROM SysUser u WHERE u.userId = l.landManager) landManagerName
+            l.landRemark, l.landLatitude, l.landLongitude,l.landSeq,l.tid,
+                (select GROUP_CONCAT(resUrl) from SysRes r where r.resBusId = l.landId) landPreview,
+                (select GROUP_CONCAT(resId) from SysRes r where r.resBusId = l.landId) resIds,
+                (SELECT COUNT(tmnlandId) FROM TmnLand tl WHERE tl.landId = l.landId) landDevcount,
+                (SELECT u.userName FROM SysUser u WHERE u.userId = l.landManager) landManagerName
         from FmsLand l
-        LEFT JOIN (
-        select count(landId) as landBlockcount,landId from FmsBlock GROUP BY landId
-        ) bc on bc.landId = l.landId
+            LEFT JOIN (
+                select count(landId) as landBlockcount,landId from FmsBlock GROUP BY landId
+            ) bc on bc.landId = l.landId
         <where>
             <if test="landId != null ">and l.landId = #{landId}</if>
             <if test="landName != null  and landName != ''">and landName like concat('%', #{landName}, '%')</if>