|
@ -4,7 +4,6 @@ import cn.hutool.json.JSONUtil; |
|
|
import com.qyft.gd.common.constant.Commands; |
|
|
import com.qyft.gd.common.constant.Commands; |
|
|
import com.qyft.gd.common.result.CMDResultCode; |
|
|
import com.qyft.gd.common.result.CMDResultCode; |
|
|
import com.qyft.gd.device.service.DeviceService; |
|
|
import com.qyft.gd.device.service.DeviceService; |
|
|
import com.qyft.gd.device.service.DeviceStateService; |
|
|
|
|
|
import com.qyft.gd.model.form.CMDForm; |
|
|
import com.qyft.gd.model.form.CMDForm; |
|
|
import com.qyft.gd.model.vo.ExecutionResult; |
|
|
import com.qyft.gd.model.vo.ExecutionResult; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -19,14 +18,16 @@ import java.util.function.Supplier; |
|
|
public class CMDService { |
|
|
public class CMDService { |
|
|
|
|
|
|
|
|
DeviceService deviceService; |
|
|
DeviceService deviceService; |
|
|
DeviceStateService deviceStateService; |
|
|
|
|
|
WebSocketService webSocketService; |
|
|
WebSocketService webSocketService; |
|
|
Map<String, Function<CMDForm, Boolean>> commandMap; |
|
|
|
|
|
|
|
|
BaseDataService baseDataService; |
|
|
|
|
|
Map<String, Function<Map<String, Object>, List<Supplier<Boolean>>>> commandMap; |
|
|
|
|
|
CMDForm form; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
public CMDService(DeviceService deviceService , WebSocketService webSocketService) { |
|
|
|
|
|
|
|
|
public CMDService(DeviceService deviceService , WebSocketService webSocketService, BaseDataService baseDataService) { |
|
|
this.deviceService = deviceService; |
|
|
this.deviceService = deviceService; |
|
|
this.webSocketService = webSocketService; |
|
|
this.webSocketService = webSocketService; |
|
|
|
|
|
this.baseDataService = baseDataService; |
|
|
// 初始化命令映射 |
|
|
// 初始化命令映射 |
|
|
this.commandMap = new HashMap<>(); |
|
|
this.commandMap = new HashMap<>(); |
|
|
commandMap.put(Commands.UP_TRAY, this::upTray); |
|
|
commandMap.put(Commands.UP_TRAY, this::upTray); |
|
@ -45,149 +46,169 @@ public class CMDService { |
|
|
commandMap.put(Commands.MOVE_TO_HEAT_AREA, this::moveToHeatArea); |
|
|
commandMap.put(Commands.MOVE_TO_HEAT_AREA, this::moveToHeatArea); |
|
|
} |
|
|
} |
|
|
// 移至加热 |
|
|
// 移至加热 |
|
|
private boolean moveToHeatArea(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> moveToHeatArea(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(1,2,3)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(1,2,3)); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,5,6)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,5,6)); |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 移动单个试管 |
|
|
// 移动单个试管 |
|
|
private Boolean moveTube(CMDForm cmdForm) { |
|
|
|
|
|
//TODO 执行指令 |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean> >moveTube(Map<String, Object> params) { |
|
|
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(11,22,33)); |
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 机械臂 |
|
|
// 机械臂 |
|
|
private Boolean moveMachineArm(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> moveMachineArm(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(11,22,33)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(11,22,33)); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 装回盖子 |
|
|
// 装回盖子 |
|
|
private Boolean putBackCap(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> putBackCap(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(11,22,33)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(11,22,33)); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,54,6)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,54,6)); |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 取试管架盖 |
|
|
// 取试管架盖 |
|
|
private Boolean takeOffCap(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> takeOffCap(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(13,42,53)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(13,42,53)); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,5,6)); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,5,6)); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 拍照 |
|
|
// 拍照 |
|
|
private Boolean takePhoto(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> takePhoto(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.takePhoto()); |
|
|
cmdList.add(() -> deviceService.takePhoto()); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 停止加热 |
|
|
// 停止加热 |
|
|
private Boolean stopHeat(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> stopHeat(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.stopHeating((String) cmdForm.getParams().get("areaId"))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
|
|
cmdList.add(() -> deviceService.stopHeating(hardwareId)); |
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 开始加热 |
|
|
// 开始加热 |
|
|
private Boolean startHeat(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> startHeat(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.startHeating((String) cmdForm.getParams().get("areaId"),(Double) cmdForm.getParams().get("temperature"))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
|
|
cmdList.add(() -> deviceService.startHeating(hardwareId, (Double) params.get("temperature"))); |
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 开始摇匀 |
|
|
// 开始摇匀 |
|
|
private Boolean startShakeUp(CMDForm cmdForm) { |
|
|
|
|
|
// deviceService.startShaking(); |
|
|
|
|
|
// Timer timer = new Timer(); |
|
|
|
|
|
// TimerTask task = new TimerTask() { |
|
|
|
|
|
// @Override |
|
|
|
|
|
// public void run() { |
|
|
|
|
|
// deviceService.stopShaking(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }; |
|
|
|
|
|
// timer.schedule(task, 1000); |
|
|
|
|
|
// return true; |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> startShakeUp(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
|
|
cmdList.add(() -> deviceService.setShakingSpeed((Integer) params.get("speed"))); |
|
|
cmdList.add(() -> deviceService.startShaking()); |
|
|
cmdList.add(() -> deviceService.startShaking()); |
|
|
cmdList.add(() -> deviceService.setShakingSpeed((Integer) cmdForm.getParams().get("speed"))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 结束摇匀 |
|
|
// 结束摇匀 |
|
|
private Boolean stopShakeUp(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> stopShakeUp(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.stopShaking()); |
|
|
cmdList.add(() -> deviceService.stopShaking()); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 移至加液 |
|
|
// 移至加液 |
|
|
private Boolean moveToActionArea(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> moveToActionArea(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
// 加液位是否有托盘 |
|
|
|
|
|
// Boolean liquidTrayStatus = deviceStateService.getDeviceStatus().getLiquidTrayStatus(); |
|
|
|
|
|
// if(liquidTrayStatus) { |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(1, 2, 3)); |
|
|
|
|
|
|
|
|
Map<String ,Object> map = baseDataService.getOffsetMap(); |
|
|
|
|
|
String heatAreaPosition = baseDataService.getHeatAreaPositionById((Integer) params.get("areaId")); |
|
|
|
|
|
String [] heatAreaPositionArr =heatAreaPosition.split(","); |
|
|
|
|
|
int x1 = Integer.parseInt(heatAreaPositionArr[0]); |
|
|
|
|
|
int y1 = Integer.parseInt(heatAreaPositionArr[1]); |
|
|
|
|
|
int z1 = Integer.parseInt(heatAreaPositionArr[2]); |
|
|
|
|
|
|
|
|
|
|
|
String solutionAreaPosition = baseDataService.getSolutionAreaPosition(); |
|
|
|
|
|
String [] solutionAreaPositionArr = solutionAreaPosition.split(","); |
|
|
|
|
|
int x2 = Integer.parseInt(solutionAreaPositionArr[0]); |
|
|
|
|
|
int y2 = Integer.parseInt(solutionAreaPositionArr[1]); |
|
|
|
|
|
int z2 = Integer.parseInt(solutionAreaPositionArr[2]); |
|
|
|
|
|
// 机械臂移动到指定的加热位坐标 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x1,y1,z1)); |
|
|
|
|
|
// 打开钩子 |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(4,5,6)); |
|
|
|
|
|
|
|
|
// 下降高度 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x1,y1, z1 - (Integer) map.get("sys_offset_tube_rack_take_height"))); |
|
|
|
|
|
// 闭合钩子 |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
// 机械臂抬起高度 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x1,y1, z1 + (Integer) map.get("sys_offset_tube_rack_take_height") + (Integer) map.get("sys_offset_tube_height"))); |
|
|
|
|
|
// 机械臂移动到加液位高度 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x2,y2, z1 + (Integer) map.get("sys_offset_tube_rack_take_height") + (Integer) map.get("sys_offset_tube_height"))); |
|
|
|
|
|
// 机械臂下降高度 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x2,y2, z2)); |
|
|
|
|
|
// 机械臂打开钩子 |
|
|
|
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
|
|
|
// 机械臂上升高度 |
|
|
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x2,y2, z2 + (Integer) map.get("sys_offset_tube_rack_take_height"))); |
|
|
|
|
|
// 关闭钩子 |
|
|
|
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
|
|
|
|
|
|
|
|
|
return cmdList; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 加液 |
|
|
// 加液 |
|
|
private Boolean injectFluid(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> injectFluid(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
// TODO 计算出试管的坐标 |
|
|
|
|
|
// TODO 溶液id 容量 |
|
|
|
|
|
Map<String, Object> params = cmdForm.getParams(); |
|
|
|
|
|
cmdList.add(() -> deviceService.moveLiquidArmToPoint(1,2,3)); |
|
|
|
|
|
cmdList.add(() -> deviceService.addLiquid((Long) params.get("pumpId"), ((Integer)params.get("volume")))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
// 试管的坐标 |
|
|
|
|
|
String tubePosition = baseDataService.getTubePositionBySolutionArea((Integer) params.get("tubeNum")); |
|
|
|
|
|
String [] tubePositionArr =tubePosition.split(","); |
|
|
|
|
|
int x = Integer.parseInt(tubePositionArr[0]); |
|
|
|
|
|
int y = Integer.parseInt(tubePositionArr[1]); |
|
|
|
|
|
int z = Integer.parseInt(tubePositionArr[2]); |
|
|
|
|
|
// 泵id |
|
|
|
|
|
String pumpId = baseDataService.getPumpIdBySolutionId((Integer) params.get("solutionId")); |
|
|
|
|
|
cmdList.add(() -> deviceService.moveLiquidArmToPoint(x,y,z)); |
|
|
|
|
|
cmdList.add(() -> deviceService.addLiquid(Long.valueOf(pumpId), ((Integer)params.get("volume")))); |
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
// 放下托盘 |
|
|
// 放下托盘 |
|
|
private boolean downTray(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> downTray(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.lowerTray((String) cmdForm.getParams().get("heaterId"))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
|
|
if(params.get("height") != null && params.get("speed") != null) { |
|
|
|
|
|
cmdList.add(() -> deviceService.setTrayParams(hardwareId, (Integer) params.get("speed"), (Integer) params.get("height"))); |
|
|
|
|
|
} |
|
|
|
|
|
cmdList.add(() -> deviceService.lowerTray(hardwareId)); |
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 抬起托盘 |
|
|
// 抬起托盘 |
|
|
private boolean upTray(CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private List<Supplier<Boolean>> upTray(Map<String, Object> params) { |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
cmdList.add(() -> deviceService.raiseTray((String) cmdForm.getParams().get("heaterId"))); |
|
|
|
|
|
initExecutorThread(cmdList, cmdForm); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
|
|
if(params.get("height") != null && params.get("speed") != null) { |
|
|
|
|
|
cmdList.add(() -> deviceService.setTrayParams(hardwareId, (Integer) params.get("speed"), (Integer) params.get("height"))); |
|
|
|
|
|
} |
|
|
|
|
|
cmdList.add(() -> deviceService.raiseTray(hardwareId)); |
|
|
|
|
|
|
|
|
|
|
|
return cmdList; |
|
|
} |
|
|
} |
|
|
private void initExecutorThread(List<Supplier<Boolean>> cmdList, CMDForm cmdForm) { |
|
|
|
|
|
new Thread(() -> run(cmdList, cmdForm)).start(); |
|
|
|
|
|
|
|
|
private void initExecutorThread(List<Supplier<Boolean>> cmdList) { |
|
|
|
|
|
new Thread(() -> run(cmdList)).start(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void run(List<Supplier<Boolean>> cmdList, CMDForm cmdForm) { |
|
|
|
|
|
|
|
|
private void run(List<Supplier<Boolean>> cmdList) { |
|
|
ExecutionResult executionResult = new ExecutionResult(); |
|
|
ExecutionResult executionResult = new ExecutionResult(); |
|
|
executionResult.setCommandId(cmdForm.getCommandId()); |
|
|
|
|
|
executionResult.setCommandName(cmdForm.getCommand()); |
|
|
|
|
|
|
|
|
executionResult.setCommandId(form.getCommandId()); |
|
|
|
|
|
executionResult.setCommandName(form.getCommand()); |
|
|
|
|
|
|
|
|
// 执行所有命令 |
|
|
// 执行所有命令 |
|
|
for (Supplier<Boolean> command : cmdList) { |
|
|
for (Supplier<Boolean> command : cmdList) { |
|
|
boolean result = command.get(); |
|
|
boolean result = command.get(); |
|
|
if (!result) { |
|
|
if (!result) { |
|
|
log.error("指令执行异常: {}", JSONUtil.toJsonStr(cmdForm)); |
|
|
|
|
|
|
|
|
log.error("指令执行异常: {}", JSONUtil.toJsonStr(form)); |
|
|
executionResult.setStatus(CMDResultCode.FAILURE.getCode()); |
|
|
executionResult.setStatus(CMDResultCode.FAILURE.getCode()); |
|
|
executionResult.setMessage(CMDResultCode.FAILURE.getMsg()); |
|
|
executionResult.setMessage(CMDResultCode.FAILURE.getMsg()); |
|
|
webSocketService.pushMsg("cmd", executionResult); |
|
|
webSocketService.pushMsg("cmd", executionResult); |
|
@ -200,12 +221,13 @@ public class CMDService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean executeCommand(CMDForm cmdForm) { |
|
|
public boolean executeCommand(CMDForm cmdForm) { |
|
|
|
|
|
form = cmdForm; |
|
|
String commandName = cmdForm.getCommand(); |
|
|
String commandName = cmdForm.getCommand(); |
|
|
Function<CMDForm, Boolean> command = commandMap.get(commandName); |
|
|
|
|
|
|
|
|
Function<Map<String, Object>, List<Supplier<Boolean>>> command = commandMap.get(commandName); |
|
|
if (command == null) { |
|
|
if (command == null) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
command.apply(cmdForm); |
|
|
|
|
|
|
|
|
command.apply(form.getParams()); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |