From e1f1023dee5d094fcb1e428f36cce09211c4542a Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 08 九月 2025 11:29:11 +0800 Subject: [PATCH] 蒸腾改为蒸散 --- pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/TestCtrl.java | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/TestCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/TestCtrl.java index d018757..dc7f626 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/TestCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/TestCtrl.java @@ -14,11 +14,11 @@ /** * @Author: liurunyu * @Date: 2025/8/22 10:20 - * @Description 涓嶈鍒犻櫎锛侊紒锛� 涓哄墠绔捀鑵鹃噺璁$畻鎻愪緵鐨勬湇鍔� + * @Description 涓嶈鍒犻櫎锛侊紒锛� 涓哄墠绔捀鏁i噺璁$畻鎻愪緵鐨勬湇鍔� */ @Slf4j -@Tag(name = "浣滅墿鏃ヨ捀鑵鹃噺璁$畻娴嬭瘯", description = "浣滅墿鏃ヨ捀鑵鹃噺璁$畻娴嬭瘯") +@Tag(name = "浣滅墿鏃ヨ捀鏁i噺璁$畻娴嬭瘯", description = "浣滅墿鏃ヨ捀鏁i噺璁$畻娴嬭瘯") @RestController @RequestMapping(path = "mdTest") public class TestCtrl { @@ -51,7 +51,23 @@ } return BaseResponseUtils.buildSuccess(vo); } catch (Exception e) { - log.error("鏌ヨ鎵�鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲忓紓甯�", e); + log.error("鏌ヨ鎵�鏈変綔鐗╃殑鏄ㄦ棩钂告暎閲忓紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } + + /** + * 璁$畻鏃ュ簭 + */ + @GetMapping(path = "dateIndex") + @SsoAop() + public BaseResponse<Integer> dateIndex(String y_m_d){ + try { + Long days = DateTime.daysBetweenyyyy_MM_dd(y_m_d, y_m_d.substring(0, 4) + "-01-01"); + Integer dateIndex = days.intValue() + 1 ; + return BaseResponseUtils.buildSuccess(dateIndex); + } catch (Exception e) { + log.error("璁$畻鏃ュ簭寮傚父", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } @@ -73,8 +89,14 @@ Double et0 = Hargreaves.ET0(qo.kc, qo.maxTmp, qo.minTmp, zenithRadiation); return BaseResponseUtils.buildSuccess(et0); } catch (Exception e) { - log.error("鏌ヨ鎵�鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲忓紓甯�", e); + log.error("鏌ヨ鎵�鏈変綔鐗╃殑鏄ㄦ棩钂告暎閲忓紓甯�", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } + + public static void main(String[] args) { + String ymd = "2025-08-22" ; + String year = ymd.substring(0, 4) ; + System.out.println(year); + } } -- Gitblit v1.8.0