rev:优化手持下发任务接口
This commit is contained in:
@@ -243,6 +243,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
@@ -252,6 +261,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 取货完毕
|
||||
|
||||
@@ -13,25 +13,16 @@ public class B2HeadDto implements Serializable {
|
||||
/**
|
||||
* 起始设备编码1
|
||||
*/
|
||||
private String start_device_code1;
|
||||
private String start_device_code;
|
||||
|
||||
/**
|
||||
* 目标设备编码1
|
||||
*/
|
||||
private String next_device_code1;
|
||||
private String next_device_code;
|
||||
|
||||
/**
|
||||
* 起始设备编码2
|
||||
*/
|
||||
private String start_device_code2;
|
||||
|
||||
/**
|
||||
* 目标设备编码2
|
||||
*/
|
||||
private String next_device_code2;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private String task_type;
|
||||
private String type;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ public class HeadDto implements Serializable {
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private String task_type;
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "手持接口")
|
||||
@RequestMapping("api/hands")
|
||||
@RequestMapping("api/task")
|
||||
@Slf4j
|
||||
public class B2HandController {
|
||||
@Autowired
|
||||
|
||||
@@ -47,11 +47,9 @@ public class B2HandServiceImpl implements B2HandService {
|
||||
@Override
|
||||
public Map<String, Object> callTask(B2HeadDto dto) {
|
||||
JSONArray errArr = new JSONArray();
|
||||
String start_device_code = dto.getStart_device_code1();
|
||||
String next_device_code = dto.getNext_device_code1();
|
||||
String start_device_code2 = dto.getStart_device_code2();
|
||||
String next_device_code2 = dto.getNext_device_code2();
|
||||
String task_type = dto.getTask_type();
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
String next_device_code = dto.getNext_device_code();
|
||||
String task_type = dto.getType();
|
||||
|
||||
if (StrUtil.isEmpty(start_device_code)) {
|
||||
throw new BadRequestException("起点1不能为空");
|
||||
@@ -64,17 +62,6 @@ public class B2HandServiceImpl implements B2HandService {
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
if (StrUtil.equals(task_type, CommonFinalParam.TYPE_ONE)) {
|
||||
jo.put("start_device_code2", start_device_code2);
|
||||
jo.put("next_device_code2", next_device_code2);
|
||||
jo.put("start_point_code2", start_device_code2);
|
||||
jo.put("next_point_code2", next_device_code2);
|
||||
} else if (StrUtil.equals(task_type, CommonFinalParam.TYPE_TWO)) {
|
||||
jo.put("start_device_code2", start_device_code2);
|
||||
jo.put("next_device_code2", next_device_code2);
|
||||
jo.put("start_point_code2", start_device_code2);
|
||||
jo.put("next_point_code2", next_device_code2);
|
||||
}
|
||||
jo.put("start_device_code", start_device_code);
|
||||
jo.put("next_device_code", next_device_code);
|
||||
jo.put("start_point_code", start_device_code);
|
||||
|
||||
@@ -118,7 +118,7 @@ public class HandServiceImpl implements HandService {
|
||||
JSONArray errArr = new JSONArray();
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
String next_device_code = dto.getNext_device_code();
|
||||
String task_type = dto.getTask_type();
|
||||
String task_type = dto.getType();
|
||||
|
||||
if (StrUtil.isEmpty(start_device_code)) {
|
||||
throw new BadRequestException("起点不能为空");
|
||||
|
||||
Reference in New Issue
Block a user