rev:更新
This commit is contained in:
@@ -279,7 +279,7 @@ public class InstructionDto implements Serializable {
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
private String vehicle_type = "1";
|
||||
|
||||
/**
|
||||
* agv车号
|
||||
|
||||
@@ -444,7 +444,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
resp=acsToLiKuService.create(createRequest);
|
||||
}
|
||||
createRequest.setGroupPriority(Integer.parseInt(dto.getPriority()));
|
||||
if(ObjectUtil.isNotEmpty(resp) && StrUtil.equals(resp.getCode(),"true")){
|
||||
if(ObjectUtil.isNotEmpty(resp) && StrUtil.equals(resp.getCode(),"0")){
|
||||
dto.setSend_status("1");
|
||||
} else {
|
||||
dto.setSend_status("2");
|
||||
|
||||
@@ -37,7 +37,7 @@ public class TaskDto implements Serializable {
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
private String vehicle_type = "1";
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
|
||||
@@ -77,7 +77,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
private DeviceAssignedService deviceAssignedService;
|
||||
@Autowired
|
||||
private InstructionService instructionService;
|
||||
// private LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
|
||||
// private LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
@Override
|
||||
public void autoInitial() throws Exception {
|
||||
this.reload();
|
||||
@@ -98,6 +99,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
List<TaskDto> list = arr.toJavaList(TaskDto.class);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskDto findByStartCodeAndReady(String device_code) {
|
||||
Iterator var3 = tasks.iterator();
|
||||
@@ -114,6 +116,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -372,6 +375,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
dto.setRoute_plan_code(route_plan_code);
|
||||
dto.setTask_status(StatusEnum.INST_READY.getCode());
|
||||
dto.setPut_device_code(dto.getPut_point_code());
|
||||
dto.setVehicle_type(dto.getVehicle_type() == null ? "1" : dto.getVehicle_type());
|
||||
String plan_code = dto.getRoute_plan_code();
|
||||
if (routeLineService
|
||||
.getShortPathLines(dto.getStart_device_code(), dto.getNext_device_code(), plan_code)
|
||||
@@ -565,9 +569,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
InstructionDto instdto = instructionService.findByTaskId(id, "instruction_status <2 ");
|
||||
if (instdto != null) {
|
||||
// lucene.deviceExecuteLog(new LuceneLogDto(id,"任务号关联的指令状态instruction_status <2:"+instdto.getInstruction_status()));
|
||||
log.info("任务号{}关联的指令状态instruction_status <2:{}",id,instdto.getInstruction_status());
|
||||
log.info("任务号{}关联的指令状态instruction_status <2:{}", id, instdto.getInstruction_status());
|
||||
throw new BadRequestException("有指令未完成!");
|
||||
}else {
|
||||
} else {
|
||||
entity.setTask_status(StatusEnum.INST_FINISH.getCode());
|
||||
this.update(entity);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ public class AutoCreateAgvOneInst {
|
||||
try {
|
||||
instructionService.create(instructionService.createInstDtoByTask(taskDto, link_no));
|
||||
} catch (Exception e) {
|
||||
log.error("自动创建指令失败:任务号{},失败原因:{}", taskDto.getTask_code(), e.getMessage());
|
||||
taskDto.setRemark(e.getMessage());
|
||||
taskService.updateByCodeFromCache(taskDto);
|
||||
continue;
|
||||
@@ -46,6 +47,7 @@ public class AutoCreateAgvOneInst {
|
||||
//创建指令后修改任务状态
|
||||
taskDto.setTask_status(StatusEnum.TASK_RUNNING.getCode());
|
||||
taskService.update(taskDto);
|
||||
log.info("自动创建指令成功,任务号:{}", taskDto.getTask_code());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -98,6 +99,7 @@ public class GenCodeServiceImpl implements GenCodeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(Transactional.TxType.REQUIRES_NEW)
|
||||
public String codeDemo(Map form) {
|
||||
String code = (String) form.get("code");
|
||||
String id = this.queryIdByCode(code);
|
||||
|
||||
Reference in New Issue
Block a user