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