hanfucheng 5 maanden geleden
bovenliggende
commit
91b3f32dac

+ 6 - 4
data-ui/src/views/data/housingconstruction/gassource/index.vue

@@ -100,7 +100,7 @@
           <span>{{ parseTime(scope.row.joinInstationTime, '{y}-{m}-{d}') }}</span>
           <span>{{ parseTime(scope.row.joinInstationTime, '{y}-{m}-{d}') }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="运输体积" align="center" prop="weight"/>
+      <el-table-column label="运输重量" align="center" prop="weight"/>
       <el-table-column label="运输车辆车牌号" align="center" prop="carNumber" />
       <el-table-column label="运输车辆车牌号" align="center" prop="carNumber" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
         <template slot-scope="scope">
@@ -189,8 +189,8 @@
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
-            <el-form-item label="运输体积" prop="weight">
-              <el-input v-model="form.weight" placeholder="请输入运输体积"/>
+            <el-form-item label="运输重量" prop="weight">
+              <el-input v-model="form.weight" placeholder="请输入运输重量(KG)"/>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -250,6 +250,7 @@ import {getCarList} from "@/api/data/housingconstruction/car";
 import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
 import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
 import FileUpload from '@/views/components/FileUpload/index.vue'
 import FileUpload from '@/views/components/FileUpload/index.vue'
 import {format_date} from "@/views/data/common/dateExport";
 import {format_date} from "@/views/data/common/dateExport";
+import {checkPositiveDecimal, checkPositiveInteger} from "@/api/rules/rules";
 
 
 export default {
 export default {
   name: "Gassource",
   name: "Gassource",
@@ -315,7 +316,8 @@ export default {
           {required: true, message: "入站时间不能为空", trigger: "blur"}
           {required: true, message: "入站时间不能为空", trigger: "blur"}
         ],
         ],
         weight: [
         weight: [
-          {required: true, message: "运输体积不能为空", trigger: "blur"}
+          {required: true, message: "运输重量不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         carId: [
         carId: [
           {required: true, message: "运输车辆不能为空", trigger: "blur"}
           {required: true, message: "运输车辆不能为空", trigger: "blur"}

+ 12 - 6
data-ui/src/views/data/housingconstruction/log/index.vue

@@ -189,7 +189,7 @@
         <el-row :gutter="24">
         <el-row :gutter="24">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="当前储量" prop="storageCapacity">
             <el-form-item label="当前储量" prop="storageCapacity">
-              <el-input v-model="form.storageCapacity" placeholder="请输入内部气压(单位: L)"/>
+              <el-input v-model="form.storageCapacity" placeholder="请输入当前储量(单位: KG)"/>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -206,6 +206,7 @@
 import {addLog, delLog, getLog, listLog, updateLog} from "@/api/data/housingconstruction/log";
 import {addLog, delLog, getLog, listLog, updateLog} from "@/api/data/housingconstruction/log";
 import {getStoragetankList} from "@/api/data/housingconstruction/storagetank"
 import {getStoragetankList} from "@/api/data/housingconstruction/storagetank"
 import {format_date} from "@/views/data/common/dateExport";
 import {format_date} from "@/views/data/common/dateExport";
+import {checkPositiveDecimal} from "@/api/rules/rules";
 
 
 export default {
 export default {
   name: "Log",
   name: "Log",
@@ -247,22 +248,27 @@ export default {
           {required: true, message: "储罐不能为空", trigger: "blur"}
           {required: true, message: "储罐不能为空", trigger: "blur"}
         ],
         ],
         level: [
         level: [
-          {required: true, message: "液位不能为空", trigger: "blur"}
+          {required: true, message: "液位不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         heat: [
         heat: [
-          {required: true, message: "温度不能为空", trigger: "blur"}
+          {required: true, message: "温度不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         pressure: [
         pressure: [
-          {required: true, message: "内部气压不能为空", trigger: "blur"}
+          {required: true, message: "内部气压不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         gasLeak: [
         gasLeak: [
-          {required: true, message: "周边可燃性气体泄漏不能为空", trigger: "blur"}
+          {required: true, message: "周边可燃性气体泄漏不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         runState: [
         runState: [
           {required: true, message: "运行状态不能为空", trigger: "blur"}
           {required: true, message: "运行状态不能为空", trigger: "blur"}
         ],
         ],
         storageCapacity: [
         storageCapacity: [
-          {required: true, message: "当前储量不能为空", trigger: "blur"}
+          {required: true, message: "当前储量不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
       }
       }
     };
     };

+ 14 - 7
data-ui/src/views/data/housingconstruction/storagetank/index.vue

@@ -180,7 +180,7 @@
         <el-row :gutter="24">
         <el-row :gutter="24">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="存储量" prop="storageCapacity">
             <el-form-item label="存储量" prop="storageCapacity">
-              <el-input v-model="form.storageCapacity" placeholder="请输入存储量(单位: L)"/>
+              <el-input v-model="form.storageCapacity" placeholder="请输入存储量(单位: KG)"/>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
@@ -244,6 +244,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {treeselect} from "@/api/system/dept";
 import {treeselect} from "@/api/system/dept";
 import deptselector from "@/views/components/deptselector.vue";
 import deptselector from "@/views/components/deptselector.vue";
 import {format_date} from "@/views/data/common/dateExport";
 import {format_date} from "@/views/data/common/dateExport";
+import {checkPositiveDecimal} from "@/api/rules/rules";
 
 
 export default {
 export default {
   name: "Storagetank",
   name: "Storagetank",
@@ -297,22 +298,28 @@ export default {
           {required: true, message: "储罐名称不能为空", trigger: "blur"}
           {required: true, message: "储罐名称不能为空", trigger: "blur"}
         ],
         ],
         storageCapacity: [
         storageCapacity: [
-          {required: true, message: "存储量不能为空", trigger: "blur"}
+          {required: true, message: "存储量不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         levelCeiling: [
         levelCeiling: [
-          {required: true, message: "液体液位上限不能为空", trigger: "blur"}
+          {required: true, message: "液体液位上限不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         levelFloor: [
         levelFloor: [
-          {required: true, message: "液体液位下限不能为空", trigger: "blur"}
+          {required: true, message: "液体液位下限不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         heat: [
         heat: [
-          {required: true, message: "温度不能为空", trigger: "blur"}
+          {required: true, message: "温度不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         pressure: [
         pressure: [
-          {required: true, message: "内部气压不能为空", trigger: "blur"}
+          {required: true, message: "内部气压不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         gasLeak: [
         gasLeak: [
-          {required: true, message: "周边可燃性气体泄漏不能为空", trigger: "blur"}
+          {required: true, message: "周边可燃性气体泄漏不能为空", trigger: "blur"},
+          {validator: checkPositiveDecimal, trigger: 'blur'}
         ],
         ],
         deptId:[
         deptId:[
           {required: true, message: "所属部门不能为空", trigger: "blur"}
           {required: true, message: "所属部门不能为空", trigger: "blur"}

+ 13 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/controller/CenterdataTHousingconstructionSteelcylinderLogController.java

@@ -8,9 +8,11 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionRealnameuser;
 import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionSteelcylinder;
 import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionSteelcylinder;
 import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionSteelcylinderLog;
 import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionSteelcylinderLog;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionAttachService;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionAttachService;
+import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionRealnameuserService;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionSteelcylinderLogService;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionSteelcylinderLogService;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionSteelcylinderService;
 import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionSteelcylinderService;
 import com.sooka.sponest.data.utils.ExcelUtil;
 import com.sooka.sponest.data.utils.ExcelUtil;
@@ -40,6 +42,9 @@ public class CenterdataTHousingconstructionSteelcylinderLogController extends Ba
 
 
     @Autowired
     @Autowired
     private ICenterdataTHousingconstructionAttachService attachService;
     private ICenterdataTHousingconstructionAttachService attachService;
+
+    @Autowired
+    private ICenterdataTHousingconstructionRealnameuserService realnameuserService;
     /**
     /**
      * 查询钢瓶日志列表
      * 查询钢瓶日志列表
      */
      */
@@ -91,6 +96,14 @@ public class CenterdataTHousingconstructionSteelcylinderLogController extends Ba
     */
     */
     @PostMapping(value = "/addLog")
     @PostMapping(value = "/addLog")
     public AjaxResult addLog(@RequestBody CenterdataTHousingconstructionSteelcylinderLog steelcylinderLog) {
     public AjaxResult addLog(@RequestBody CenterdataTHousingconstructionSteelcylinderLog steelcylinderLog) {
+        //修改用户经纬度
+        if (StringUtils.isNotEmpty(steelcylinderLog.getLongitude())){
+            CenterdataTHousingconstructionRealnameuser realnameuser = new CenterdataTHousingconstructionRealnameuser();
+            realnameuser.setId(Long.valueOf(steelcylinderLog.getJoinHouseId()));
+            realnameuser.setLongitude(steelcylinderLog.getLongitude());
+            realnameuser.setLatitude(steelcylinderLog.getLatitude());
+            realnameuserService.updateCenterdataTHousingconstructionRealnameuser(realnameuser);
+        }
         CenterdataTHousingconstructionSteelcylinder steelcylinder = centerdataTHousingconstructionSteelcylinderService.selectCenterdataTHousingconstructionSteelcylinderById(steelcylinderLog.getSteelcylinderId());
         CenterdataTHousingconstructionSteelcylinder steelcylinder = centerdataTHousingconstructionSteelcylinderService.selectCenterdataTHousingconstructionSteelcylinderById(steelcylinderLog.getSteelcylinderId());
         //修改钢瓶状态
         //修改钢瓶状态
         CenterdataTHousingconstructionSteelcylinder centerdataTHousingconstructionSteelcylinder = new CenterdataTHousingconstructionSteelcylinder();
         CenterdataTHousingconstructionSteelcylinder centerdataTHousingconstructionSteelcylinder = new CenterdataTHousingconstructionSteelcylinder();

+ 33 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/controller/CenterdataTHousingconstructionViewController.java

@@ -267,4 +267,37 @@ public class CenterdataTHousingconstructionViewController extends BaseController
         return AjaxResult.success(housingconstructionViewService.getAttach(attach));
         return AjaxResult.success(housingconstructionViewService.getAttach(attach));
     }
     }
 
 
+    /*
+    * 车辆共享特殊标注
+    *
+    * @author 韩福成
+    * @date 2024/12/30 下午2:25
+    */
+    @GetMapping("/getCarShare")
+    public AjaxResult getCarShare(){
+        return AjaxResult.success(housingconstructionViewService.getCarShare());
+    }
+
+    /*
+    * 查询车辆当日运输入户钢瓶
+    *
+    * @author 韩福成
+    * @date 2024/12/30 下午2:35
+    */
+    @GetMapping("/getSteelCylinderByCar")
+    public AjaxResult getSteelCylinderByCar(CenterdataTHousingconstructionCar car){
+        return AjaxResult.success(housingconstructionViewService.getSteelCylinderByCar(car));
+    }
+
+    /*
+    * 选定区域
+    *
+    * @author 韩福成
+    * @date 2024/12/30 下午2:55
+    */
+    @GetMapping("/getSelectedArea")
+    public R getSelectedArea(CenterdataTHousingconstructionStoragetank storagetank) {
+        return R.ok(housingconstructionViewService.getSelectedArea(storagetank));
+    }
+
 }
 }

+ 4 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/domain/CenterdataTHousingconstructionSteelcylinderLog.java

@@ -160,6 +160,10 @@ public class CenterdataTHousingconstructionSteelcylinderLog extends BaseBusiness
 
 
     private String environment;
     private String environment;
 
 
+    private String longitude;
+
+    private String latitude;
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 8 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/mapper/CenterdataTHousingconstructionViewMapper.java

@@ -53,4 +53,12 @@ public interface CenterdataTHousingconstructionViewMapper {
     List<Map<String, Object>> getNewUserSumByEnterpriseId(CenterdataTHousingconstructionSteelcylinder steelcylinder);
     List<Map<String, Object>> getNewUserSumByEnterpriseId(CenterdataTHousingconstructionSteelcylinder steelcylinder);
 
 
     List<Map<String, Object>> getProductionReport(CenterdataTHousingconstructionSteelcylinder steelcylinder);
     List<Map<String, Object>> getProductionReport(CenterdataTHousingconstructionSteelcylinder steelcylinder);
+
+    List<Map<String,Object>> getCarShare();
+
+    List<Map<String,Object>> getSteelCylinderByCar(CenterdataTHousingconstructionCar car);
+
+    List<Map<String,Object>> getSteelcylinderArea(CenterdataTHousingconstructionStoragetank storagetank);
+
+    List<Map<String,Object>> getRealnameuserArea(CenterdataTHousingconstructionStoragetank storagetank);
 }
 }

+ 6 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/service/ICenterdataTHousingconstructionViewService.java

@@ -57,4 +57,10 @@ public interface ICenterdataTHousingconstructionViewService {
     List<Map<String, Object>> getCirculation(CenterdataTHousingconstructionSteelcylinderLog log);
     List<Map<String, Object>> getCirculation(CenterdataTHousingconstructionSteelcylinderLog log);
 
 
     List<CenterdataTHousingconstructionAttach> getAttach(CenterdataTHousingconstructionAttach attach);
     List<CenterdataTHousingconstructionAttach> getAttach(CenterdataTHousingconstructionAttach attach);
+
+    List<Map<String, Object>> getCarShare();
+
+    List<Map<String, Object>> getSteelCylinderByCar(CenterdataTHousingconstructionCar car);
+
+    List<Map<String, Object>> getSelectedArea(CenterdataTHousingconstructionStoragetank storagetank);
 }
 }

+ 28 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/service/impl/CenterdataTHousingconstructionViewServiceImpl.java

@@ -429,4 +429,32 @@ public class CenterdataTHousingconstructionViewServiceImpl extends BaseServiceIm
         return attachList;
         return attachList;
     }
     }
 
 
+    @Override
+    public List<Map<String, Object>> getCarShare() {
+        return centerdataTHousingconstructionViewMapper.getCarShare();
+    }
+
+    @Override
+    public List<Map<String, Object>> getSteelCylinderByCar(CenterdataTHousingconstructionCar car) {
+        setSookaDataBase(car);
+        return centerdataTHousingconstructionViewMapper.getSteelCylinderByCar(car);
+    }
+
+    @Override
+    public List<Map<String, Object>> getSelectedArea(CenterdataTHousingconstructionStoragetank storagetank) {
+        List<Map<String, Object>> list = new ArrayList<>();
+        setSookaDataBase(storagetank);
+        switch (storagetank.getState()){
+            case "1":
+                //钢瓶
+                list = centerdataTHousingconstructionViewMapper.getSteelcylinderArea(storagetank);
+                break;
+            case "2":
+                //用户
+                list = centerdataTHousingconstructionViewMapper.getRealnameuserArea(storagetank);
+                break;
+        }
+        return list;
+    }
+
 }
 }

+ 93 - 3
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionViewMapper.xml

@@ -245,16 +245,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="getDeliverymanList" parameterType="CenterdataTHousingconstructionDeliveryPersonnel" resultType="map">
     <select id="getDeliverymanList" parameterType="CenterdataTHousingconstructionDeliveryPersonnel" resultType="map">
         SELECT
         SELECT
-            a.id,
+            a.id escortId,
             a.staff_name staffName,
             a.staff_name staffName,
             a.phone,
             a.phone,
-            '送货中' type
+            c.speed,
+            a.enterprise_name enterpriseName,
+            c.car_number carNumber,
+            CASE WHEN b.delivery_name IS NULL THEN '未送货' ELSE '送货中' END AS type
         FROM
         FROM
             centerdata_t_housingconstruction_delivery_personnel a
             centerdata_t_housingconstruction_delivery_personnel a
-                LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
+            left join (SELECT DISTINCT delivery_id,delivery_name,car_id from centerdata_t_housingconstruction_steelcylinder_log
+            where sign_time is null) b on a.id = b.delivery_id
+            left join centerdata_t_housingconstruction_car c on b.car_id = c.id
+            LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
         WHERE a.post = 'personnel_psy'
         WHERE a.post = 'personnel_psy'
         <if test="enterpriseId != null  and enterpriseId != ''"> and a.enterprise_id = #{enterpriseId}</if>
         <if test="enterpriseId != null  and enterpriseId != ''"> and a.enterprise_id = #{enterpriseId}</if>
             ${params.dataScope}
             ${params.dataScope}
+        ORDER BY type desc
     </select>
     </select>
 
 
     <select id="getEnterpriseList" parameterType="CenterdataTHousingconstructionEnterprise" resultType="map">
     <select id="getEnterpriseList" parameterType="CenterdataTHousingconstructionEnterprise" resultType="map">
@@ -615,4 +622,87 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE a.enterprise_id = #{enterpriseId}
         WHERE a.enterprise_id = #{enterpriseId}
           and b.dict_type = 'enterprise_qualification_file'
           and b.dict_type = 'enterprise_qualification_file'
     </select>
     </select>
+
+    <select id="getCarShare" resultType="map">
+        SELECT
+            car_number carNumber,
+            COUNT( car_number ) num,
+            GROUP_CONCAT( enterprise_name ) `enterpriseName`
+        FROM
+            centerdata_t_housingconstruction_car
+        GROUP BY
+            car_number
+        HAVING
+            num > 1
+    </select>
+
+    <select id="getSteelCylinderByCar" parameterType="CenterdataTHousingconstructionCar" resultType="map">
+        SELECT
+            SUBSTRING_INDEX( GROUP_CONCAT( l.steelcylinder_name ORDER BY sign_time DESC ), ',', 1 ) steelcylinderName,
+            u.longitude,
+            u.latitude,
+            u.user_name userName,
+            u.gas_address gasAddress,
+            b.address,
+            a.dept_name deptName,
+            a.id steelcylinderId
+        FROM centerdata_t_housingconstruction_steelcylinder_log l
+            left join centerdata_t_housingconstruction_steelcylinder a on a.id = l.steelcylinder_id
+            LEFT JOIN centerdata_t_housingconstruction_realnameuser u ON u.id = l.join_house_id
+            LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
+            LEFT JOIN (SELECT
+                a.steelcylinder_id,
+                GROUP_CONCAT( b.gas_address ORDER BY a.sign_time DESC SEPARATOR '@_@' ) address
+                FROM
+                centerdata_t_housingconstruction_steelcylinder_log a
+                LEFT JOIN centerdata_t_housingconstruction_realnameuser b ON a.join_house_id = b.id
+                GROUP BY
+                a.steelcylinder_id
+            ) b ON l.steelcylinder_id = b.steelcylinder_id
+        where l.car_id = #{id}
+        and  DATE(l.sign_time) = CURDATE()
+        and l.recycling_time is null
+        <if test="enterpriseId != null  and enterpriseId != ''"> and u.enterprise_id = #{enterpriseId}</if>
+        ${params.dataScope}
+        GROUP BY l.steelcylinder_id
+    </select>
+
+    <select id="getSteelcylinderArea" parameterType="CenterdataTHousingconstructionStoragetank" resultType="map">
+        SELECT
+            MAX(a.longitude) maxLongitude,
+            MAX(a.latitude) maxLatitude,
+            MIN(a.longitude) minLongitude,
+            MIN(a.latitude) minLatitude
+        FROM
+        (SELECT
+            SUBSTRING_INDEX( GROUP_CONCAT( l.steelcylinder_name ORDER BY sign_time DESC ), ',', 1 ) steelcylinderName,
+            u.longitude,
+            u.latitude
+        FROM
+            centerdata_t_housingconstruction_steelcylinder_log l
+            LEFT JOIN centerdata_t_housingconstruction_realnameuser u ON u.id = l.join_house_id
+        WHERE
+        l.recycling_time IS NULL
+        AND u.longitude IS NOT NULL
+        <if test="enterpriseId != null  and enterpriseId != ''"> and u.enterprise_id = #{enterpriseId}</if>
+        GROUP BY
+        l.steelcylinder_id ) a
+        having maxLongitude is not null
+    </select>
+
+    <select id="getRealnameuserArea" parameterType="CenterdataTHousingconstructionStoragetank" resultType="map">
+        SELECT
+            MAX( a.longitude ) maxLongitude,
+            MAX( a.latitude ) maxLatitude,
+            MIN( a.longitude ) minLongitude,
+            MIN( a.latitude ) minLatitude
+        FROM
+        centerdata_t_housingconstruction_realnameuser a
+        LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
+        WHERE
+        a.longitude IS NOT NULL
+        <if test="enterpriseId != null  and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
+        ${params.dataScope}
+        having maxLongitude is not null
+    </select>
 </mapper>
 </mapper>