유량제어 추가임계치가 null or 단위선택 않하면 0으로 설정
eapim-admin CI / build (push) Waiting to run

This commit is contained in:
eastargh
2026-07-13 15:24:30 +09:00
parent 4530af9dec
commit dedc58a07f
3 changed files with 22 additions and 10 deletions
@@ -298,6 +298,7 @@ $(document).ready(function() {
url: url, url: url,
data: postData, data: postData,
success: function(args) { success: function(args) {
console.log('mod', args);
showAlert("<%= localeMessage.getString("common.saveMsg") %>", { showAlert("<%= localeMessage.getString("common.saveMsg") %>", {
type: 'success', type: 'success',
title: '저장 완료', title: '저장 완료',
@@ -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.base.OnlBaseAnnotationController;
import com.eactive.eai.rms.common.combo.ComboService; import com.eactive.eai.rms.common.combo.ComboService;
import com.eactive.eai.rms.common.combo.ComboVo; 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.GridResponse;
import com.eactive.eai.rms.common.vo.SimpleResponse;
@Controller @Controller
public class InflowClientControlManController extends OnlBaseAnnotationController { public class InflowClientControlManController extends OnlBaseAnnotationController {
@@ -55,22 +57,22 @@ public class InflowClientControlManController extends OnlBaseAnnotationControlle
} }
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=UPDATE") @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=UPDATE")
public String save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui) public ResponseEntity<SimpleResponse> save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui)
throws Exception { throws Exception {
service.mergeClient(ui); service.mergeClient(ui);
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand", CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand", ui.getName());
ui.getName()); HashMap<String, Object> returnMap = agentUtilService.broadcast(command);
agentUtilService.broadcast(command); SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true));
return null; return ResponseEntity.ok(simpleResponse);
} }
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=DELETE") @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=DELETE")
public String delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception { public ResponseEntity<SimpleResponse> delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception {
service.deleteClient(name); service.deleteClient(name);
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand", CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand", name);
name); HashMap<String, Object> returnMap = agentUtilService.broadcast(command);
agentUtilService.broadcast(command); SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true));
return null; return ResponseEntity.ok(simpleResponse);
} }
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=LIST_INIT_COMBO") @RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=LIST_INIT_COMBO")
@@ -72,6 +72,9 @@ public class InflowControlManService extends BaseService {
} else { } else {
entity = mapper.toEntity(ui); entity = mapper.toEntity(ui);
} }
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
entity.setThreshold(0);
}
service.save(entity); service.save(entity);
} }
@@ -102,6 +105,9 @@ public class InflowControlManService extends BaseService {
} else { } else {
entity = mapper.toEntity(ui); entity = mapper.toEntity(ui);
} }
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
entity.setThreshold(0);
}
service.save(entity); service.save(entity);
} }
@@ -133,6 +139,9 @@ public class InflowControlManService extends BaseService {
} else { } else {
entity = mapper.toEntity(ui); entity = mapper.toEntity(ui);
} }
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
entity.setThreshold(0);
}
service.save(entity); service.save(entity);
} }