From fc15aa768cdb6c48ee8b21a5f43570c2f955a9ff Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期三, 22 五月 2024 11:46:04 +0800
Subject: [PATCH] 场地状态,首页统计
---
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java | 85 ++++++++++
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectMapper.xml | 5
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 146 ++++++++++++-----
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/edit.html | 8 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java | 19 ++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/HoleMedia.java | 13 +
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/add.html | 8 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/enums/RecordType.java | 14
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleMediaService.java | 7
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectMapper.java | 6
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMediaMapper.xml | 5
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMediaMapper.java | 6
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectService.java | 5
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleMediaServiceImpl.java | 46 +++--
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectServiceImpl.java | 10 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java | 9 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Project.java | 15 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java | 12 +
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/project.html | 26 +-
19 files changed, 357 insertions(+), 88 deletions(-)
diff --git a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
index e8b3d7a..65725e7 100644
--- a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
+++ b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
@@ -10,14 +10,20 @@
import com.javaweb.common.utils.Arith;
import com.javaweb.common.utils.StringUtils;
import com.javaweb.geo.domain.Hole;
+import com.javaweb.geo.domain.HoleMedia;
import com.javaweb.geo.domain.Project;
+import com.javaweb.geo.enums.RecordType;
import com.javaweb.geo.mapper.HoleMapper;
+import com.javaweb.geo.service.IHoleMediaService;
+import com.javaweb.geo.service.IHoleService;
import com.javaweb.geo.service.IProjectService;
+import com.javaweb.geo.vo.IndexVo;
import com.javaweb.geo.vo.ProjectProcessVO;
import com.javaweb.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
+import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import com.javaweb.common.config.Global;
import com.javaweb.common.core.controller.BaseController;
@@ -35,12 +41,11 @@
/**
* 棣栭〉 涓氬姟澶勭悊
- *
+ *
* @author ruoyi
*/
@Controller
-public class SysIndexController extends BaseController
-{
+public class SysIndexController extends BaseController {
@Autowired
private ISysMenuService menuService;
@@ -51,9 +56,12 @@
private IProjectService projectService;
@Autowired
- private HoleMapper holeMapper;
+ private IHoleService holeService;
- private String getAdminIndex(){
+ @Autowired
+ private IHoleMediaService holeMediaService;
+
+ private String getAdminIndex() {
return configService.selectConfigByKey(CmsConstants.KEY_ADMIN_INDEX);
}
@@ -64,8 +72,7 @@
// 绯荤粺棣栭〉
@GetMapping("/index")
- public String index(ModelMap mmap)
- {
+ public String index(ModelMap mmap) {
// 鍙栬韩浠戒俊鎭�
SysUser user = ShiroUtils.getSysUser();
// 鏍规嵁鐢ㄦ埛id鍙栧嚭鑿滃崟
@@ -76,9 +83,9 @@
mmap.put("demoEnabled", Global.isDemoEnabled());
String indePage = this.getAdminIndex();
- if(CmsConstants.ADMIN_INDEX_TOP_MENU.equals(indePage)){
+ if (CmsConstants.ADMIN_INDEX_TOP_MENU.equals(indePage)) {
return CmsConstants.ADMIN_INDEX_TOP_MENU; // index_topMenu
- }else{
+ } else {
return "index";
}
}
@@ -86,53 +93,50 @@
// 绯荤粺棣栭〉椤堕儴鑿滃崟
@PostMapping("/index/getMenu")
@ResponseBody
- public AjaxResult getMenu(HttpServletRequest request)
- {
+ public AjaxResult getMenu(HttpServletRequest request) {
// 鍙栬韩浠戒俊鎭�
SysUser user = ShiroUtils.getSysUser();
// 鏍规嵁鐢ㄦ埛id鍙栧嚭鑿滃崟
List<SysMenu> menus = menuService.selectMenusByUser(user);
return AjaxResult.success(menus);
}
+
// 鍒囨崲涓婚
@GetMapping("/system/switchSkin")
- public String switchSkin(ModelMap mmap)
- {
+ public String switchSkin(ModelMap mmap) {
return "skin";
}
// 绯荤粺浠嬬粛
@GetMapping("/system/main")
- public String main(ModelMap mmap)
- {
+ public String main(ModelMap mmap) {
mmap.put("version", Global.getVersion());
-
+
return "main";
}
// 绯荤粺浠嬬粛
@ResponseBody
@GetMapping("/system/project")
- public AjaxResult project()
- {
+ public AjaxResult project() {
AjaxResult ajaxResult = AjaxResult.success();
List<Project> projects = projectService.selectProjectList(new Project());
- ajaxResult.put("projects",projects);
+ ajaxResult.put("projects", projects);
return ajaxResult;
}
+
/**
* 鎬昏繘搴�
* @return
*/
@ResponseBody
@GetMapping("/system/totalProcess")
- public AjaxResult totalProcess()
- {
+ public AjaxResult totalProcess() {
AjaxResult ajaxResult = AjaxResult.success();
- Hole hole = holeMapper.selectHoleTotalProcess();
- Double data = Arith.div(hole.getFootageCpl(),hole.getFootage(),2) ;
- ajaxResult.put("pointerData",data);
+ Hole hole = holeService.selectHoleTotalProcess();
+ Double data = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2);
+ ajaxResult.put("pointerData", data);
return ajaxResult;
}
@@ -142,35 +146,85 @@
*/
@ResponseBody
@GetMapping("/system/projectProcess")
- public AjaxResult projectProcess()
- {
+ public AjaxResult projectProcess() {
AjaxResult ajaxResult = AjaxResult.success();
- List<Hole> holes = holeMapper.selectHoleProjectProcess();
- Map<String,Double> holeMap = new HashMap<>();
- for(Hole hole : holes){
- Double val = Arith.div(hole.getFootageCpl(),hole.getFootage(),2) ;
- val = Arith.round(val * 100,2);
- holeMap.put(hole.getProjectId(),val) ;
+ List<Hole> holes = holeService.selectHoleProjectProcess();
+ Map<String, Double> holeMap = new HashMap<>();
+ for (Hole hole : holes) {
+ Double val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2);
+ val = Arith.round(val * 100, 2);
+ holeMap.put(hole.getProjectId(), val);
}
List<Project> projects = projectService.selectProjectList(new Project());
- List<ProjectProcessVO> vos = new ArrayList<>();
- for(int i = 0 ; i<projects.size();i++ ){
- String ids= projects.get(i).getIds();
- Double val = holeMap.get(ids);
- ProjectProcessVO vo = new ProjectProcessVO();
- vo.setRanking(i + 1);
- vo.setStation(projects.get(i).getCode());
- vo.setValue(val);
- if(val==null){
- vo.setValue(0.0d);
+ List<ProjectProcessVO> vos = new ArrayList<>();
+ ProjectProcessVO vo;
+ if (!ObjectUtils.isEmpty(projects)) {
+ for (int i = 0; i < projects.size(); i++) {
+ String ids = projects.get(i).getIds();
+ Double val = holeMap.get(ids);
+ vo = new ProjectProcessVO();
+ vo.setRanking(i + 1);
+ vo.setStation(projects.get(i).getCode());
+ vo.setValue(val);
+ if (val == null) {
+ vo.setValue(0.0d);
+ }
+ vo.setStatus(projects.get(i).getStatus());
+ vos.add(vo);
}
- vos.add(vo);
}
-
- ajaxResult.put("projectData",vos);
+ ajaxResult.put("projectData", vos);
return ajaxResult;
}
-
+
+
+ /**
+ * 鏁伴噺缁熻
+ *
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("/system/indexVo")
+ public AjaxResult projectProcess2() {
+ IndexVo result = new IndexVo();
+
+ //=============================鏌ヨ鍦哄湴鏁伴噺===============================
+ List<Project> projectList = projectService.selectProjectCountByStatus();
+ if (!ObjectUtils.isEmpty(projectList)) {
+ for (Project item : projectList) {
+ if (RecordType.projectStatus0.getId().equals(item.getStatus())) {
+ result.setProjectStatus0(item.getStatusNumber());
+ }
+ if (RecordType.projectStatus1.getId().equals(item.getStatus())) {
+ result.setProjectStatus0(item.getStatusNumber());
+ }
+ if (RecordType.projectStatus2.getId().equals(item.getStatus())) {
+ result.setProjectStatus0(item.getStatusNumber());
+ }
+ }
+ }
+ if (ObjectUtils.isEmpty(result.getProjectStatus1())) {
+ result.setProjectStatus0(0);
+ }
+ if (ObjectUtils.isEmpty(result.getProjectStatus2())) {
+ result.setProjectStatus0(0);
+ }
+ if (ObjectUtils.isEmpty(result.getProjectStatus2())) {
+ result.setProjectStatus0(0);
+ }
+
+ //=============================鏌ヨ杩涘昂===============================
+ Hole hole = holeService.selectHoleTotalProcess();
+ result.setFootageCplCount(hole.getFootageCpl());
+ result.setFootageCount(hole.getFootage());
+
+ //=============================鏌ヨ璧勬枡===============================
+ HoleMedia holeMedia = holeMediaService.selectHoleMediaNumber();
+ result.setFileCount(holeMedia.getNumber());
+
+ return AjaxResult.success("鏌ヨ鎴愬姛",result);
+ }
+
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/HoleMedia.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/HoleMedia.java
index 6f2240d..612f284 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/HoleMedia.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/HoleMedia.java
@@ -61,6 +61,11 @@
@Excel(name = "涓婁紶浜�")
private String uploadUser;
+ /**
+ * 缁熻璧勬枡鏁伴噺
+ */
+ private Long number;
+
public void setIds(String ids) {
this.ids = ids;
}
@@ -125,6 +130,14 @@
this.projectId = projectId;
}
+ public Long getNumber() {
+ return number;
+ }
+
+ public void setNumber(Long number) {
+ this.number = number;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Project.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Project.java
index 30c8989..23a6750 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Project.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Project.java
@@ -120,6 +120,9 @@
@Excel(name = "椤圭洰鐘舵��")
private String status;
+ /** 缁熻鐘舵�佹暟閲� */
+ private Integer statusNumber;
+
/** 鏄惁鍒犻櫎 */
@Excel(name = "鏄惁鍒犻櫎")
private String isDeleted;
@@ -149,6 +152,7 @@
/** 鏁版嵁鏉ユ簮 */
private String dataSource;
+
public Integer getHoleNum() {
return holeNum;
@@ -300,7 +304,16 @@
{
return status;
}
- public void setIsDeleted(String isDeleted)
+
+ public Integer getStatusNumber() {
+ return statusNumber;
+ }
+
+ public void setStatusNumber(Integer statusNumber) {
+ this.statusNumber = statusNumber;
+ }
+
+ public void setIsDeleted(String isDeleted)
{
this.isDeleted = isDeleted;
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/enums/RecordType.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/enums/RecordType.java
index 47780ca..7523a2e 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/enums/RecordType.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/enums/RecordType.java
@@ -9,6 +9,13 @@
deviceLog_out("out","鍑哄簱"),
/**
+ * 鍑哄叆搴撶姸鎬�
+ */
+ projectStatus0("0","鏈崗璋�"),
+ projectStatus1("1","宸插崗璋�"),
+ projectStatus2("2","鏂藉伐涓�"),
+
+ /**
* 璁板綍鍒嗙被锛堝繀濉紝鐩存帴濉啓姹夊瓧锛屽洜鑰冭檻鍘嗗彶鏁版嵁鍘熷洜锛�
* 鈥滄満闀库�濊〃绀哄徃閽诲憳锛�
* 鍥炴銆佸博鍦熴�佸彇鍦熴�佹爣璐�佸姩鎺€�佹按浣嶃�佸彇姘淬�佽礋璐d汉銆佸伐绋嬪笀銆佹満闀裤�侀捇鏈�
@@ -25,13 +32,6 @@
jz("鏈洪暱","鏈洪暱"),
zj("閽绘満","閽绘満"),
-
-
- /**
- * 椤圭洰鐘舵��
- */
- projectStatus0("0","椤圭洰鏈畬鎴�"),
- projectStatus1("1","椤圭洰楠屾敹瀹屾垚"),
/**
* 鏄惁鍒犻櫎
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMediaMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMediaMapper.java
index 96d4bce..bb831cc 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMediaMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMediaMapper.java
@@ -69,4 +69,10 @@
public int deleteHoleMediaByIds(String[] idss);
Long countNumberByProjectId(@Param("projectId") String projectId);
+
+ /**
+ * 缁熻璧勬枡鏁伴噺
+ * @return
+ */
+ HoleMedia selectHoleMediaNumber();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectMapper.java
index b5b4a6c..843ca1a 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectMapper.java
@@ -63,5 +63,9 @@
*/
public int deleteProjectByIds(String[] idss);
-
+ /**
+ * 鏌ヨ鍦哄湴鏁伴噺
+ * @return
+ */
+ List<Project> selectProjectCountByStatus();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleMediaService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleMediaService.java
index e3bcbc8..449e4c0 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleMediaService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleMediaService.java
@@ -58,4 +58,11 @@
* @return 缁撴灉
*/
public int deleteHoleMediaById(String ids);
+
+ /**
+ * 缁熻璧勬枡鏁伴噺
+ *
+ * @return
+ */
+ HoleMedia selectHoleMediaNumber();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java
index 95f9c43..e21605a 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java
@@ -65,4 +65,16 @@
* 瀵煎叆閽诲瓟
*/
String importHole(String projectId, MultipartFile file, boolean updateSupport);
+
+ /**
+ * 鎬昏繘搴�
+ * @return
+ */
+ Hole selectHoleTotalProcess();
+
+ /**
+ * 鍦哄湴杩涘害
+ * @return
+ */
+ List<Hole> selectHoleProjectProcess();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectService.java
index 4ff19bb..2f54fce 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectService.java
@@ -62,4 +62,9 @@
public int deleteProjectById(String ids);
+ /**
+ * 鏌ヨ鍦哄湴鏁伴噺
+ * @return
+ */
+ List<Project> selectProjectCountByStatus();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleMediaServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleMediaServiceImpl.java
index 8830912..7aa0a2d 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleMediaServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleMediaServiceImpl.java
@@ -1,6 +1,7 @@
package com.javaweb.geo.service.impl;
import java.util.List;
+
import com.javaweb.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -11,86 +12,89 @@
/**
* 閽诲瓟鍥剧墖銆佽棰慡ervice涓氬姟灞傚鐞�
- *
+ *
* @author zmk
* @date 2022-10-20
*/
@Service
-public class HoleMediaServiceImpl implements IHoleMediaService
-{
+public class HoleMediaServiceImpl implements IHoleMediaService {
@Autowired
private HoleMediaMapper holeMediaMapper;
/**
* 鏌ヨ閽诲瓟鍥剧墖銆佽棰�
- *
+ *
* @param ids 閽诲瓟鍥剧墖銆佽棰慖D
* @return 閽诲瓟鍥剧墖銆佽棰�
*/
@Override
- public HoleMedia selectHoleMediaById(String ids)
- {
+ public HoleMedia selectHoleMediaById(String ids) {
return holeMediaMapper.selectHoleMediaById(ids);
}
/**
* 鏌ヨ閽诲瓟鍥剧墖銆佽棰戝垪琛�
- *
+ *
* @param holeMedia 閽诲瓟鍥剧墖銆佽棰�
* @return 閽诲瓟鍥剧墖銆佽棰�
*/
@Override
- public List<HoleMedia> selectHoleMediaList(HoleMedia holeMedia)
- {
+ public List<HoleMedia> selectHoleMediaList(HoleMedia holeMedia) {
return holeMediaMapper.selectHoleMediaList(holeMedia);
}
/**
* 鏂板閽诲瓟鍥剧墖銆佽棰�
- *
+ *
* @param holeMedia 閽诲瓟鍥剧墖銆佽棰�
* @return 缁撴灉
*/
@Override
- public int insertHoleMedia(HoleMedia holeMedia)
- {
+ public int insertHoleMedia(HoleMedia holeMedia) {
holeMedia.setCreateTime(DateUtils.getNowDate());
return holeMediaMapper.insertHoleMedia(holeMedia);
}
/**
* 淇敼閽诲瓟鍥剧墖銆佽棰�
- *
+ *
* @param holeMedia 閽诲瓟鍥剧墖銆佽棰�
* @return 缁撴灉
*/
@Override
- public int updateHoleMedia(HoleMedia holeMedia)
- {
+ public int updateHoleMedia(HoleMedia holeMedia) {
return holeMediaMapper.updateHoleMedia(holeMedia);
}
/**
* 鍒犻櫎閽诲瓟鍥剧墖銆佽棰戝璞�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@Override
- public int deleteHoleMediaByIds(String ids)
- {
+ public int deleteHoleMediaByIds(String ids) {
return holeMediaMapper.deleteHoleMediaByIds(Convert.toStrArray(ids));
}
/**
* 鍒犻櫎閽诲瓟鍥剧墖銆佽棰戜俊鎭�
- *
+ *
* @param ids 閽诲瓟鍥剧墖銆佽棰慖D
* @return 缁撴灉
*/
@Override
- public int deleteHoleMediaById(String ids)
- {
+ public int deleteHoleMediaById(String ids) {
return holeMediaMapper.deleteHoleMediaById(ids);
}
+
+ /**
+ * 缁熻璧勬枡鏁伴噺
+ *
+ * @return
+ */
+ @Override
+ public HoleMedia selectHoleMediaNumber() {
+ return holeMediaMapper.selectHoleMediaNumber();
+ }
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
index da794c3..6db62e6 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
@@ -182,6 +182,25 @@
return "瀵煎叆瀹屾瘯" ;
}
+ /**
+ * 鎬昏繘搴�
+ * @return
+ */
+ @Override
+ public Hole selectHoleTotalProcess() {
+ return holeMapper.selectHoleTotalProcess();
+ }
+
+ /**
+ * 鍦哄湴杩涘害
+ * @return
+ */
+ @Override
+ public List<Hole> selectHoleProjectProcess() {
+ return holeMapper.selectHoleProjectProcess();
+ }
+
+
private String saveExcel(MultipartFile file) {
String filename = file.getOriginalFilename();
File dir = new File(fileSaveDir);
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectServiceImpl.java
index 4b4bedc..980ada2 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectServiceImpl.java
@@ -88,9 +88,17 @@
*/
@Override
public int deleteProjectById(String ids) {
-
return projectMapper.deleteProjectById(ids);
}
+ /**
+ * 鏌ヨ鍦哄湴鏁伴噺
+ * @return
+ */
+ @Override
+ public List<Project> selectProjectCountByStatus() {
+ return projectMapper.selectProjectCountByStatus();
+ }
+
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java
new file mode 100644
index 0000000..83c111b
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java
@@ -0,0 +1,85 @@
+package com.javaweb.geo.vo;
+
+/**
+ * @author mzy-cxy
+ */
+public class IndexVo {
+ /**
+ * 鏈崗璋�
+ */
+ private Integer projectStatus0;
+
+ /**
+ * 宸插崗璋�
+ */
+ private Integer projectStatus1;
+
+ /**
+ * 鏂藉伐涓�
+ */
+ private Integer projectStatus2;
+
+ /**
+ * 鎬昏繘灏�
+ */
+ private Double footageCount;
+
+ /**
+ * 宸插畬鎴愯繘灏�
+ */
+ private Double footageCplCount;
+
+ /**
+ * 璧勬枡
+ */
+ private Long fileCount;
+
+
+ public Integer getProjectStatus0() {
+ return projectStatus0;
+ }
+
+ public void setProjectStatus0(Integer projectStatus0) {
+ this.projectStatus0 = projectStatus0;
+ }
+
+ public Integer getProjectStatus1() {
+ return projectStatus1;
+ }
+
+ public void setProjectStatus1(Integer projectStatus1) {
+ this.projectStatus1 = projectStatus1;
+ }
+
+ public Integer getProjectStatus2() {
+ return projectStatus2;
+ }
+
+ public void setProjectStatus2(Integer projectStatus2) {
+ this.projectStatus2 = projectStatus2;
+ }
+
+ public Double getFootageCount() {
+ return footageCount;
+ }
+
+ public void setFootageCount(Double footageCount) {
+ this.footageCount = footageCount;
+ }
+
+ public Double getFootageCplCount() {
+ return footageCplCount;
+ }
+
+ public void setFootageCplCount(Double footageCplCount) {
+ this.footageCplCount = footageCplCount;
+ }
+
+ public Long getFileCount() {
+ return fileCount;
+ }
+
+ public void setFileCount(Long fileCount) {
+ this.fileCount = fileCount;
+ }
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
index 750fc8d..90a8497 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
@@ -9,6 +9,7 @@
private Integer ranking;
private String station;
private Double value;
+ private String status;
public Integer getRanking() {
return ranking;
@@ -33,4 +34,12 @@
public void setValue(Double value) {
this.value = value;
}
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
}
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMediaMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMediaMapper.xml
index ac8fb25..300b3ab 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMediaMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMediaMapper.xml
@@ -14,6 +14,7 @@
<result property="internetPath" column="internet_path" />
<result property="createUser" column="create_user" />
<result property="uploadUser" column="upload_user" />
+ <result property="number" column="number" />
</resultMap>
<sql id="selectHoleMediaVo">
@@ -42,6 +43,10 @@
SELECT count(ids) FROM js_hole_media where project_id = #{projectId}
</select>
+ <select id="selectHoleMediaNumber" resultMap="HoleMediaResult">
+ select count(ids) as number from js_hole_media
+ </select>
+
<insert id="insertHoleMedia" parameterType="HoleMedia">
insert into js_hole_media
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectMapper.xml
index 0c001e6..7f15c0d 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectMapper.xml
@@ -23,6 +23,7 @@
<result property="serialNumber" column="serial_number" />
<result property="describe" column="describe" />
<result property="status" column="status" />
+ <result property="statusNumber" column="status_number" />
<result property="isDeleted" column="is_deleted" />
<result property="statusChangeUser" column="status_change_user" />
<result property="statusChangeReason" column="status_change_reason" />
@@ -60,6 +61,10 @@
WHERE ids = #{ids}
</select>
+ <select id="selectProjectCountByStatus" resultMap="ProjectResult">
+ SELECT `status`, count( * ) as status_number FROM js_project GROUP BY `status`
+ </select>
+
<insert id="insertProject" parameterType="Project">
insert into js_project
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/add.html
index df294da..0e494de 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/add.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/add.html
@@ -21,6 +21,14 @@
<input name="fullName" class="form-control" required type="text">
</div>
</div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍦哄湴鐘舵�侊細</label>
+ <div class="col-sm-8">
+ <select name="status" class="form-control m-b" th:with="type=${@dict.getType('project_status')}">
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+ </select>
+ </div>
+ </div>
<div class="form-group">
<label class="col-sm-3 control-label">鍖哄幙锛�</label>
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/edit.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/edit.html
index ef256ce..511673c 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/edit.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/edit.html
@@ -22,6 +22,14 @@
</div>
</div>
<div class="form-group">
+ <label class="col-sm-3 control-label">鍦哄湴鐘舵�侊細</label>
+ <div class="col-sm-8">
+ <select name="status" class="form-control m-b" th:with="type=${@dict.getType('project_status')}">
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
<label class="col-sm-3 control-label">鍖哄幙锛�</label>
<div class="col-sm-8">
<select name="district" class="form-control m-b" th:with="type=${@dict.getType('sys_district')}">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/project.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/project.html
index 3384ce3..1e158f1 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/project.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/project.html
@@ -20,6 +20,13 @@
<input type="text" name="code"/>
</li>
<li>
+ <p>椤圭洰鐘舵�侊細</p>
+ <select name="status" th:with="type=${@dict.getType('project_status')}">
+ <option value="">鎵�鏈�</option>
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+ </select>
+ </li>
+ <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 鎼滅储</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 閲嶇疆</a>
</li>
@@ -48,6 +55,7 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('geo:project:edit')}]];
var removeFlag = [[${@permission.hasPermi('geo:project:remove')}]];
+ var statusDatas = [[${@dict.getType('project_status')}]];
var prefix = ctx + "geo/project";
$(function() {
@@ -96,17 +104,13 @@
field : 'createTime',
title : '鍒涘缓鏃堕棿'
},
- {
- field : 'status',
- title : '鍦哄湴鐘舵��',
- formatter: function(value, row, index) {
- if(row.status =='0'){
- return "鏈獙鏀�";
- }else{
- return "楠屾敹";
- }
- }
- },
+ {
+ field : 'status',
+ title : '椤圭洰鐘舵��',
+ formatter: function(value, row, index) {
+ return $.table.selectDictLabel(statusDatas, value);
+ }
+ },
{
title: '鎿嶄綔',
align: 'center',
--
Gitblit v1.9.1