From 3b0d2e394dddb504452bb492203bd1b2fff05fde Mon Sep 17 00:00:00 2001
From: 354798ggg <1074825718@qq.com>
Date: 星期三, 28 六月 2023 09:21:07 +0800
Subject: [PATCH] 项目数据统计分析

---
 product-server-project-management/src/main/java/com/product/project/management/controller/ProjectInfoController.java |  115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 112 insertions(+), 3 deletions(-)

diff --git a/product-server-project-management/src/main/java/com/product/project/management/controller/ProjectInfoController.java b/product-server-project-management/src/main/java/com/product/project/management/controller/ProjectInfoController.java
index c09202d..2c561f8 100644
--- a/product-server-project-management/src/main/java/com/product/project/management/controller/ProjectInfoController.java
+++ b/product-server-project-management/src/main/java/com/product/project/management/controller/ProjectInfoController.java
@@ -10,11 +10,13 @@
 import com.product.project.management.config.Cmnconst;
 import com.product.project.management.config.SystemCode;
 import com.product.project.management.service.ProjectInfoService;
+import com.product.core.config.CoreConst;
 import com.product.core.controller.support.AbstractBaseController;
 import com.product.core.entity.FieldSetEntity;
 import com.product.core.exception.BaseException;
 import com.product.module.sys.version.ApiVersion;
 import com.product.util.BaseUtil;
+import com.product.util.ResultInfo;
 
 @RequestMapping("/api/qxlw-project")
 @RestController("qxlw-project-controller")
@@ -24,7 +26,7 @@
 	ProjectInfoService projectInfoService;
 	
 	 /**
-     * 鏍规嵁uuid鑾峰彇椤圭洰璇︽儏
+     *	鑾峰彇妯℃澘椤圭洰鍒嗛」
      * @param request
      * @return
      */
@@ -51,7 +53,7 @@
     }
     
     /**
-     * 鏍规嵁uuid鑾峰彇椤圭洰璇︽儏
+     * 鑾峰彇椤圭洰淇℃伅锛堥」鐩垎椤瑰涓爲锛�
      * @param request
      * @return
      */
@@ -78,7 +80,82 @@
     }
     
     /**
-     * 	鍒嗛」鍒犻櫎楠岃瘉
+     * 	鑾峰彇椤圭洰瀛愯〃鍒嗛」锛堝崟涓爲锛�
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/get-projectAllItem/{version}", method = RequestMethod.POST)
+    @ApiVersion(1)
+    public String getProjectAllItem(HttpServletRequest request){
+        try {
+            // 鑾峰彇鍙傛暟
+            FieldSetEntity fse = BaseUtil.getFieldSetEntity(request);
+            
+            // 鍒ゆ柇uuid鏄惁涓虹┖
+            if (BaseUtil.strIsNull(fse.getString(Cmnconst.PROJECT_UUID))) {
+                return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText());
+            }
+            return OK_List(projectInfoService.getProjectAllItem(fse.getString(Cmnconst.PROJECT_UUID)));
+        } catch (BaseException e) {
+            e.printStackTrace();
+            return this.error(e);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return this.error(SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getValue(),
+                    SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getText() + e.getMessage());
+        }
+    }
+    
+    /**
+     * 	鑾峰彇椤圭洰淇℃伅(鏃犲垎椤靛弬鏁�)
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/list-project/{version}", method = RequestMethod.POST)
+    @ApiVersion(1)
+    public String listProject(HttpServletRequest request) {
+    	try {
+    		return OK_List(projectInfoService.listProject());
+    	} catch (BaseException e) {
+            e.printStackTrace();
+            return this.error(e);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return this.error(SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getValue(),
+            		SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getText() + e.getMessage());
+        }
+    }
+    
+    /**
+     * 	鑾峰彇椤圭洰鍒嗘瀽鏁版嵁
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/statist-analysis-report/{version}", method = RequestMethod.POST)
+    @ApiVersion(1)
+    public String statistAnalysis(HttpServletRequest request) {
+    	try {
+    		//鑾峰彇鍙傛暟
+    		FieldSetEntity fse = BaseUtil.getFieldSetEntity(request);
+    		
+    		//鍒ゆ柇uuid鏄惁涓虹┖
+    		if (BaseUtil.strIsNull(fse.getString(Cmnconst.PROJECT_UUID))) {
+    			return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText());
+    		}
+    		return ResultInfo.success(projectInfoService.statistAnalysis(fse.getString(Cmnconst.PROJECT_UUID)));
+//    		return OK_List(projectInfoService.statistAnalysis(fse.getString(Cmnconst.PROJECT_UUID)));
+    	} catch (BaseException e) {
+            e.printStackTrace();
+            return this.error(e);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return this.error(SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getValue(),
+            		SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getText() + e.getMessage());
+        }
+    }
+    
+    /**
+     * 	鍒犻櫎鍗曚釜椤圭洰鍒嗛」楠岃瘉锛堟牴鎹绠楅獙璇佹槸鍚﹀垹闄わ級
      * @param request
      * @return
      */
@@ -104,4 +181,36 @@
             		SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getText() + e.getMessage());
         }
     }
+    
+    /**
+     * 	鑾峰彇椤圭洰棰勭畻淇℃伅
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/list-itemize-budget/{version}", method = RequestMethod.POST)
+    @ApiVersion(1)
+    public String listItemizeBudget(HttpServletRequest request) {
+    	try {
+    		//鑾峰彇鍙傛暟
+    		FieldSetEntity fse = BaseUtil.getFieldSetEntity(request);
+    		
+    		//鍒ゆ柇uuid鏄惁涓虹┖
+    		if (BaseUtil.strIsNull(fse.getString(Cmnconst.PROJECT_UUID))) {
+    			return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText());
+    		}
+    		
+    		//鍒ゆ柇鍒嗛〉鍙傛暟鏄惁涓虹┖
+    		if (BaseUtil.strIsNull(fse.getString(CoreConst.CPAGE)) || BaseUtil.strIsNull(fse.getString(CoreConst.PAGESIZE))) {
+    			return this.error(SystemCode.SYSTEM_CPAGES_NOT_NULL.getValue(), SystemCode.SYSTEM_CPAGES_NOT_NULL.getText());
+    		}
+    		return OK_List(projectInfoService.listItemizeBudget(fse.getString(Cmnconst.PROJECT_UUID), fse.getString(Cmnconst.ITEMIZE_CODE), fse.getInteger(CoreConst.CPAGE), fse.getInteger(CoreConst.PAGESIZE)));
+    	} catch (BaseException e) {
+            e.printStackTrace();
+            return this.error(e);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return this.error(SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getValue(),
+            		SystemCode.PROJECT_MAMAGERENT_ITEMIZE_GENERAL_ERROR.getText() + e.getMessage());
+        }
+    }
 }

--
Gitblit v1.9.2