Parcourir la source

Merge branch 'master' of http://116.63.33.55/git/nazw

xyg il y a 7 mois
Parent
commit
6daacb3854
27 fichiers modifiés avec 532 ajouts et 92 suppressions
  1. 57 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/controller/SelectionAddrController.java
  2. 8 2
      nngkxxdp/src/main/java/com/example/nngkxxdp/controller/SellBuildController.java
  3. 2 12
      nngkxxdp/src/main/java/com/example/nngkxxdp/controller/sellLandController.java
  4. 38 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/dao/SelectionAddrDao.java
  5. 0 4
      nngkxxdp/src/main/java/com/example/nngkxxdp/dao/SellLandDao.java
  6. 1 1
      nngkxxdp/src/main/java/com/example/nngkxxdp/entity/ExperienceApply.java
  7. 1 1
      nngkxxdp/src/main/java/com/example/nngkxxdp/entity/ReserveOvertime.java
  8. 74 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/entity/SelectionAddr.java
  9. 3 1
      nngkxxdp/src/main/java/com/example/nngkxxdp/entity/SellBuild.java
  10. 0 15
      nngkxxdp/src/main/java/com/example/nngkxxdp/mapper/ParkActivityMapper.java
  11. 9 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/query/SelectionAddrQuery.java
  12. 8 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/query/SellBuildQuery.java
  13. 0 3
      nngkxxdp/src/main/java/com/example/nngkxxdp/query/pageResult.java
  14. 31 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/service/SelectionAddrService.java
  15. 0 4
      nngkxxdp/src/main/java/com/example/nngkxxdp/service/SellLandService.java
  16. 65 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SelectionAddrServiceImpl.java
  17. 25 1
      nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SellBuildServiceImpl.java
  18. 6 10
      nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SellLandServiceImpl.java
  19. 7 0
      nngkxxdp/src/main/java/com/example/nngkxxdp/util/BaseResult.java
  20. 1 1
      nngkxxdp/src/main/resources/mapper/ExperienceApplyDao.xml
  21. 1 1
      nngkxxdp/src/main/resources/mapper/ReserveOvertimeDao.xml
  22. 74 0
      nngkxxdp/src/main/resources/mapper/SelectionAddrMapper.xml
  23. 35 13
      nngkxxdp/src/main/resources/mapper/SellBuildDao.xml
  24. 6 10
      nngkxxdp/src/main/resources/mapper/SellLandDao.xml
  25. 10 0
      nngkxxdp/src/main/resources/static/naxsb/css/qjt.css
  26. 3 2
      nngkxxdp/src/main/resources/static/naxsb/indexsyyg.html
  27. 67 11
      nngkxxdp/src/main/resources/static/naxsb/qjt.html

+ 57 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/SelectionAddrController.java

@@ -0,0 +1,57 @@
+package com.example.nngkxxdp.controller;
+
+import com.example.nngkxxdp.entity.SelectionAddr;
+import com.example.nngkxxdp.query.SelectionAddrQuery;
+import com.example.nngkxxdp.query.pageResult;
+import com.example.nngkxxdp.service.SelectionAddrService;
+import com.example.nngkxxdp.util.BaseResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/selectionAddr")
+public class SelectionAddrController {
+    @Autowired
+    private SelectionAddrService selectionAddrService;
+
+    @GetMapping
+    public List<SelectionAddr> findAll() {
+        return selectionAddrService.findAll();
+    }
+
+    //根据id查询
+    @GetMapping("/{id}")
+    public BaseResult findById(@PathVariable("id")Long id) {
+        try {
+            return BaseResult.ok(selectionAddrService.findById(id));
+        }catch (Exception e){
+            //返回空数组
+            return BaseResult.emptyArray();
+        }
+    }
+
+    //添加或修改
+    @PutMapping
+    public void addOrUpdate(@RequestBody SelectionAddr selectionAddr) {
+        if( selectionAddr.getId()==null){
+            selectionAddrService.insert(selectionAddr);
+        }else{
+            selectionAddrService.update(selectionAddr);
+        }
+    }
+
+    //根据id删除数据
+    @DeleteMapping("/{id}")
+    public BaseResult deleteById(@PathVariable("id")Long id) {
+        selectionAddrService.deleteById(id);
+        return new BaseResult();
+    }
+
+    //分页
+    @PostMapping
+    public pageResult<SelectionAddr> queryPage(@RequestBody SelectionAddrQuery query){
+        return selectionAddrService.queryPage(query);
+    }
+}

+ 8 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/SellBuildController.java

@@ -4,6 +4,7 @@ import com.example.nngkxxdp.entity.SellBuild;
 import com.example.nngkxxdp.query.SellBuildQuery;
 import com.example.nngkxxdp.query.pageResult;
 import com.example.nngkxxdp.service.SellBuildService;
+import com.example.nngkxxdp.util.BaseResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -22,8 +23,13 @@ public class SellBuildController {
 
     //根据id查询
     @GetMapping("/{id}")
-    public SellBuild findById(@PathVariable("id")Long id) {
-        return sellBuildService.findById(id);
+    public BaseResult findById(@PathVariable("id")Long id) {
+        try {
+            return BaseResult.ok(sellBuildService.findById(id));
+        }catch (Exception e){
+            //返回空数组
+            return BaseResult.emptyArray();
+        }
     }
 
     //添加或修改

+ 2 - 12
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/sellLandController.java

@@ -1,6 +1,5 @@
 package com.example.nngkxxdp.controller;
 
-import cn.hutool.db.PageResult;
 import com.example.nngkxxdp.entity.SellLand;
 import com.example.nngkxxdp.query.SellLandQuery;
 import com.example.nngkxxdp.query.pageResult;
@@ -28,9 +27,8 @@ public class sellLandController {
         try {
             return BaseResult.ok(sellLandService.findById(id));
         }catch (Exception e){
-            //返回空数组   TODO
-            //return BaseResult.returnArray();
-            return BaseResult.notOk();
+            //返回空数组
+            return BaseResult.emptyArray();
         }
     }
 
@@ -57,12 +55,4 @@ public class sellLandController {
         return sellLandService.queryPage(query);
     }
 
-
-    @GetMapping("/queryPage")
-    public PageResult getEntitiesWithPaging(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
-        return sellLandService.getEntitiesWithPaging(pageNum, pageSize);
-    }
-
-
-
 }

+ 38 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/dao/SelectionAddrDao.java

@@ -0,0 +1,38 @@
+package com.example.nngkxxdp.dao;
+
+import com.example.nngkxxdp.entity.SelectionAddr;
+import com.example.nngkxxdp.query.SelectionAddrQuery;
+
+import java.util.List;
+
+/**
+* @author zhao
+* @description 针对表【t_selection_addr】的数据库操作Mapper
+* @createDate 2024-09-18 09:18:14
+* @Entity com.example.nngkxxdp.entity.SelectionAddr
+*/
+public interface SelectionAddrDao{
+    //查询全部
+    List<SelectionAddr> findAll();
+
+    //根据id查询
+    SelectionAddr findById(Long id);
+
+    //添加
+    void insert(SelectionAddr selectionAddr);
+
+    //修改
+    void update(SelectionAddr selectionAddr);
+
+    //根据Id删除一条数据
+    void deleteById(Long id);
+
+    Integer queryCount(SelectionAddrQuery query);
+
+
+    List<SelectionAddr> queryData(SelectionAddrQuery query);
+}
+
+
+
+

+ 0 - 4
nngkxxdp/src/main/java/com/example/nngkxxdp/dao/SellLandDao.java

@@ -30,10 +30,6 @@ public interface SellLandDao {
     Integer queryCount(SellLandQuery query);
 
     List<SellLand> queryData(SellLandQuery query);
-
-    List<SellLand> findPagedEntities(int offset, int pageSize);
-
-    long countAll();
 }
 
 

+ 1 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/ExperienceApply.java

@@ -25,7 +25,7 @@ public class ExperienceApply implements Serializable {
     /**
      * 体验员年龄
      */
-    private String experienceAge;
+    private Integer experienceAge;
 
     /**
      * 体验员单位

+ 1 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/ReserveOvertime.java

@@ -24,7 +24,7 @@ public class ReserveOvertime implements Serializable {
     /**
      * 加班表年龄
      */
-    private String overtimeAge;
+    private Integer overtimeAge;
 
     /**
      * 加班表手机号

+ 74 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/SelectionAddr.java

@@ -0,0 +1,74 @@
+package com.example.nngkxxdp.entity;
+
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 
+ * @TableName t_selection_addr
+ */
+
+@Data
+public class SelectionAddr implements Serializable {
+    /**
+     * 智能选址id
+     */
+    private Long id;
+
+    /**
+     * 载体名称
+     */
+    private String carrierName;
+
+    /**
+     * 可用状态
+     */
+    private Integer state;
+
+    /**
+     * 产业板块
+     */
+    private String industryPlate;
+
+    /**
+     * 所属园区
+     */
+    private Long belong;
+
+    /**
+     * 联系地址
+     */
+    private String addr;
+
+    /**
+     * 联系人
+     */
+    private String contactsName;
+
+    /**
+     * 联系电话
+     */
+    private String contactsPhone;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 图片地址
+     */
+    private String imgUrl;
+
+    /**
+     * 创建时间
+     */
+    private Date creatTime;
+
+    private ParkData parkData;
+
+    private static final long serialVersionUID = 1L;
+}

+ 3 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/SellBuild.java

@@ -11,6 +11,8 @@ import java.util.Date;
 */
 @Data
 public class SellBuild implements Serializable {
+    private Float spaceMax;
+    private Float spaceMin;
     private ParkData parkData;
     /**
     * 载体出让Id
@@ -26,7 +28,7 @@ public class SellBuild implements Serializable {
     * 面积(平方米)
     */
 
-    private String space;
+    private Float space;
     /**
     * 用途
     */

+ 0 - 15
nngkxxdp/src/main/java/com/example/nngkxxdp/mapper/ParkActivityMapper.java

@@ -1,15 +0,0 @@
-//package com.example.nngkxxdp.mapper;
-//
-///**
-//* @author zhao
-//* @description 针对表【t_park_activity】的数据库操作Mapper
-//* @createDate 2024-09-14 15:51:37
-//* @Entity com.example.nngkxxdp.entity.ParkActivity
-//*/
-//public interface ParkActivityMapper {
-//
-//}
-//
-//
-//
-//

+ 9 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/query/SelectionAddrQuery.java

@@ -0,0 +1,9 @@
+package com.example.nngkxxdp.query;
+
+import com.example.nngkxxdp.base.BaseQuery;
+import lombok.Data;
+
+@Data
+public class SelectionAddrQuery extends BaseQuery {
+    private Long parkId;
+}

+ 8 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/query/SellBuildQuery.java

@@ -5,5 +5,13 @@ import lombok.Data;
 
 @Data
 public class SellBuildQuery extends BaseQuery {
+    //所属园区
     private Long parkId;
+    //用途
+    private String application;
+    //面积
+   // private Float space;
+    private Float spaceMax;
+    private Float spaceMin;
+    private String space1;
 }

+ 0 - 3
nngkxxdp/src/main/java/com/example/nngkxxdp/query/pageResult.java

@@ -13,7 +13,4 @@ public class pageResult<T>{
     private Integer totals;
     private List<T> list;
 
-
-
-
 }

+ 31 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/service/SelectionAddrService.java

@@ -0,0 +1,31 @@
+package com.example.nngkxxdp.service;
+
+import com.example.nngkxxdp.entity.SelectionAddr;
+import com.example.nngkxxdp.query.SelectionAddrQuery;
+import com.example.nngkxxdp.query.pageResult;
+
+import java.util.List;
+
+/**
+* @author zhao
+* @description 针对表【t_selection_addr】的数据库操作Service
+* @createDate 2024-09-18 09:18:14
+*/
+public interface SelectionAddrService {
+    //查询全部
+    List<SelectionAddr> findAll();
+
+    //根据id查询
+    SelectionAddr findById(Long id);
+
+    //添加
+    void insert(SelectionAddr selectionAddr);
+
+    //修改
+    void update(SelectionAddr selectionAddr);
+
+    //根据Id删除一条数据
+    void deleteById(Long id);
+
+    pageResult<SelectionAddr> queryPage(SelectionAddrQuery query);
+}

+ 0 - 4
nngkxxdp/src/main/java/com/example/nngkxxdp/service/SellLandService.java

@@ -1,6 +1,5 @@
 package com.example.nngkxxdp.service;
 
-import cn.hutool.db.PageResult;
 import com.example.nngkxxdp.entity.SellLand;
 import com.example.nngkxxdp.query.SellLandQuery;
 import com.example.nngkxxdp.query.pageResult;
@@ -29,7 +28,4 @@ public interface SellLandService{
     void deleteById(Long id);
     pageResult<SellLand> queryPage(SellLandQuery query);
 
-    PageResult getEntitiesWithPaging(int pageNum, int pageSize);
-
-
 }

+ 65 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SelectionAddrServiceImpl.java

@@ -0,0 +1,65 @@
+package com.example.nngkxxdp.service.impl;
+
+import com.example.nngkxxdp.base.BusinessException;
+import com.example.nngkxxdp.dao.SelectionAddrDao;
+import com.example.nngkxxdp.entity.SelectionAddr;
+import com.example.nngkxxdp.query.SelectionAddrQuery;
+import com.example.nngkxxdp.query.pageResult;
+import com.example.nngkxxdp.service.SelectionAddrService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @author zhao
+* @description 针对表【t_selection_addr】的数据库操作Service实现
+* @createDate 2024-09-18 09:18:14
+*/
+@Service
+public class SelectionAddrServiceImpl implements SelectionAddrService{
+    @Autowired
+    private SelectionAddrDao selectionAddrDao;
+
+    @Override
+    public List<SelectionAddr> findAll() {
+        return selectionAddrDao.findAll();
+    }
+
+    @Override
+    public SelectionAddr findById(Long id) {
+        SelectionAddr byId = selectionAddrDao.findById(id);
+        if(byId==null){
+            throw new BusinessException("no data");
+        }
+        return byId;
+    }
+
+    @Override
+    public void insert(SelectionAddr selectionAddr) {
+        selectionAddr.setCreatTime(new Date());
+        selectionAddrDao.insert(selectionAddr);
+    }
+
+    @Override
+    public void update(SelectionAddr selectionAddr) {
+        selectionAddrDao.update(selectionAddr);
+    }
+
+    @Override
+    public void deleteById(Long id) {
+        selectionAddrDao.deleteById(id);
+    }
+
+    @Override
+    public pageResult<SelectionAddr> queryPage(SelectionAddrQuery query) {
+        Integer totals = selectionAddrDao.queryCount(query);
+        List<SelectionAddr> list = selectionAddrDao.queryData(query);
+        return new pageResult<>(totals,list);
+    }
+}
+
+
+
+

+ 25 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SellBuildServiceImpl.java

@@ -1,5 +1,6 @@
 package com.example.nngkxxdp.service.impl;
 
+import com.example.nngkxxdp.base.BusinessException;
 import com.example.nngkxxdp.dao.SellBuildDao;
 import com.example.nngkxxdp.entity.SellBuild;
 import com.example.nngkxxdp.query.SellBuildQuery;
@@ -28,7 +29,11 @@ public class SellBuildServiceImpl implements SellBuildService{
 
     @Override
     public SellBuild findById(Long id) {
-        return sellBuildDao.findById(id);
+        SellBuild byId = sellBuildDao.findById(id);
+        if(byId==null){
+            throw new BusinessException("no data");
+        }
+        return byId;
     }
 
     @Override
@@ -49,6 +54,25 @@ public class SellBuildServiceImpl implements SellBuildService{
 
     @Override
     public pageResult<SellBuild> queryPage(SellBuildQuery query) {
+        //没传递参数 查询所有
+        if(query.getSpace1() == null && (query.getApplication() == null || query.getApplication().trim().isEmpty()) && query.getParkId() == null){
+            List<SellBuild> all = sellBuildDao.findAll();
+            return new pageResult<>(all.size(),all);
+        }
+        //判断面积参数  是否是字符串数组
+        if(query.getSpace1()!=null && !query.getSpace1().trim().isEmpty()){
+            String[] parts = query.getSpace1().replace("[", "").replace("]", "").split(",");
+            if (parts.length == 2) {
+                try {
+                    float spaceMin = Float.parseFloat(parts[0].trim());
+                    float spaceMax = Float.parseFloat(parts[1].trim());
+                    query.setSpaceMin(spaceMin);
+                    query.setSpaceMax(spaceMax);
+                }catch (Exception e){
+                    throw new BusinessException("参数异常");
+                }
+            }
+        }
         Integer totals = sellBuildDao.queryCount(query);
         List<SellBuild> list = sellBuildDao.queryData(query);
         return new pageResult<>(totals,list);

+ 6 - 10
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/SellLandServiceImpl.java

@@ -1,6 +1,7 @@
 package com.example.nngkxxdp.service.impl;
 
 import cn.hutool.db.PageResult;
+import com.example.nngkxxdp.base.BusinessException;
 import com.example.nngkxxdp.dao.SellLandDao;
 import com.example.nngkxxdp.entity.SellLand;
 import com.example.nngkxxdp.query.SellLandQuery;
@@ -29,7 +30,11 @@ public class SellLandServiceImpl implements SellLandService{
 
     @Override
     public SellLand findById(Long id) {
-        return sellLandDao.findById(id);
+        SellLand byId = sellLandDao.findById(id);
+        if(byId==null){
+            throw new BusinessException("no data");
+        }
+        return byId;
     }
 
     @Override
@@ -57,15 +62,6 @@ public class SellLandServiceImpl implements SellLandService{
         return new pageResult<>(totals,list);
     }
 
-    @Override
-    public PageResult getEntitiesWithPaging(int pageNum, int pageSize) {
-        int offset = (pageNum - 1) * pageSize;
-        List<SellLand> list = sellLandDao.findPagedEntities(offset, pageSize);
-        long total = sellLandDao.countAll();
-        return new PageResult();
-    }
-
-
 }
 
 

+ 7 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/util/BaseResult.java

@@ -1,6 +1,7 @@
 package com.example.nngkxxdp.util;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 
 /**
  * @author zhoupeng
@@ -70,6 +71,12 @@ public class BaseResult implements Serializable {
         return createResult("not_ok", null, success);
     }
 
+    //返回空数组
+    public static BaseResult emptyArray() {
+        ArrayList<Object> list = new ArrayList<>();
+        list.add(null);
+        return createResult("not_ok", list, "操作失败");
+    }
 
 
     private static BaseResult createResult(String result, Object data, String success) {

+ 1 - 1
nngkxxdp/src/main/resources/mapper/ExperienceApplyDao.xml

@@ -7,7 +7,7 @@
     <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.ExperienceApply">
             <id property="id" column="id" jdbcType="INTEGER"/>
             <result property="experienceName" column="experience_name" jdbcType="VARCHAR"/>
-            <result property="experienceAge" column="experience_age" jdbcType="VARCHAR"/>
+            <result property="experienceAge" column="experience_age" jdbcType="INTEGER"/>
             <result property="workunit" column="workunit" jdbcType="VARCHAR"/>
             <result property="duty" column="duty" jdbcType="VARCHAR"/>
             <result property="experiencePhone" column="experience_phone" jdbcType="VARCHAR"/>

+ 1 - 1
nngkxxdp/src/main/resources/mapper/ReserveOvertimeDao.xml

@@ -7,7 +7,7 @@
     <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.ReserveOvertime">
             <id property="id" column="id" jdbcType="INTEGER"/>
             <result property="overtimeName" column="overtime_name" jdbcType="VARCHAR"/>
-            <result property="overtimeAge" column="overtime_age" jdbcType="VARCHAR"/>
+            <result property="overtimeAge" column="overtime_age" jdbcType="INTEGER"/>
             <result property="overtimePhone" column="overtime_phone" jdbcType="VARCHAR"/>
             <result property="business" column="business" jdbcType="VARCHAR"/>
             <result property="creatTime" column="creat_time" jdbcType="TIMESTAMP"/>

+ 74 - 0
nngkxxdp/src/main/resources/mapper/SelectionAddrMapper.xml

@@ -0,0 +1,74 @@
+<?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.example.nngkxxdp.dao.SelectionAddrDao">
+
+    <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.SelectionAddr">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="carrierName" column="carrier_name" jdbcType="VARCHAR"/>
+            <result property="state" column="state" jdbcType="INTEGER"/>
+            <result property="industryPlate" column="industry_plate" jdbcType="VARCHAR"/>
+            <result property="belong" column="belong" jdbcType="INTEGER"/>
+            <result property="addr" column="addr" jdbcType="VARCHAR"/>
+            <result property="contactsName" column="contacts_name" jdbcType="VARCHAR"/>
+            <result property="contactsPhone" column="contacts_phone" jdbcType="VARCHAR"/>
+            <result property="remark" column="remark" jdbcType="VARCHAR"/>
+            <result property="imgUrl" column="img_url" jdbcType="VARCHAR"/>
+            <result property="creatTime" column="creat_time" jdbcType="TIMESTAMP"/>
+        <association property="parkData" javaType="com.example.nngkxxdp.entity.ParkData">
+            <result column="title" property="title"/>
+            <result column="id" property="id"/>
+        </association>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,carrier_name,state,
+        industry_plate,belong,addr,
+        contacts_name,contacts_phone,remark,
+        img_url,creat_time
+    </sql>
+    <insert id="insert" parameterType="com.example.nngkxxdp.entity.SelectionAddr" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
+        insert into t_selection_addr(carrier_name,state,industry_plate,belong,addr,contacts_name,contacts_phone,remark,img_url,creat_time)
+        values(#{carrierName},#{state},#{industryPlate},#{belong},#{addr},#{contactsName},#{contactsPhone},#{remark},#{imgUrl},#{creatTime})
+    </insert>
+    <update id="update">
+        update t_selection_addr
+        set carrier_name = #{carrierName},
+            state = #{state},
+            industry_plate = #{industryPlate},
+            belong = #{belong},
+            addr = #{addr},
+            contacts_name = #{contactsName},
+            contacts_phone = #{contactsPhone},
+            remark = #{remark},
+            img_url = #{imgUrl}
+        where id = #{id}
+    </update>
+    <delete id="deleteById">
+        delete from t_selection_addr where id = #{id}
+    </delete>
+    <select id="findAll" resultType="com.example.nngkxxdp.entity.SelectionAddr">
+        select * from t_selection_addr
+    </select>
+    <select id="findById" resultType="com.example.nngkxxdp.entity.SelectionAddr">
+        select * from t_selection_addr where id = #{id}
+    </select>
+    <select id="queryCount" resultType="java.lang.Integer">
+        select count(*) from t_selection_addr
+        <if test="parkId != null">
+            where belong = #{parkId}
+        </if>
+    </select>
+    <select id="queryData" resultType="com.example.nngkxxdp.entity.SelectionAddr" resultMap="BaseResultMap">
+        select sa.*,pd.title from
+        t_selection_addr sa
+        left join t_park_data pd on pd.id=sa.belong
+        <if test="parkId != null">
+            where belong = #{parkId}
+        </if>
+        limit #{begin},#{pageSize}
+    </select>
+
+
+</mapper>

+ 35 - 13
nngkxxdp/src/main/resources/mapper/SellBuildDao.xml

@@ -7,7 +7,7 @@
     <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.SellBuild">
             <id property="id" column="id" jdbcType="INTEGER"/>
             <result property="area" column="area" jdbcType="VARCHAR"/>
-            <result property="space" column="space" jdbcType="VARCHAR"/>
+            <result property="space" column="space" jdbcType="FLOAT"/>
             <result property="application" column="application" jdbcType="VARCHAR"/>
             <result property="carrierName" column="carrier_name" jdbcType="VARCHAR"/>
             <result property="subtitle" column="subtitle" jdbcType="VARCHAR"/>
@@ -27,6 +27,9 @@
             <result property="checkin" column="checkin" jdbcType="VARCHAR"/>
             <result property="remark" column="remark" jdbcType="VARCHAR"/>
             <result property="createTime" column="create_time" jdbcType="VARCHAR"/>
+            <result property="spaceMin" column="spaceMin" jdbcType="FLOAT"/>
+            <result property="spaceMax" column="spaceMax" jdbcType="FLOAT"/>
+
          <association property="parkData" javaType="com.example.nngkxxdp.entity.ParkData">
             <result column="title" property="title"/>
             <result column="id" property="id"/>
@@ -35,8 +38,6 @@
            </association>
     </resultMap>
 
-
-
     <insert id="insert" parameterType="com.example.nngkxxdp.entity.SellBuild" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
         insert into t_sell_build (area,space,application,carrier_name,subtitle,situation_state,product_module,belong,point,img_url,tag,basic_configuration,usable_area,addr,contact_name,contact_phone,introduce,cost,checkin,remark,create_time)
         values(#{area},#{space},#{application},#{carrierName},#{subtitle},#{situationState},#{productModule},#{belong},#{point},#{imgUrl},#{tag},#{basicConfiguration},#{usableArea},#{addr},#{contactName},#{contactPhone},#{introduce},#{cost},#{checkin},#{remark},#{createTime})
@@ -44,7 +45,7 @@
     <update id="update">
         update t_sell_build
         set area = #{area},
-             space = #{space},
+            space = #{space},
              application = #{application},
              carrier_name = #{carrierName},
              subtitle = #{subtitle},
@@ -78,16 +79,37 @@
         where sb.id =#{id}
     </select>
     <select id="queryCount" resultType="java.lang.Integer">
-        select count(*) from t_sell_build
-        <if test="parkId != null">
-            where belong = #{parkId}
-        </if>
+        /*select count(*) from t_sell_build*/
+        select count(*)
+        from t_sell_build sb
+        left join t_park_data pd on pd.id = sb.belong
+        <where>
+            <if test="parkId != null">
+                belong = #{parkId}
+            </if>
+            <if test="application != null">
+                or application = #{application}
+            </if>
+            <if test="spaceMin != null and spaceMax != null">
+                or (space &gt;= #{spaceMin} and space &lt;= #{spaceMax})
+            </if>
+        </where>
     </select>
-    <select id="queryData" resultType="com.example.nngkxxdp.entity.SellBuild">
-        select * from t_sell_build
-        <if test="parkId != null">
-            where belong = #{parkId}
-        </if>
+    <select id="queryData" resultType="com.example.nngkxxdp.entity.SellBuild" resultMap="BaseResultMap">
+        select sb.*, sb.addr as landAddr,pd.title,pd.industry, pd.addr as parkAddr
+        from t_sell_build  sb
+        left join t_park_data pd on pd.id=sb.belong
+        <where>
+            <if test="parkId != null">
+                 belong = #{parkId}
+            </if>
+            <if test="application != null">
+                or application = #{application}
+            </if>
+            <if test="spaceMin != null and spaceMax != null">
+                or (space &gt;= #{spaceMin} and space &lt;= #{spaceMax})
+            </if>
+        </where>
         limit #{begin},#{pageSize}
     </select>
 </mapper>

+ 6 - 10
nngkxxdp/src/main/resources/mapper/SellLandDao.xml

@@ -38,9 +38,7 @@
         insert into t_sell_land(land_name,land_area,land_function,basic_configuration,usable_area,addr,contact_name,contact_phone,introduce,water,electricity,natural_gas,cost,labour,img_url,remark,belong_park,point,create_time)
         values(#{landName},#{landArea},#{landFunction},#{basicConfiguration},#{usableArea},#{addr},#{contactName},#{contactPhone},#{introduce},#{water},#{electricity},#{naturalGas},#{cost},#{labour},#{imgUrl},#{remark},#{belongPark},#{point},#{createTime})
     </insert>
-    <insert id="countAll">
-        select count(*) from t_sell_land
-    </insert>
+
     <update id="update">
         update t_sell_land
         set land_name = #{landName},
@@ -81,16 +79,14 @@
             where belong_park = #{parkId}
         </if>
     </select>
-    <select id="queryData" resultType="com.example.nngkxxdp.entity.SellLand">
-        select * from t_sell_land
+    <select id="queryData" resultType="com.example.nngkxxdp.entity.SellLand" resultMap="BaseResultMap">
+        select ts.*, ts.addr as landAddr,pd.title,pd.id,pd.addr as parkAddr
+        from t_sell_land ts
+        left join t_park_data pd on pd.id=ts.belong_park
         <if test="parkId != null">
             where belong_park = #{parkId}
         </if>
         limit #{begin},#{pageSize}
     </select>
-    <select id="findPagedEntities" resultType="com.example.nngkxxdp.entity.SellLand">
-        SELECT *
-        FROM t_sell_land
-        LIMIT ${offset}, ${limit}
-    </select>
+
 </mapper>

+ 10 - 0
nngkxxdp/src/main/resources/static/naxsb/css/qjt.css

@@ -247,4 +247,14 @@ body {
     height: 9%;
     background-image: url(../images/qjttitle.png);
     background-size: 100% 100%;
+}
+
+@keyframes counterAnimation {
+    from { opacity: 0; transform: translateY(-10px); }
+    to { opacity: 1; transform: translateY(0); }
+}
+
+.number.animate {
+    visibility: visible;
+    animation: counterAnimation 0.3s ease-out forwards;
 }

+ 3 - 2
nngkxxdp/src/main/resources/static/naxsb/indexsyyg.html

@@ -119,6 +119,7 @@
             font-size: 5rem;
             color: #FFFFFF;
             white-space: nowrap;
+            margin-left: 30px;
         }
 
         #titleTabs {
@@ -239,8 +240,8 @@
         </div>
         <div class="title">
             <div class="left">
-                <span>重庆市南岸区</span>
-                <span style="letter-spacing: 10px;">重庆经开区</span>
+                <span style="letter-spacing: 4px; width: 230px;">重庆市南岸区</span>
+                <span style="letter-spacing: 13px; width: 230px;">重庆经开区</span>
             </div>
             <div class="right">
                 园区服务平台

+ 67 - 11
nngkxxdp/src/main/resources/static/naxsb/qjt.html

@@ -58,7 +58,7 @@
                                     <div class="top radio">1号楼当前排队人数:</div>
                                     <div class="bottom">
                                         <img src="images/floor1.png" alt="">
-                                        <div><span class="number">12</span>
+                                        <div><span class="number" id="currWaitPeople">-</span>
                                             <span>人</span>
                                         </div>
                                     </div>
@@ -67,7 +67,7 @@
                                     <div class="top radio">可办事项数量:</div>
                                     <div class="bottom">
                                         <img src="images/floor2.png" alt="">
-                                        <div><span class="number">798</span>
+                                        <div><span class="number" id="taskNum">-</span>
                                             <span>项</span>
                                         </div>
                                     </div>
@@ -76,7 +76,7 @@
                                     <div class="top radio">平均等待时长:</div>
                                     <div class="bottom">
                                         <img src="images/floor3.png" alt="">
-                                        <div><span class="number">2</span>
+                                        <div><span class="number" id="waitTime">-</span>
                                             <span>分钟</span>
                                         </div>
                                     </div>
@@ -85,7 +85,7 @@
                                     <div class="top radio">窗口数:</div>
                                     <div class="bottom">
                                         <img src="images/floor4.png" alt="">
-                                        <div><span class="number">28</span>
+                                        <div><span class="number" id="winNum">-</span>
                                             <span>个</span>
                                         </div>
                                     </div>
@@ -99,7 +99,7 @@
                                     <div class="top radio">2号楼当前排队人数:</div>
                                     <div class="bottom">
                                         <img src="images/floor1.png" alt="">
-                                        <div><span class="number">12</span>
+                                        <div><span class="number" id="currWaitPeople2">-</span>
                                             <span>人</span>
                                         </div>
                                     </div>
@@ -108,7 +108,7 @@
                                     <div class="top radio">可办事项数量:</div>
                                     <div class="bottom">
                                         <img src="images/floor2.png" alt="">
-                                        <div><span class="number">798</span>
+                                        <div><span class="number" id="taskNum2">-</span>
                                             <span>项</span>
                                         </div>
                                     </div>
@@ -117,7 +117,7 @@
                                     <div class="top radio">平均等待时长:</div>
                                     <div class="bottom">
                                         <img src="images/floor3.png" alt="">
-                                        <div><span class="number">2</span>
+                                        <div><span class="number" id="waitTime2">-</span>
                                             <span>分钟</span>
                                         </div>
                                     </div>
@@ -126,7 +126,7 @@
                                     <div class="top radio">窗口数:</div>
                                     <div class="bottom">
                                         <img src="images/floor4.png" alt="">
-                                        <div><span class="number">28</span>
+                                        <div><span class="number" id="winNum2">-</span>
                                             <span>个</span>
                                         </div>
                                     </div>
@@ -143,7 +143,7 @@
                                     <div class="right">
                                         <span>本日办理数量</span>
                                         <div class="number">
-                                            <span>98</span>
+                                            <span id="currDayTaskNum">-</span>
                                             <span>项</span>
                                         </div>
                                     </div>
@@ -155,7 +155,7 @@
                                     <div class="right">
                                         <span>本月办理数量</span>
                                         <div class="number">
-                                            <span>1298</span>
+                                            <span id="currMonthTaskNum">-</span>
                                             <span>项</span>
                                         </div>
                                     </div>
@@ -167,7 +167,7 @@
                                     <div class="right">
                                         <span>本年办理数量</span>
                                         <div class="number">
-                                            <span>6298</span>
+                                            <span id="currYearTaskNum">-</span>
                                             <span>项</span>
                                         </div>
                                     </div>
@@ -400,6 +400,10 @@
         render();
         // 创建控件对象
         let controls = new THREE.OrbitControls(camera, renderer.domElement);
+        controls.enableZoom = false
+        // controls.enableRotate = false
+        controls.maxPolarAngle = Math.PI / 2
+        controls.minPolarAngle = 0
         // 监听鼠标、键盘事件
         controls.addEventListener('change', render);
         // 辅助线
@@ -521,5 +525,57 @@
 
     option && myChart.setOption(option);
 </script>
+<script>
+    function animateValue(obj, start, end, duration) {
+        let startTimestamp = null;
+        const step = (timestamp) => {
+            if (!startTimestamp) startTimestamp = timestamp;
+            const progress = Math.min((timestamp - startTimestamp) / duration, 1);
+            obj.innerHTML = Math.floor(progress * (end - start) + start);
+            if (progress < 1) {
+                window.requestAnimationFrame(step);
+            } else {
+                obj.classList.remove('animate');
+            }
+        };
+        obj.classList.add('animate');
+        window.requestAnimationFrame(step);
+    }
+    const time = 2 * 1000;
+
+    // 1号楼当前排队人数
+    const currWaitPeopleElement = document.getElementById('currWaitPeople');
+    animateValue(currWaitPeopleElement, 0, 12, time);
+    // 1号楼可办事项数量
+    const taskNumElement = document.getElementById('taskNum');
+    animateValue(taskNumElement, 0, 798, time);
+    // 1号楼平均等待时长
+    const waitTimeElement = document.getElementById('waitTime');
+    animateValue(waitTimeElement, 0, 2, time);
+    // 1号楼窗口数
+    const winNumElement = document.getElementById('winNum');
+    animateValue(winNumElement, 0, 28, time);
+    // 2号楼当前排队人数
+    const currWaitPeopleElement2 = document.getElementById('currWaitPeople2');
+    animateValue(currWaitPeopleElement2, 0, 6, time);
+    // 2号楼可办事项数量
+    const taskNumElement2 = document.getElementById('taskNum2');
+    animateValue(taskNumElement2, 0, 321, time);
+    // 2号楼平均等待时长
+    const waitTimeElement2 = document.getElementById('waitTime2');
+    animateValue(waitTimeElement2, 0, 7, time);
+    // 2号楼窗口数
+    const winNumElement2 = document.getElementById('winNum2');
+    animateValue(winNumElement2, 0, 11, time);
+    // 本日办理数量
+    const currTaskNumElement = document.getElementById('currDayTaskNum');
+    animateValue(currTaskNumElement, 0, 98, time);
+    // 本月办理数量
+    const currMonthTaskNumElement = document.getElementById('currMonthTaskNum');
+    animateValue(currMonthTaskNumElement, 0, 1298, time);
+    // 本年办理数量
+    const currYearTaskNumElement = document.getElementById('currYearTaskNum');
+    animateValue(currYearTaskNumElement, 0, 6298, time);
+</script>
 
 </html>