|
@@ -137,7 +137,7 @@ func StartProject(c *gin.Context) {
|
|
|
c.JSON(http.StatusOK, entity.HttpResult{Status: false, Code: "400", Message: "请求参数格式错误。"})
|
|
|
return
|
|
|
}
|
|
|
- if !checkEquipmentType(projectStartParam.EquipmentType) {
|
|
|
+ if !checkEquipmentType(projectStartParam.EquipmentType, *projectStartParam) {
|
|
|
c.JSON(http.StatusOK, entity.HttpResult{Status: true, Code: "400", Message: "设备类型错误。"})
|
|
|
}
|
|
|
|
|
@@ -171,7 +171,7 @@ func StartProject(c *gin.Context) {
|
|
|
c.JSON(http.StatusOK, entity.HttpResult{Status: true, Code: "2000", Message: "项目启动请求已被成功接收,等待调度处理。"})
|
|
|
}
|
|
|
|
|
|
-func checkEquipmentType(equipmentType string) bool {
|
|
|
+func checkEquipmentType(equipmentType string, project entity.Project) bool {
|
|
|
|
|
|
JIN_LONG_BA_SHI
|
|
|
PEI_SONG_JI_QI_REN
|
|
@@ -181,17 +181,17 @@ func checkEquipmentType(equipmentType string) bool {
|
|
|
AN_FANG_JI_QI_REN
|
|
|
*/
|
|
|
if equipmentType == "JIN_LONG_BA_SHI" {
|
|
|
- infra.GlobalLogger.Infof("接收到【金龙中巴】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【金龙中巴】的仿真测试项目:%v", project)
|
|
|
} else if equipmentType == "PEI_SONG_JI_QI_REN" {
|
|
|
- infra.GlobalLogger.Infof("接收到【智能配送机器人】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【智能配送机器人】的仿真测试项目:%v", project)
|
|
|
} else if equipmentType == "SAO_DI_JI_QI_REN" {
|
|
|
- infra.GlobalLogger.Infof("接收到【室内清洁机器人】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【室内清洁机器人】的仿真测试项目:%v", project)
|
|
|
} else if equipmentType == "YI_DAO_JI_QI_REN" {
|
|
|
- infra.GlobalLogger.Infof("接收到【引导服务机器人】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【引导服务机器人】的仿真测试项目:%v", project)
|
|
|
} else if equipmentType == "PU_JIN_DUO_GONG_NENG_CHE" {
|
|
|
- infra.GlobalLogger.Infof("接收到【朴津多功能车】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【朴津多功能车】的仿真测试项目:%v", project)
|
|
|
} else if equipmentType == "AN_FANG_JI_QI_REN" {
|
|
|
- infra.GlobalLogger.Infof("接收到【安防巡检机器人】的仿真测试项目。")
|
|
|
+ infra.GlobalLogger.Infof("接收到【安防巡检机器人】的仿真测试项目:%v", project)
|
|
|
} else {
|
|
|
infra.GlobalLogger.Infof("接收到未知的设备类型【%v】", equipmentType)
|
|
|
return false
|