Browse Source

更新

master
常熟吴彦祖 9 months ago
parent
commit
dc038cc436
  1. 20
      src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java
  2. 3
      src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java
  3. 4
      src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

20
src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java

@ -8,6 +8,7 @@ import com.gaotao.modules.api.service.InterfaceCallLogService;
import com.gaotao.modules.api.service.WmsMessageService;
import com.gaotao.modules.automatedWarehouse.entity.PalletDetailData;
import com.gaotao.modules.automatedWarehouse.entity.WmsTransportTask;
import com.gaotao.modules.automatedWarehouse.entity.WmsTransportTaskDetail;
import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper;
import com.gaotao.modules.warehouse.entity.Pallet;
import com.gaotao.modules.warehouse.service.PalletService;
@ -74,7 +75,12 @@ public class AgvMessageServiceImpl implements AgvMessageService {
if (!StringUtils.hasText(palletId)) {
throw new RuntimeException("运输任务中未找到栈板信息");
}
WmsTransportTask checkTask= wcsIntegrationMapper.getTransportTaskByTaskNo(inData.getTaskId());
if(checkTask==null){
throw new RuntimeException("运输任务不存在");
}
String statusDesc="";
if(inData.getTargetPoint().equals(checkTask.getToLocation())){
// 5. 更新栈板calling_flag为N
String username = "AGV_SYSTEM";
wcsIntegrationMapper.updatePalletCallingFlag(transportTask.getSite(), palletId, "N", username);
@ -94,6 +100,18 @@ public class AgvMessageServiceImpl implements AgvMessageService {
// 即使没有明细也要更新栈板位置到目标站点
updatePalletLocationOnly(transportTask, username);
}
statusDesc="取货完成";
}else {
statusDesc="送货完成";
}
WmsTransportTaskDetail detail = new WmsTransportTaskDetail();
detail.setSite("55");
detail.setTaskNo(inData.getTaskId());
detail.setItemNo(1);
detail.setSeqNo(wcsIntegrationMapper.getMaxSeqNoForTaskDetail("55",inData.getTaskId()));
detail.setActionType(statusDesc);
detail.setStatus("成功");
wcsIntegrationMapper.insertWmsTransportTaskDetail(detail);
// 8. 更新接口日志为成功
if (logId != null) {

3
src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java

@ -3,6 +3,7 @@ package com.gaotao.modules.automatedWarehouse.mapper;
import com.gaotao.modules.automatedWarehouse.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.hibernate.dialect.function.IntegralTimestampaddFunction;
import java.util.List;
import java.util.Map;
@ -161,4 +162,6 @@ public interface WcsIntegrationMapper {
List<PalletDetailData> getPalletDetailsNewDetail(@Param("site") String site, @Param("palletId") String palletId);
void insertWmsTransportTaskDetail(WmsTransportTaskDetail inData);
Integer getMaxSeqNoForTaskDetail(@Param("site") String site, @Param("taskNo") String taskNo);
}

4
src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

@ -376,5 +376,9 @@
)
</insert>
<select id="getMaxSeqNoForTaskDetail" resultType="Integer">
select isnull(max(seq_no),0) from wms_transport_task_detail
where task_no=#{taskNo} and site=#{site} and item_no= 1
</select>
</mapper>
Loading…
Cancel
Save