From dedc58a07f35de04e2c322ef57ed27d2432472cd Mon Sep 17 00:00:00 2001 From: eastargh Date: Mon, 13 Jul 2026 15:24:30 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=EB=9F=89=EC=A0=9C=EC=96=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=EC=9E=84=EA=B3=84=EC=B9=98=EA=B0=80=20null?= =?UTF-8?q?=20or=20=EB=8B=A8=EC=9C=84=EC=84=A0=ED=83=9D=20=EC=95=8A?= =?UTF-8?q?=ED=95=98=EB=A9=B4=200=EC=9C=BC=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inflow/inflowClientControlManDetail.jsp | 1 + .../InflowClientControlManController.java | 22 ++++++++++--------- .../inflow/InflowControlManService.java | 9 ++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/WebContent/jsp/onl/admin/inflow/inflowClientControlManDetail.jsp b/WebContent/jsp/onl/admin/inflow/inflowClientControlManDetail.jsp index db4bf9a..54c0cd9 100644 --- a/WebContent/jsp/onl/admin/inflow/inflowClientControlManDetail.jsp +++ b/WebContent/jsp/onl/admin/inflow/inflowClientControlManDetail.jsp @@ -298,6 +298,7 @@ $(document).ready(function() { url: url, data: postData, success: function(args) { + console.log('mod', args); showAlert("<%= localeMessage.getString("common.saveMsg") %>", { type: 'success', title: '저장 완료', diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowClientControlManController.java b/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowClientControlManController.java index 897414d..a680058 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowClientControlManController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowClientControlManController.java @@ -19,7 +19,9 @@ import com.eactive.eai.agent.command.CommonCommand; import com.eactive.eai.rms.common.base.OnlBaseAnnotationController; import com.eactive.eai.rms.common.combo.ComboService; import com.eactive.eai.rms.common.combo.ComboVo; +import com.eactive.eai.rms.common.util.CommonUtil; import com.eactive.eai.rms.common.vo.GridResponse; +import com.eactive.eai.rms.common.vo.SimpleResponse; @Controller public class InflowClientControlManController extends OnlBaseAnnotationController { @@ -55,22 +57,22 @@ public class InflowClientControlManController extends OnlBaseAnnotationControlle } @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=UPDATE") - public String save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui) + public ResponseEntity save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui) throws Exception { service.mergeClient(ui); - CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand", - ui.getName()); - agentUtilService.broadcast(command); - return null; + CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand", ui.getName()); + HashMap returnMap = agentUtilService.broadcast(command); + SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true)); + return ResponseEntity.ok(simpleResponse); } @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=DELETE") - public String delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception { + public ResponseEntity delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception { service.deleteClient(name); - CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand", - name); - agentUtilService.broadcast(command); - return null; + CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand", name); + HashMap returnMap = agentUtilService.broadcast(command); + SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true)); + return ResponseEntity.ok(simpleResponse); } @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=LIST_INIT_COMBO") diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowControlManService.java b/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowControlManService.java index 27708b0..10e604a 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowControlManService.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/inflow/inflow/InflowControlManService.java @@ -72,6 +72,9 @@ public class InflowControlManService extends BaseService { } else { entity = mapper.toEntity(ui); } + if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) { + entity.setThreshold(0); + } service.save(entity); } @@ -102,6 +105,9 @@ public class InflowControlManService extends BaseService { } else { entity = mapper.toEntity(ui); } + if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) { + entity.setThreshold(0); + } service.save(entity); } @@ -133,6 +139,9 @@ public class InflowControlManService extends BaseService { } else { entity = mapper.toEntity(ui); } + if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) { + entity.setThreshold(0); + } service.save(entity); }