|
@@ -9,12 +9,14 @@ import com.zksy.common.exception.CommonException;
|
|
|
import com.zksy.pole.domain.po.*;
|
|
import com.zksy.pole.domain.po.*;
|
|
|
import com.zksy.pole.factory.impl.*;
|
|
import com.zksy.pole.factory.impl.*;
|
|
|
import com.zksy.pole.mapper.DgGatewayRegistrationMapper;
|
|
import com.zksy.pole.mapper.DgGatewayRegistrationMapper;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
@Component
|
|
@Component
|
|
|
|
|
+@Slf4j
|
|
|
public class HandleCmdFactory {
|
|
public class HandleCmdFactory {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private HandleDgEquipmentAlarmCmd handleDgEquipmentAlarmCmd;
|
|
private HandleDgEquipmentAlarmCmd handleDgEquipmentAlarmCmd;
|
|
@@ -55,13 +57,13 @@ public class HandleCmdFactory {
|
|
|
case 6012:
|
|
case 6012:
|
|
|
s = handleDgEquipmentStatusCmd.HandleCmdMethod(jsonObject.toBean(DgEquipmentStatus.class));
|
|
s = handleDgEquipmentStatusCmd.HandleCmdMethod(jsonObject.toBean(DgEquipmentStatus.class));
|
|
|
return s;
|
|
return s;
|
|
|
- case 1111: //todo
|
|
|
|
|
|
|
+ case 1111:
|
|
|
s = handleDgGatewayRegistrationCmd.HandleCmdMethod(jsonObject.toBean(DgGatewayRegistration.class));
|
|
s = handleDgGatewayRegistrationCmd.HandleCmdMethod(jsonObject.toBean(DgGatewayRegistration.class));
|
|
|
return s;
|
|
return s;
|
|
|
case 6022:
|
|
case 6022:
|
|
|
s = handleDgGatewayStrategyCmd.HandleCmdMethod(jsonObject.toBean(DgGatewayStrategy.class));
|
|
s = handleDgGatewayStrategyCmd.HandleCmdMethod(jsonObject.toBean(DgGatewayStrategy.class));
|
|
|
return s;
|
|
return s;
|
|
|
- case 6010: //todo
|
|
|
|
|
|
|
+ case 6010:
|
|
|
s = handleDgLampControlledHeartbeatCmd.HandleCmdMethod(jsonObject.toBean(DgLampControlledHeartbeat.class));
|
|
s = handleDgLampControlledHeartbeatCmd.HandleCmdMethod(jsonObject.toBean(DgLampControlledHeartbeat.class));
|
|
|
return s;
|
|
return s;
|
|
|
case 6014:
|
|
case 6014:
|
|
@@ -70,13 +72,14 @@ public class HandleCmdFactory {
|
|
|
case 6015:
|
|
case 6015:
|
|
|
s = handleDgRelayTimingStrategyCmd.HandleCmdMethod(jsonObject.toBean(DgRelayTimingStrategy.class));
|
|
s = handleDgRelayTimingStrategyCmd.HandleCmdMethod(jsonObject.toBean(DgRelayTimingStrategy.class));
|
|
|
return s;
|
|
return s;
|
|
|
- case 2000: //todo
|
|
|
|
|
|
|
+ case 2000:
|
|
|
s = handleDgReportEnvironmentalDataCmd.HandleCmdMethod(jsonObject.toBean(DgReportEnvironmentalData.class));
|
|
s = handleDgReportEnvironmentalDataCmd.HandleCmdMethod(jsonObject.toBean(DgReportEnvironmentalData.class));
|
|
|
return s;
|
|
return s;
|
|
|
case 6011:
|
|
case 6011:
|
|
|
s = handleDgTimelyControlCmd.HandleCmdMethod(jsonObject.toBean(DgTimelyControl.class));
|
|
s = handleDgTimelyControlCmd.HandleCmdMethod(jsonObject.toBean(DgTimelyControl.class));
|
|
|
return s;
|
|
return s;
|
|
|
default:
|
|
default:
|
|
|
|
|
+ log.info("cmd有误或者没有对应的cmd处理");
|
|
|
return null;
|
|
return null;
|
|
|
// throw new CommonException("cmd有误或者没有对应的cmd处理", 500);
|
|
// throw new CommonException("cmd有误或者没有对应的cmd处理", 500);
|
|
|
}
|
|
}
|