1.添加了app_outs_check表,用于向上位系统反馈数据的记录
2.更改出库反馈的方式,由次次反馈改为完成时一次性反馈 3.去除了pda页面扫描目标箱号的绑定事件
This commit is contained in:
parent
576d4d0a00
commit
2fc5a9189e
|
|
@ -29,7 +29,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="22" :offset="1">
|
<el-col :span="22" :offset="1">
|
||||||
<el-form-item label="目标箱号:" required>
|
<el-form-item label="目标箱号:" required>
|
||||||
<el-input class="form-input large-center-input" v-model="bindingData.containerNo" @keyup.enter="transferBox" clearable ref="destinationBoxInput"/>
|
<el-input class="form-input large-center-input" v-model="bindingData.containerNo" clearable ref="destinationBoxInput"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -206,7 +206,7 @@ export default {
|
||||||
// 显示全局加载动画
|
// 显示全局加载动画
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
confirmCurrentTask(request, { timeout: 10000 }).then(res => {
|
confirmCurrentTask(request, { timeout: 15000 }).then(res => {
|
||||||
const responseData = res.data;
|
const responseData = res.data;
|
||||||
if (responseData.code === 0) {
|
if (responseData.code === 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.wms_main.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.wms_main.model.po.TAppOutsCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库检查表服务接口
|
||||||
|
*/
|
||||||
|
public interface ITAppOutsCheckService extends IService<TAppOutsCheck> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.wms_main.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.wms_main.dao.ITAppOutsCheckService;
|
||||||
|
import com.wms_main.mapper.AppOutsCheckMapper;
|
||||||
|
import com.wms_main.model.po.TAppOutsCheck;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库检查表服务实现类
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TAppOutsCheckServiceImpl extends ServiceImpl<AppOutsCheckMapper, TAppOutsCheck> implements ITAppOutsCheckService {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.wms_main.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.wms_main.model.po.TAppOutsCheck;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库检查表Mapper
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AppOutsCheckMapper extends BaseMapper<TAppOutsCheck> {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.wms_main.model.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库检查表实体类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "t_app_outs_check", autoResultMap = true)
|
||||||
|
public class TAppOutsCheck {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "checks_id")
|
||||||
|
private String checksId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "wave_no")
|
||||||
|
private String waveNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_no")
|
||||||
|
private String taskNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "mat_no")
|
||||||
|
private String matNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拣货数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "picking_qty")
|
||||||
|
private Integer pickingQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "act_qty")
|
||||||
|
private Integer actQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@TableField(value = "unit")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容器编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "container_no")
|
||||||
|
private String containerNo;
|
||||||
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ public class EwmApiServiceImpl implements IEwmApiService {
|
||||||
HttpRequest httpRequest = HttpRequest.postInstanceOf(
|
HttpRequest httpRequest = HttpRequest.postInstanceOf(
|
||||||
appCommon.getConfigByKey(AppConfigKeyEnums.EWM_SEND_WAREHOUSE_OUT_COMPLETED_URL.getKey()),
|
appCommon.getConfigByKey(AppConfigKeyEnums.EWM_SEND_WAREHOUSE_OUT_COMPLETED_URL.getKey()),
|
||||||
request,
|
request,
|
||||||
5000,
|
10000,
|
||||||
"application/json",
|
"application/json",
|
||||||
"Basic " + encodedAuth);
|
"Basic " + encodedAuth);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
||||||
private final IConveyTaskService conveyTaskService;// 输送线任务服务
|
private final IConveyTaskService conveyTaskService;// 输送线任务服务
|
||||||
private final ITAppStandService appStandService;// 站台服务
|
private final ITAppStandService appStandService;// 站台服务
|
||||||
private final ITAppOutsService appOutsService;// 出库单服务
|
private final ITAppOutsService appOutsService;// 出库单服务
|
||||||
|
private final ITAppOutsCheckService appOutsCheckService; // 出库单Check服务
|
||||||
private final IStockDataService stockDataService;// 库存数据服务
|
private final IStockDataService stockDataService;// 库存数据服务
|
||||||
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
||||||
private final ITAppPickPlanService appPickPlanService;// 拣选计划服务
|
private final ITAppPickPlanService appPickPlanService;// 拣选计划服务
|
||||||
|
|
@ -1430,6 +1431,19 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
||||||
TAppOuts thisOut = appOutsService.getOne(new LambdaQueryWrapper<TAppOuts>()
|
TAppOuts thisOut = appOutsService.getOne(new LambdaQueryWrapper<TAppOuts>()
|
||||||
.eq(TAppOuts::getTaskId, confirmTaskRequest.getTaskConfirm().getTaskId()));
|
.eq(TAppOuts::getTaskId, confirmTaskRequest.getTaskConfirm().getTaskId()));
|
||||||
|
|
||||||
|
// 将出库完成需要反馈的信息插入outsCheck表中
|
||||||
|
List<TAppOutsCheck> outsChecks = new ArrayList<>();
|
||||||
|
outsChecks.add(new TAppOutsCheck(
|
||||||
|
UUIDUtils.getNewUUID("CHECK_"),
|
||||||
|
thisOut.getWaveNo(),
|
||||||
|
confirmTaskRequest.getTaskConfirm().getTaskId(),
|
||||||
|
confirmTaskRequest.getTaskConfirm().getGoodsId(),
|
||||||
|
confirmTaskRequest.getTaskConfirm().getTotalNeed(),
|
||||||
|
confirmTaskRequest.getTaskConfirm().getRealPickQty(),
|
||||||
|
thisOut.getUnit(),
|
||||||
|
confirmTaskRequest.getTaskConfirm().getContainerNo()
|
||||||
|
));
|
||||||
|
appOutsCheckService.saveBatch(outsChecks);
|
||||||
// 当前站台到达的拣选任务
|
// 当前站台到达的拣选任务
|
||||||
TAppPickTask thisPickTask = pickTaskList.getFirst();
|
TAppPickTask thisPickTask = pickTaskList.getFirst();
|
||||||
if (confirmTaskRequest.getTaskConfirm() != null && StringUtils.isNotEmpty(confirmTaskRequest.getTaskConfirm().getTaskId())) {
|
if (confirmTaskRequest.getTaskConfirm() != null && StringUtils.isNotEmpty(confirmTaskRequest.getTaskConfirm().getTaskId())) {
|
||||||
|
|
@ -1471,29 +1485,29 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
||||||
}
|
}
|
||||||
// 放行
|
// 放行
|
||||||
if (conveyTaskService.releaseStandVehicle(thisPickTask)) {
|
if (conveyTaskService.releaseStandVehicle(thisPickTask)) {
|
||||||
// 回告EWm系统出库完成
|
// // 回告EWm系统出库完成
|
||||||
SendWarehouseOutCompletedRequest request = new SendWarehouseOutCompletedRequest();
|
// SendWarehouseOutCompletedRequest request = new SendWarehouseOutCompletedRequest();
|
||||||
List<SendWarehouseOutCompletedRequest.PickingDetail> pickingDetails = new ArrayList<>();
|
// List<SendWarehouseOutCompletedRequest.PickingDetail> pickingDetails = new ArrayList<>();
|
||||||
SendWarehouseOutCompletedRequest.PickingDetail pickingDetail = new SendWarehouseOutCompletedRequest.PickingDetail();
|
// SendWarehouseOutCompletedRequest.PickingDetail pickingDetail = new SendWarehouseOutCompletedRequest.PickingDetail();
|
||||||
pickingDetail.setTaskNo(confirmTaskRequest.getTaskConfirm().getTaskId());
|
// pickingDetail.setTaskNo(confirmTaskRequest.getTaskConfirm().getTaskId());
|
||||||
pickingDetail.setMatNo(confirmTaskRequest.getTaskConfirm().getGoodsId());
|
// pickingDetail.setMatNo(confirmTaskRequest.getTaskConfirm().getGoodsId());
|
||||||
pickingDetail.setPickingQty(Double.valueOf(confirmTaskRequest.getTaskConfirm().getTotalNeed()));
|
// pickingDetail.setPickingQty(Double.valueOf(confirmTaskRequest.getTaskConfirm().getTotalNeed()));
|
||||||
pickingDetail.setActQty(Double.valueOf(confirmTaskRequest.getTaskConfirm().getRealPickQty()));
|
// pickingDetail.setActQty(Double.valueOf(confirmTaskRequest.getTaskConfirm().getRealPickQty()));
|
||||||
pickingDetail.setUnit(thisOut.getUnit());
|
// pickingDetail.setUnit(thisOut.getUnit());
|
||||||
pickingDetail.setContainerNo(confirmTaskRequest.getTaskConfirm().getContainerNo());
|
// pickingDetail.setContainerNo(confirmTaskRequest.getTaskConfirm().getContainerNo());
|
||||||
pickingDetails.add(pickingDetail);
|
// pickingDetails.add(pickingDetail);
|
||||||
request.setPickingDetail(pickingDetails);
|
// request.setPickingDetail(pickingDetails);
|
||||||
request.setWaveNo(thisOut.getWaveNo());
|
// request.setWaveNo(thisOut.getWaveNo());
|
||||||
request.setPickingType(thisOut.getPickingType());
|
// request.setPickingType(thisOut.getPickingType());
|
||||||
|
//
|
||||||
EwmApiBackResponse ewmApiBackResponse = ewmApiService.sendWarehouseOutCompleted(request);
|
// EwmApiBackResponse ewmApiBackResponse = ewmApiService.sendWarehouseOutCompleted(request);
|
||||||
if (Objects.equals(ewmApiBackResponse.getState(), "successfully")) {
|
// if (Objects.equals(ewmApiBackResponse.getState(), "successfully")) {
|
||||||
log.info("调用EWM系统接口成功,请求参数: {}", request);
|
// log.info("调用EWM系统接口成功,请求参数: {}", request);
|
||||||
|
//
|
||||||
}else {
|
// }else {
|
||||||
log.error("调用EWM系统接口异常,请求参数: {}", request);
|
// log.error("调用EWM系统接口异常,请求参数: {}", request);
|
||||||
//return BaseWmsApiResponse.error("调用EWM系统接口异常: " + ewmApiBackResponse.getMessage());
|
// //return BaseWmsApiResponse.error("调用EWM系统接口异常: " + ewmApiBackResponse.getMessage());
|
||||||
}
|
// }
|
||||||
return BaseWmsApiResponse.success("确认成功。");
|
return BaseWmsApiResponse.success("确认成功。");
|
||||||
} else {
|
} else {
|
||||||
// 回滚事务
|
// 回滚事务
|
||||||
|
|
@ -1924,6 +1938,36 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
||||||
outs.setPickNum(outs.getPickNum() + taskConfirm.getRealPickQty());
|
outs.setPickNum(outs.getPickNum() + taskConfirm.getRealPickQty());
|
||||||
outs.setUserName(confirmTaskRequest.getUserName());
|
outs.setUserName(confirmTaskRequest.getUserName());
|
||||||
if (outs.getPickNum() >= outs.getNeedNum()) {
|
if (outs.getPickNum() >= outs.getNeedNum()) {
|
||||||
|
// 读取所有wave_no的outs_check表的数据,全部反馈给EWM
|
||||||
|
List<TAppOutsCheck> checkList = appOutsCheckService.list(new LambdaQueryWrapper<TAppOutsCheck>()
|
||||||
|
.eq(TAppOutsCheck::getWaveNo, outs.getWaveNo()));
|
||||||
|
|
||||||
|
// 回告EWm系统出库完成
|
||||||
|
SendWarehouseOutCompletedRequest request = new SendWarehouseOutCompletedRequest();
|
||||||
|
List<SendWarehouseOutCompletedRequest.PickingDetail> pickingDetails = new ArrayList<>();
|
||||||
|
for (TAppOutsCheck check : checkList){
|
||||||
|
SendWarehouseOutCompletedRequest.PickingDetail pickingDetail = new SendWarehouseOutCompletedRequest.PickingDetail();
|
||||||
|
pickingDetail.setTaskNo(check.getTaskNo());
|
||||||
|
pickingDetail.setMatNo(check.getMatNo());
|
||||||
|
pickingDetail.setPickingQty(Double.valueOf(check.getPickingQty()));
|
||||||
|
pickingDetail.setActQty(Double.valueOf(check.getActQty()));
|
||||||
|
pickingDetail.setUnit(check.getUnit());
|
||||||
|
pickingDetail.setContainerNo(check.getContainerNo());
|
||||||
|
pickingDetails.add(pickingDetail);
|
||||||
|
}
|
||||||
|
request.setPickingDetail(pickingDetails);
|
||||||
|
request.setWaveNo(outs.getWaveNo());
|
||||||
|
request.setPickingType(outs.getPickingType());
|
||||||
|
EwmApiBackResponse ewmApiBackResponse = ewmApiService.sendWarehouseOutCompleted(request);
|
||||||
|
if (Objects.equals(ewmApiBackResponse.getState(), "successfully")) {
|
||||||
|
log.info("调用EWM系统接口成功,请求参数: {}", request);
|
||||||
|
appOutsCheckService.remove(new LambdaQueryWrapper<TAppOutsCheck>()
|
||||||
|
.eq(TAppOutsCheck::getWaveNo, outs.getWaveNo()));
|
||||||
|
}else {
|
||||||
|
log.error("调用EWM系统接口异常,请求参数: {}", request);
|
||||||
|
//return BaseWmsApiResponse.error("调用EWM系统接口异常: " + ewmApiBackResponse.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// 生成记录
|
// 生成记录
|
||||||
TAppOutsRecord record = new TAppOutsRecord(
|
TAppOutsRecord record = new TAppOutsRecord(
|
||||||
outs.getTaskId(),
|
outs.getTaskId(),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.wms_main.mapper.AppOutsCheckMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user