rev:task
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package org.nl.acs.ext.wms.data.one.feedBackTaskStatus;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.nl.acs.ext.wms.data.one.BaseRequest;
|
||||
|
||||
@Data
|
||||
|
||||
@@ -457,9 +457,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(TaskDto dto) throws Exception {
|
||||
CommonFinalParam commonFinalParam = new CommonFinalParam();
|
||||
dto = foramte(dto);
|
||||
if (!StrUtil.isEmpty(dto.getVehicle_code())) {
|
||||
TaskDto vehicle_dto = this.findByContainer(dto.getVehicle_code());
|
||||
@@ -476,7 +474,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
String task_code = dto.getTask_code();
|
||||
if (StrUtil.isEmpty(task_code)) {
|
||||
task_code = CodeUtil.getNewCode("TASK_NO");
|
||||
task_code = commonFinalParam.getBARRE() + task_code;
|
||||
task_code = CommonFinalParam.HYPHEN_ + task_code;
|
||||
}
|
||||
String start_point_code = dto.getStart_point_code();
|
||||
String next_point_code = dto.getNext_point_code();
|
||||
@@ -510,14 +508,22 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
Device nextdevice = appService.findDeviceByCode(next_device_code);
|
||||
if (nextdevice == null){
|
||||
//TODO 国际化处理
|
||||
throw new BadRequestException("终点设备未配置");
|
||||
}
|
||||
Device startdevice = appService.findDeviceByCode(start_device_code);
|
||||
if (startdevice == null){
|
||||
//TODO 国际化处理
|
||||
throw new BadRequestException("起点设备未配置");
|
||||
}
|
||||
dto.setMaterial(startdevice.getMaterial_type());
|
||||
if (StrUtil.equals(DeviceType.storage.toString(), startDeviceType)) {
|
||||
start_point_code = start_device_code + commonFinalParam.getBARRE() + dto.getFrom_y() + commonFinalParam.getBARRE() + dto.getFrom_z();
|
||||
start_point_code = start_device_code + CommonFinalParam.HYPHEN_ + dto.getFrom_y() + CommonFinalParam.HYPHEN_ + dto.getFrom_z();
|
||||
dto.setStart_point_code(start_point_code);
|
||||
}
|
||||
if (StrUtil.equals(DeviceType.storage.toString(), nextDeviceType)) {
|
||||
next_point_code = next_device_code + commonFinalParam.getBARRE() + dto.getTo_y() + commonFinalParam.getBARRE() + dto.getTo_z();
|
||||
next_point_code = next_device_code + CommonFinalParam.HYPHEN_ + dto.getTo_y() + CommonFinalParam.HYPHEN_ + dto.getTo_z();
|
||||
dto.setNext_point_code(next_point_code);
|
||||
}
|
||||
if (StrUtil.equals(createTaskCheck, CommonFinalParam.ONE)) {
|
||||
@@ -592,7 +598,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
|
||||
if (array.size() == 0) {
|
||||
throw new BadRequestException(LangProcess.msg("starting_point_isNull"));
|
||||
//throw new RuntimeException("请选择起点");
|
||||
}
|
||||
for (int i = 0; i < array.size(); i++) {
|
||||
JSONObject arrjo = array.getJSONObject(i);
|
||||
@@ -840,9 +845,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
} else {
|
||||
next_device_code = this_device_code;
|
||||
}
|
||||
CommonFinalParam commonFinalParam = new CommonFinalParam();
|
||||
if (StrUtil.equals(appService.findDeviceTypeByCode(next_device_code), "storage")) {
|
||||
next_point_code = next_device_code + commonFinalParam.getBARRE() + acsTask.getTo_y() + commonFinalParam.getBARRE() + acsTask.getTo_z();
|
||||
next_point_code = next_device_code + CommonFinalParam.HYPHEN_ + acsTask.getTo_y() + CommonFinalParam.HYPHEN_ + acsTask.getTo_z();
|
||||
} else {
|
||||
next_point_code = next_device_code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user