From 74b5d60307823de027c220d9a5e98ce6104822aa Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 十月 2024 09:12:55 +0800
Subject: [PATCH] 汉字“整点”改为"定点",为了以后兼容王江海制定的协议

---
 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java |   42 +++++++++++++++++++++++++++++-------------
 1 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java
index 8bc4a6b..9e38b46 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java
@@ -1,7 +1,6 @@
 package com.dy.pipIrrProject.intakeController;
 
 
-import cn.hutool.core.date.DateTime;
 import com.dy.common.aop.SsoAop;
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
@@ -284,16 +283,15 @@
     @GetMapping(path = "/getTrampControllers")
     @SsoAop()
     public BaseResponse<QueryResultVo<List<PrControllerTramp>>> getTrampControllers(TrampControllerQueryVo vo) {
-
         try {
-            QueryResultVo<List<PrControllerTramp>> res = intakeControllerSv.getTrampControllers(vo);
-            if (res.itemTotal != null && res.itemTotal > 0) {
-                return BaseResponseUtils.buildSuccess(res);
-            } else {
-                //璇锋眰鎴愬姛浣嗘暟鎹负绌�
-                return BaseResponseUtils.buildSuccess(res);
-            }
-            //return BaseResponseUtils.buildSuccess(res);
+            //QueryResultVo<List<PrControllerTramp>> res = intakeControllerSv.getTrampControllers(vo);
+            //if (res.itemTotal != null && res.itemTotal > 0) {
+            //    return BaseResponseUtils.buildSuccess(res);
+            //} else {
+            //    //璇锋眰鎴愬姛浣嗘暟鎹负绌�
+            //    return BaseResponseUtils.buildSuccess(res);
+            //}
+            return BaseResponseUtils.buildSuccess(intakeControllerSv.getTrampControllers(vo));
         } catch (Exception e) {
             log.error("鑾峰彇娴佹氮鎺у埗鍣ㄨ褰曞紓甯�", e);
             return BaseResponseUtils.buildException(e.getMessage());
@@ -313,7 +311,7 @@
         pct.setFindDt(new Date());
         Integer rows = intakeControllerSv.addTrampController(pct);
         if (rows == 0) {
-            return BaseResponseUtils.buildFail(ProjectResultCode.ADD_TRAMP_CONTROLLER_FAIL.getMessage());
+            return BaseResponseUtils.buildErrorMsg(ProjectResultCode.ADD_TRAMP_CONTROLLER_FAIL.getMessage());
         }
         return BaseResponseUtils.buildSuccess(true);
     }
@@ -330,12 +328,30 @@
     public BaseResponse<Boolean> deleteTrampController(Long id) {
         PrControllerTramp controllerInfo = intakeControllerSv.getTrampControllerInfo(id);
         if (controllerInfo == null) {
-            return BaseResponseUtils.buildFail(ProjectResultCode.NO_EXIST_TRAMP_CONTROLLER.getMessage());
+            return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_EXIST_TRAMP_CONTROLLER.getMessage());
         }
 
         Integer rows = intakeControllerSv.deleteTrampController(id);
         if (rows == 0) {
-            return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage());
+            return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage());
+        }
+        return BaseResponseUtils.buildSuccess(true);
+    }
+
+    /**
+     * 娓呯┖娴佹氮鎺у埗鍣�
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("emptyTrampController")
+    @Transactional(rollbackFor = Exception.class)
+    @SsoAop()
+    public BaseResponse<Boolean> emptyTrampController() {
+
+        Integer rows = intakeControllerSv.emptyTrampController();
+        if (rows == 0) {
+            return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage());
         }
         return BaseResponseUtils.buildSuccess(true);
     }

--
Gitblit v1.8.0