Explorar el Código

Merge remote-tracking branch 'origin/demo_' into demo_

hace 1 año
padre
commit
dcb8decd6a

+ 5 - 5
platform-rest/src/main/java/com/platform/rest/controller/preparation/PreparationController.java

@@ -227,7 +227,7 @@ public class PreparationController {
   @SysLog("筹建报表统计导出")
   public void getAllPreparationReportExport(HttpServletResponse response,PreparationDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
     List<AllPreparationReportVO> list = preparationService.getAllPreparationReport(dto, year, startMonth, endMonth);
-    ExcelUtil.exportResponseDict(response, AllPreparationReportVO.class, BeanConverterUtil.copyListProperties(list, AllPreparationReportVO.class), "建报表统计导出");
+    ExcelUtil.exportResponseDict(response, AllPreparationReportVO.class, BeanConverterUtil.copyListProperties(list, AllPreparationReportVO.class), "建筑物报表统计导出");
   }
 
   @GetMapping("/getPreparationDetailReport/export")
@@ -254,7 +254,7 @@ public class PreparationController {
     preparationVO.setFee(totalFee);
     preparationVO.setId("费用汇总");
     preparationVOS.add(preparationVO);
-    ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(preparationVOS, ExportPreparationVO.class), "建报表统计导出");
+    ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(preparationVOS, ExportPreparationVO.class), "建筑物报表统计导出");
   }
 
 
@@ -271,7 +271,7 @@ public class PreparationController {
   @SysLog("筹建类型报表统计导出")
   public void getPreparationTypeReport(HttpServletResponse response,PreparationDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
     List<PreparationReportByStatusVO> preparationReportByStatusVOS = preparationService.getPreparationReportGroupByStatus(dto, year, startMonth, endMonth);
-    ExcelUtil.exportResponseDict(response, PreparationReportByStatusVO.class, BeanConverterUtil.copyListProperties(preparationReportByStatusVOS, PreparationReportByStatusVO.class), "建类型报表统计导出");
+    ExcelUtil.exportResponseDict(response, PreparationReportByStatusVO.class, BeanConverterUtil.copyListProperties(preparationReportByStatusVOS, PreparationReportByStatusVO.class), "建筑物类型报表统计导出");
   }
 
   @GetMapping("/getPreparationReportGroupByStatus/detail/export")
@@ -279,7 +279,7 @@ public class PreparationController {
   public void getPreparationTypeReport2(HttpServletResponse response,PreparationDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
     List<PreparationReportByStatusVO> preparationReportByStatusVOS = preparationService.getPreparationReportGroupByStatus(dto, year, startMonth, endMonth);
     List<PreparationVO> preparationVOS = preparationReportByStatusVOS.get(0).getDetailList();
-    ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(preparationVOS, ExportPreparationVO.class), "建类型明细报表统计导出");
+    ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(preparationVOS, ExportPreparationVO.class), "建筑物类型明细报表统计导出");
   }
 
   @GetMapping("/position/query")
@@ -293,7 +293,7 @@ public class PreparationController {
   public void getPreparationReportExportByPositionId(HttpServletResponse response,PreparationDTO dto) {
     List<ExportPreparationNumVO> exportPreparationNumVOS = preparationService.getPreparationReportByPositionId(dto);
 
-    ExcelUtil.exportResponseDict(response, ExportPreparationNumVO.class, BeanConverterUtil.copyListProperties(exportPreparationNumVOS, ExportPreparationNumVO.class), "建数量-费用统计导出");
+    ExcelUtil.exportResponseDict(response, ExportPreparationNumVO.class, BeanConverterUtil.copyListProperties(exportPreparationNumVOS, ExportPreparationNumVO.class), "建筑物数量-费用统计导出");
 
   }
 

+ 49 - 23
platform-service/src/main/java/com/platform/service/yongyou/impl/YongyouServiceImpl.java

@@ -112,10 +112,15 @@ public class YongyouServiceImpl implements YongyouService {
     }
     private String geToken(Integer type) {
         String token = null;
-        if (type==1) { // 新厂
-            token = RedisUtils.getString(token_key1);
-        }else if (type==2){ // 老厂
-            token = RedisUtils.getString(token_key2);
+        boolean isDev = BeanUtils.isDev();
+        if(!isDev){
+            if (type==1) { // 新厂
+                token = RedisUtils.getString(token_key1);
+            }else if (type==2){ // 老厂
+                token = RedisUtils.getString(token_key2);
+            }
+        }else{
+            token = RedisUtils.getString(token_key_dev);
         }
         if (StringUtils.isBlank(token)) {
             return geTokenForce(type);
@@ -164,10 +169,15 @@ public class YongyouServiceImpl implements YongyouService {
         req.setCSrv("192.168.16.249");
         req.setPUserId("sb");
         req.setPPassword("321.jkl");
-        if (type == 1) { // 新厂
-            req.setPAccId("005");
+        boolean isDev = BeanUtils.isDev();
+        if(!isDev){
+            if (type == 1) { // 新厂
+                req.setPAccId("005");
+            }else{
+                req.setPAccId("004");
+            }
         }else{
-            req.setPAccId("004");
+            req.setPAccId("993");
         }
         req.setPDate(DateUtils.dateToString(LocalDate.now(), DateUtils.PATTERN_YMD));
         req.setPSubId("DP");
@@ -179,14 +189,20 @@ public class YongyouServiceImpl implements YongyouService {
         }
         Login login = response.getData();
         String token = login.getToken();
-        if (type == 1){ // 新厂
-            RedisUtils.setString(token_key1, token, 1800);
-            RedisUtils.setString(Conn_key1, login.getConn(), 1800);
-            RedisUtils.setString(cAcc_ID_key1, login.getCAcc_ID(), 1800);
-        }else if (type == 2){
-            RedisUtils.setString(token_key2, token, 1800);
-            RedisUtils.setString(Conn_key2, login.getConn(), 1800);
-            RedisUtils.setString(cAcc_ID_key2, login.getCAcc_ID(), 1800);
+        if(!isDev){
+            if (type == 1){ // 新厂
+                RedisUtils.setString(token_key1, token, 1800);
+                RedisUtils.setString(Conn_key1, login.getConn(), 1800);
+                RedisUtils.setString(cAcc_ID_key1, login.getCAcc_ID(), 1800);
+            }else if (type == 2){
+                RedisUtils.setString(token_key2, token, 1800);
+                RedisUtils.setString(Conn_key2, login.getConn(), 1800);
+                RedisUtils.setString(cAcc_ID_key2, login.getCAcc_ID(), 1800);
+            }
+        }else{
+            RedisUtils.setString(token_key_dev, token, 1800);
+            RedisUtils.setString(Conn_key_dev, login.getConn(), 1800);
+            RedisUtils.setString(cAcc_ID_key_dev, login.getCAcc_ID(), 1800);
         }
         return token;
     }
@@ -218,10 +234,15 @@ public class YongyouServiceImpl implements YongyouService {
         return RedisUtils.getString(Conn_key);
     }
     private String getConn2(Integer type) {
-        if (type == 1) { // 新厂
-            return RedisUtils.getString(Conn_key1);
-        }else if (type == 2){
-            return RedisUtils.getString(Conn_key2);
+        boolean isDev = BeanUtils.isDev();
+        if(isDev){
+            if (type == 1) { // 新厂
+                return RedisUtils.getString(Conn_key1);
+            }else if (type == 2){
+                return RedisUtils.getString(Conn_key2);
+            }
+        }else{
+            return RedisUtils.getString(Conn_key_dev);
         }
         return null;
     }
@@ -231,10 +252,15 @@ public class YongyouServiceImpl implements YongyouService {
     }
 
     private String getCAccId2(Integer type) {
-        if (type == 1) {
-            return RedisUtils.getString(cAcc_ID_key1);
-        } else if (type == 2) {
-            return RedisUtils.getString(cAcc_ID_key2);
+        boolean isDev = BeanUtils.isDev();
+        if(isDev){
+            if (type == 1) {
+                return RedisUtils.getString(cAcc_ID_key1);
+            } else if (type == 2) {
+                return RedisUtils.getString(cAcc_ID_key2);
+            }
+        }else{
+            return RedisUtils.getString(cAcc_ID_key_dev);
         }
         return null;
     }