|
|
|
|
@ -35,7 +35,10 @@ import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.desk.basic.util.StatusCountMap; |
|
|
|
|
import org.springblade.desk.logistics.pojo.dto.ReturnToWarehouseDto; |
|
|
|
|
import org.springblade.desk.logistics.pojo.entity.Station; |
|
|
|
|
import org.springblade.desk.logistics.service.IOrderBindService; |
|
|
|
|
import org.springblade.desk.logistics.service.IOrderBoxService; |
|
|
|
|
import org.springblade.desk.logistics.service.IPipelineService; |
|
|
|
|
import org.springblade.desk.logistics.utils.AgvTaskTypeUtil; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
@ -60,6 +63,8 @@ public class PipelineController extends BladeController { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
IPipelineService pipelineService; |
|
|
|
|
@Autowired |
|
|
|
|
IOrderBoxService iOrderBoxService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -75,7 +80,17 @@ public class PipelineController extends BladeController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal estimatedWeight = pipelineService.getMaterialBoxWeight(boxBarcode); |
|
|
|
|
|
|
|
|
|
ReturnToWarehouseDto returnToWarehouseDto = new ReturnToWarehouseDto(); |
|
|
|
|
returnToWarehouseDto.setBoxBarcode(boxBarcode); |
|
|
|
|
R wcIdR = iOrderBoxService.getWcId(boxBarcode); |
|
|
|
|
if (!wcIdR.isSuccess()) { |
|
|
|
|
return wcIdR; |
|
|
|
|
} |
|
|
|
|
returnToWarehouseDto.setEndWcId((Long) wcIdR.getData()); |
|
|
|
|
R taskR = iOrderBoxService.saveTask(returnToWarehouseDto, false); |
|
|
|
|
if (!taskR.isSuccess()) { |
|
|
|
|
return taskR; |
|
|
|
|
} |
|
|
|
|
return R.data(estimatedWeight); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|