Merge branch 'main' of http://git.hivekion.com:3000/liyudong/simulation-backend
This commit is contained in:
commit
b12d5bb3bd
|
|
@ -197,12 +197,12 @@ public abstract class AbtParentTask implements TaskAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updatePath(double speed, TaskAction action) {
|
protected void updatePath(double speed,TaskAction duringAction, TaskAction finishedAction) {
|
||||||
|
|
||||||
ScheduledExecutorService schedule = Executors.newScheduledThreadPool(
|
ScheduledExecutorService schedule = Executors.newScheduledThreadPool(
|
||||||
1);
|
1);
|
||||||
schedule.scheduleWithFixedDelay(() -> {
|
schedule.scheduleWithFixedDelay(() -> {
|
||||||
|
log.info("task is running....");
|
||||||
try {
|
try {
|
||||||
if (this.getRoomStatus()) {
|
if (this.getRoomStatus()) {
|
||||||
if (distanceInfoMap.isEmpty()) {
|
if (distanceInfoMap.isEmpty()) {
|
||||||
|
|
@ -212,7 +212,9 @@ public abstract class AbtParentTask implements TaskAction {
|
||||||
if (duringTime <= 0) {
|
if (duringTime <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(duringAction!=null){
|
||||||
|
duringAction.doSomeThing();
|
||||||
|
}
|
||||||
//跑动距离
|
//跑动距离
|
||||||
double distance = duringTime * speed;
|
double distance = duringTime * speed;
|
||||||
|
|
||||||
|
|
@ -278,8 +280,8 @@ public abstract class AbtParentTask implements TaskAction {
|
||||||
scenarioTask.getScenarioId(), dataMap));
|
scenarioTask.getScenarioId(), dataMap));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (action != null) {
|
if (finishedAction != null) {
|
||||||
action.doSomeThing();
|
finishedAction.doSomeThing();
|
||||||
}
|
}
|
||||||
//完成路径
|
//完成路径
|
||||||
Global.sendCmdInfoQueue.add(
|
Global.sendCmdInfoQueue.add(
|
||||||
|
|
@ -301,6 +303,10 @@ public abstract class AbtParentTask implements TaskAction {
|
||||||
//房间统一管理定时器;房间关闭后,定时器销毁
|
//房间统一管理定时器;房间关闭后,定时器销毁
|
||||||
addScheduledExecutorServiceRefenceToRoom(schedule);
|
addScheduledExecutorServiceRefenceToRoom(schedule);
|
||||||
}
|
}
|
||||||
|
//统一推送方法
|
||||||
|
protected void pushStatus(String resourceId) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BizTaskOnTiming {
|
interface BizTaskOnTiming {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
package com.hivekion.room.bean;
|
package com.hivekion.room.bean;
|
||||||
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.hivekion.Global;
|
||||||
|
import com.hivekion.common.entity.ResponseCmdInfo;
|
||||||
import com.hivekion.common.redis.RedisUtil;
|
import com.hivekion.common.redis.RedisUtil;
|
||||||
import com.hivekion.common.uuid.IdUtils;
|
import com.hivekion.common.uuid.IdUtils;
|
||||||
import com.hivekion.room.RoomManager;
|
import com.hivekion.room.RoomManager;
|
||||||
import com.hivekion.room.func.TaskAction;
|
import com.hivekion.room.func.TaskAction;
|
||||||
|
import com.hivekion.scenario.entity.BattleConsume;
|
||||||
import com.hivekion.scenario.entity.ScenarioResource;
|
import com.hivekion.scenario.entity.ScenarioResource;
|
||||||
import com.hivekion.scenario.entity.ScenarioTask;
|
import com.hivekion.scenario.entity.ScenarioTask;
|
||||||
|
import com.hivekion.scenario.service.impl.BattleConsumeServiceImpl;
|
||||||
import com.hivekion.scenario.service.impl.BattleSupplierServiceImpl;
|
import com.hivekion.scenario.service.impl.BattleSupplierServiceImpl;
|
||||||
import com.hivekion.scenario.service.impl.ScenarioTaskServiceImpl;
|
import com.hivekion.scenario.service.impl.ScenarioTaskServiceImpl;
|
||||||
import com.hivekion.statistic.bean.StatisticBean;
|
import com.hivekion.statistic.bean.StatisticBean;
|
||||||
|
|
@ -14,7 +18,9 @@ import com.hivekion.statistic.service.impl.StatisticServiceImpl;
|
||||||
import com.hivekion.supplier.entity.SupplierRequest;
|
import com.hivekion.supplier.entity.SupplierRequest;
|
||||||
import com.hivekion.supplier.service.impl.SupplierRequestServiceImpl;
|
import com.hivekion.supplier.service.impl.SupplierRequestServiceImpl;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
@ -32,7 +38,7 @@ import org.springframework.core.env.Environment;
|
||||||
* @since 2025/7/22
|
* @since 2025/7/22
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MoveRootTask extends AbtParentTask implements TaskAction {
|
public class MoveTask extends AbtParentTask implements TaskAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 速度 换算为100Km/小时
|
* 速度 换算为100Km/小时
|
||||||
|
|
@ -50,7 +56,7 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
/**
|
/**
|
||||||
* 消耗任务间隔
|
* 消耗任务间隔
|
||||||
*/
|
*/
|
||||||
private final int consumptionTaskInterval = 5;
|
private final int consumptionTaskInterval = 10;
|
||||||
/**
|
/**
|
||||||
* redis 服务类
|
* redis 服务类
|
||||||
*/
|
*/
|
||||||
|
|
@ -58,7 +64,7 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
private StatisticBean statisticBean;
|
private StatisticBean statisticBean;
|
||||||
|
|
||||||
|
|
||||||
public MoveRootTask(ScenarioTask scenarioTask, String roomId) {
|
public MoveTask(ScenarioTask scenarioTask, String roomId) {
|
||||||
super(scenarioTask, roomId);
|
super(scenarioTask, roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69,7 +75,31 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
|
|
||||||
initEnv(); //初始化环境
|
initEnv(); //初始化环境
|
||||||
initPath(); //初始化路径
|
initPath(); //初始化路径
|
||||||
updatePath(SPEED, null); //更新路径
|
updatePath(SPEED, new TaskAction() {
|
||||||
|
@Override
|
||||||
|
public void doSomeThing() {
|
||||||
|
//推送移动任务
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("duringTime",getDuringTime());
|
||||||
|
map.put("id",scenarioTask.getResourceId());
|
||||||
|
map.put("roomStatus",true);
|
||||||
|
map.put("type",scenarioTask.getType());
|
||||||
|
|
||||||
|
Global.sendCmdInfoQueue.add(
|
||||||
|
ResponseCmdInfo.create("moveTask", roomId,
|
||||||
|
scenarioTask.getScenarioId(), map));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getType() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
},null); //更新路径
|
||||||
fuelConsumption();//油品消耗
|
fuelConsumption();//油品消耗
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -124,6 +154,8 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//插入消耗表
|
//插入消耗表
|
||||||
|
insertConsumption(currentUseUp);
|
||||||
|
pushStatus(scenarioTask.getResourceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -172,6 +204,16 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
RoomManager.addAction(roomId, 0, supplierTask);
|
RoomManager.addAction(roomId, 0, supplierTask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void insertConsumption(double num) {
|
||||||
|
BattleConsume battleConsume = new BattleConsume();
|
||||||
|
battleConsume.setId(IdUtils.simpleUUID());
|
||||||
|
battleConsume.setResourceId(scenarioTask.getResourceId());
|
||||||
|
battleConsume.setFuel(num);
|
||||||
|
battleConsume.setConsumeDate(LocalDateTime.now());
|
||||||
|
SpringUtil.getBean(BattleConsumeServiceImpl.class).save(battleConsume);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -92,6 +92,8 @@ public class Room implements AutoCloseable {
|
||||||
status.set(true);
|
status.set(true);
|
||||||
totalTime.set(time);
|
totalTime.set(time);
|
||||||
startTask();
|
startTask();
|
||||||
|
//初始化系统资源 物资人员等信息
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -100,6 +102,15 @@ public class Room implements AutoCloseable {
|
||||||
public void stop() {
|
public void stop() {
|
||||||
status.set(false);
|
status.set(false);
|
||||||
cancelTask();
|
cancelTask();
|
||||||
|
futures.forEach((key, value) -> {
|
||||||
|
try {
|
||||||
|
if (!value.isShutdown()) {
|
||||||
|
value.shutdownNow();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("error::", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -120,7 +131,6 @@ public class Room implements AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 启动定时任务
|
// 启动定时任务
|
||||||
private void startTask() {
|
private void startTask() {
|
||||||
if (future == null || future.isCancelled()) {
|
if (future == null || future.isCancelled()) {
|
||||||
|
|
@ -195,4 +205,6 @@ public class Room implements AutoCloseable {
|
||||||
public boolean isRunning() {
|
public boolean isRunning() {
|
||||||
return status.get();
|
return status.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
package com.hivekion.room.bean;
|
package com.hivekion.room.bean;
|
||||||
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.hivekion.common.entity.ResponseCmdInfo;
|
||||||
import com.hivekion.common.redis.RedisUtil;
|
import com.hivekion.common.redis.RedisUtil;
|
||||||
import com.hivekion.room.func.TaskAction;
|
import com.hivekion.room.func.TaskAction;
|
||||||
import com.hivekion.scenario.entity.ScenarioTask;
|
import com.hivekion.scenario.entity.ScenarioTask;
|
||||||
import com.hivekion.statistic.bean.StatisticBean;
|
import com.hivekion.statistic.bean.StatisticBean;
|
||||||
import com.hivekion.statistic.service.StatisticService;
|
import com.hivekion.statistic.service.StatisticService;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [类的简要说明]
|
* [类的简要说明]
|
||||||
|
|
@ -16,6 +20,7 @@ import com.hivekion.statistic.service.StatisticService;
|
||||||
* @author LiDongYU
|
* @author LiDongYU
|
||||||
* @since 2025/7/22
|
* @since 2025/7/22
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class SupplierTask extends AbtParentTask implements TaskAction {
|
public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
|
|
||||||
public SupplierTask(ScenarioTask scenarioTask, String roomId) {
|
public SupplierTask(ScenarioTask scenarioTask, String roomId) {
|
||||||
|
|
@ -28,10 +33,11 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
StatisticBean statistic = SpringUtil.getBean(StatisticService.class)
|
StatisticBean statistic = SpringUtil.getBean(StatisticService.class)
|
||||||
.statistic(scenarioTask.getResourceId());
|
.statistic(scenarioTask.getResourceId());
|
||||||
initPath(); //初始化路径
|
initPath(); //初始化路径
|
||||||
updatePath(30, new TaskAction() {
|
updatePath(30, null, new TaskAction() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doSomeThing() {
|
public void doSomeThing() {
|
||||||
|
log.info("supplier team is arrived ");
|
||||||
//达到终点点后,给目标补充物资
|
//达到终点点后,给目标补充物资
|
||||||
switch (scenarioTask.getTaskType()) {
|
switch (scenarioTask.getTaskType()) {
|
||||||
case "4":
|
case "4":
|
||||||
|
|
@ -51,7 +57,8 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//推送最新状态信息
|
//推送最新状态信息
|
||||||
|
pushStatus(scenarioTask.getResourceId());
|
||||||
|
pushStatus(scenarioTask.getResourceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -68,11 +75,26 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
|
|
||||||
private void supplierMedical(StatisticBean statistic) {
|
private void supplierMedical(StatisticBean statistic) {
|
||||||
|
|
||||||
|
//增加被保障分队的量
|
||||||
SpringUtil.getBean(RedisUtil.class)
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
||||||
"medical", statistic.getMedical().getTotal() + "");
|
"medical", statistic.getMedical().getTotal() + "");
|
||||||
|
|
||||||
|
//获取保障任务的药品信息
|
||||||
|
Object supplierObj = SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hget(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"medical");
|
||||||
|
//减少保障分队的量
|
||||||
|
if (supplierObj != null) {
|
||||||
|
double supplierMedical = Double.parseDouble(supplierObj.toString());
|
||||||
|
|
||||||
|
double remain = supplierMedical - statistic.getMedical().getTotal();
|
||||||
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"medical", remain + "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void supplierFuel(StatisticBean statistic) {
|
private void supplierFuel(StatisticBean statistic) {
|
||||||
|
|
@ -81,6 +103,20 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
||||||
"fuel", statistic.getFuel().getTotal() + "");
|
"fuel", statistic.getFuel().getTotal() + "");
|
||||||
|
|
||||||
|
Object supplierObj = SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hget(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"fuel");
|
||||||
|
//减少保障分队的量
|
||||||
|
if (supplierObj != null) {
|
||||||
|
double supplierMedical = Double.parseDouble(supplierObj.toString());
|
||||||
|
|
||||||
|
double remain = supplierMedical - statistic.getFuel().getTotal();
|
||||||
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"fuel", remain + "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void supplierAmmunition(StatisticBean statistic) {
|
private void supplierAmmunition(StatisticBean statistic) {
|
||||||
|
|
@ -88,7 +124,20 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
SpringUtil.getBean(RedisUtil.class)
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
||||||
"ammunition", statistic.getAmmunition().getTotal() + "");
|
"ammunition", statistic.getAmmunition().getTotal() + "");
|
||||||
|
Object supplierObj = SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hget(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"ammunition");
|
||||||
|
//减少保障分队的量
|
||||||
|
if (supplierObj != null) {
|
||||||
|
double supplierMedical = Double.parseDouble(supplierObj.toString());
|
||||||
|
|
||||||
|
double remain = supplierMedical - statistic.getAmmunition().getTotal();
|
||||||
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"ammunition", remain + "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void supplierWater(StatisticBean statistic) {
|
private void supplierWater(StatisticBean statistic) {
|
||||||
|
|
@ -96,7 +145,20 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
SpringUtil.getBean(RedisUtil.class)
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
||||||
"water", statistic.getWater().getTotal() + "");
|
"water", statistic.getWater().getTotal() + "");
|
||||||
|
Object supplierObj = SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hget(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"water");
|
||||||
|
//减少保障分队的量
|
||||||
|
if (supplierObj != null) {
|
||||||
|
double supplierMedical = Double.parseDouble(supplierObj.toString());
|
||||||
|
|
||||||
|
double remain = supplierMedical - statistic.getWater().getTotal();
|
||||||
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"water", remain + "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void supplierFood(StatisticBean statistic) {
|
private void supplierFood(StatisticBean statistic) {
|
||||||
|
|
@ -104,8 +166,20 @@ public class SupplierTask extends AbtParentTask implements TaskAction {
|
||||||
SpringUtil.getBean(RedisUtil.class)
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-" + scenarioTask.getResourceId(),
|
||||||
"food", statistic.getFood().getTotal() + "");
|
"food", statistic.getFood().getTotal() + "");
|
||||||
|
Object supplierObj = SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hget(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"food");
|
||||||
|
//减少保障分队的量
|
||||||
|
if (supplierObj != null) {
|
||||||
|
double supplierMedical = Double.parseDouble(supplierObj.toString());
|
||||||
|
|
||||||
|
double remain = supplierMedical - statistic.getFood().getTotal();
|
||||||
|
SpringUtil.getBean(RedisUtil.class)
|
||||||
|
.hset(scenarioTask.getScenarioId() + "-" + roomId + "-"
|
||||||
|
+ scenarioTask.getSupplierResourceId(),
|
||||||
|
"food", remain + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import com.hivekion.baseData.service.ScenarioService;
|
||||||
import com.hivekion.common.entity.ResponseCmdInfo;
|
import com.hivekion.common.entity.ResponseCmdInfo;
|
||||||
import com.hivekion.room.RoomManager;
|
import com.hivekion.room.RoomManager;
|
||||||
import com.hivekion.room.bean.BattleRootTask;
|
import com.hivekion.room.bean.BattleRootTask;
|
||||||
import com.hivekion.room.bean.MoveRootTask;
|
import com.hivekion.room.bean.MoveTask;
|
||||||
import com.hivekion.room.bean.SupplierTask;
|
import com.hivekion.room.bean.SupplierTask;
|
||||||
import com.hivekion.room.func.TaskAction;
|
import com.hivekion.room.func.TaskAction;
|
||||||
import com.hivekion.scenario.entity.ScenarioTask;
|
import com.hivekion.scenario.entity.ScenarioTask;
|
||||||
|
|
@ -155,7 +155,7 @@ public class ScenarioTaskServiceImpl extends
|
||||||
//移动任务
|
//移动任务
|
||||||
case "1":
|
case "1":
|
||||||
log.info("move task::{}",diff);
|
log.info("move task::{}",diff);
|
||||||
MoveRootTask moveRootTask = new MoveRootTask(task, roomId);
|
MoveTask moveRootTask = new MoveTask(task, roomId);
|
||||||
RoomManager.addAction(roomId, diff, moveRootTask);
|
RoomManager.addAction(roomId, diff, moveRootTask);
|
||||||
respObj.setCmdType("moveTask");
|
respObj.setCmdType("moveTask");
|
||||||
respObj.setData(JSON.toJSONString(moveRootTask));
|
respObj.setData(JSON.toJSONString(moveRootTask));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user