|
@@ -35,6 +35,7 @@ import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.uuid.SnowflakeIdWorker;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -72,6 +73,8 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
private IWcsTaskService wcsTaskService;
|
|
|
@Autowired
|
|
|
private IAmsTaskService amsTaskService;
|
|
|
+ @Autowired
|
|
|
+ private IFlowConfigHeaderService flowConfigHeaderService;
|
|
|
|
|
|
private int geniKey(String taskNo) {
|
|
|
int res = CRC16Util.calcCrc16(ByteUtil.string2byteArray(taskNo));
|
|
@@ -84,6 +87,26 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public AjaxResult agvCall(AgvCallItem agvCallItem,Long flowId) {
|
|
|
+ //查询所属流程
|
|
|
+ FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderService.selectFlowConfigHeaderById(flowId);
|
|
|
+
|
|
|
+ AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
|
|
|
+ BeanUtils.copyProperties(agvCallItem, agvCallItemDTO);
|
|
|
+
|
|
|
+ List<AgvCallDTO> list = new ArrayList<>();
|
|
|
+ AgvCallDTO agvCallDTO = new AgvCallDTO();
|
|
|
+ agvCallDTO.setWarehouseId(Constant.WAREHOUSE_ID);
|
|
|
+ agvCallDTO.setLocationFrom(agvCallItemDTO.getLocationFrom());
|
|
|
+ agvCallDTO.setLocationTo(agvCallItemDTO.getLocationTo());
|
|
|
+ agvCallItemDTO.setWarehouseId(Constant.WAREHOUSE_ID);
|
|
|
+ agvCallItemDTO.setFlowConfigHeaderVO(flowConfigHeaderVO);
|
|
|
+ agvCallDTO.getAgvCallItemDTOList().add(agvCallItemDTO);
|
|
|
+ list.add(agvCallDTO);
|
|
|
+ return this.agvCall(flowConfigHeaderVO, list);
|
|
|
+ }
|
|
|
+
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public AjaxResult agvCall(FlowConfigHeaderVO flowConfigHeaderVO, List<AgvCallDTO> agvCallDTOList) {
|