回流输送机发送去向
This commit is contained in:
@@ -43,9 +43,9 @@ public class ToWmsApiController {
|
||||
/**
|
||||
* 入库任务请求
|
||||
*/
|
||||
@PostMapping("/requestEnterByTaskNo")
|
||||
public AjaxResult requestEnterByTaskNo(@RequestBody RequestEnter requestEnter) {
|
||||
AjaxResult ajaxResult = toWmsService.requestEnterByTaskNo(requestEnter);
|
||||
@PostMapping("/requestEnterByEnterId")
|
||||
public AjaxResult requestEnterByEnterId(@RequestBody RequestEnter requestEnter) {
|
||||
AjaxResult ajaxResult = toWmsService.requestEnterByEnterId(requestEnter);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库任务请求(任务号)",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
|
||||
@@ -53,4 +53,11 @@ public interface IToWmsService {
|
||||
* 入库任务请求根据任务号
|
||||
*/
|
||||
AjaxResult requestEnterByTaskNo(RequestEnter requestEnter);
|
||||
|
||||
/**
|
||||
* 根据入口获取入库任务
|
||||
* @param requestEnter
|
||||
* @return
|
||||
*/
|
||||
AjaxResult requestEnterByEnterId(RequestEnter requestEnter);
|
||||
}
|
||||
|
||||
@@ -148,8 +148,6 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
tagTask.setFloor("0");
|
||||
tagTaskService.insertTagTask(tagTask);
|
||||
}
|
||||
//开启线程
|
||||
//new Thread(new TagOutReadThread(basTag.getIp())).start();
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
@@ -328,4 +326,22 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
}
|
||||
return AjaxResult.success(new RequestEnterResponse(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), mydoJob.getTaskNo()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult requestEnterByEnterId(RequestEnter requestEnter) {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJobParam.setStatus("1");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (mydoJobs.isEmpty()) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message"));
|
||||
}
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
if ("1".equals(mydoJob.getExecutionPhase())) {
|
||||
mydoJob.setExecutionPhase("2");
|
||||
mydoJob.setStatus("2");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
}
|
||||
return AjaxResult.success(new RequestEnterResponse(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), mydoJob.getTaskNo()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,15 +93,17 @@ public class TagOutReadThread implements Runnable {
|
||||
//出库确认
|
||||
TrayCodeMakeSure trayCodeMakeSure = new TrayCodeMakeSure();
|
||||
trayCodeMakeSure.setTrayCode(basTag.getTrayCode());
|
||||
trayCodeMakeSure.setPickId(basTag.getPickAdd());
|
||||
AjaxResult ajaxResult = pdaService.outMakeSure(trayCodeMakeSure);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
//删除标签绑定信息
|
||||
/*//删除标签绑定信息
|
||||
basTag.setSendCompleted("0");
|
||||
basTag.setTrayCode("");
|
||||
basTagService.updateBasTag(basTag);
|
||||
//删除tagList
|
||||
tagTaskMapper.deleteTagTaskByIds(allTagTasks.stream().map(TagTask::getId).toArray(Long[]::new));
|
||||
tagTaskMapper.deleteTagTaskByIds(allTagTasks.stream().map(TagTask::getId).toArray(Long[]::new));*/
|
||||
log.info("下发电子标签灭灯:ip:{},id:{}", basTag.getIp(), basTag.getId());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public class TrayCodeMakeSure {
|
||||
private String warehouseId;
|
||||
|
||||
private String exitId;
|
||||
|
||||
private String pickId;
|
||||
//拣选详情列表
|
||||
private List<MydoJobDetail> mydoJobDetailList;
|
||||
//盘点详情列表
|
||||
|
||||
@@ -335,6 +335,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
//通知wcs 出库确认
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse, mydoJob);
|
||||
wcsMakeSure(trayCodeMakeSure, mydoJob);
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
@@ -358,10 +359,6 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
|
||||
|
||||
//修改拣选数量
|
||||
//MydoJobDetail mydoJobDetailOld = mydoJobDetailService.selectMydoJobDetailByJobDetailId(mydoJobDetail.getJobDetailId());
|
||||
/*BigDecimal oldPickQuantity = Convert.toBigDecimal(mydoJobDetailOld.getPickQuantity());
|
||||
BigDecimal newPickQuantity = Convert.toBigDecimal(mydoJobDetail.getOutQuantity());*/
|
||||
mydoJobDetail.setPickQuantity(mydoJobDetail.getOutQuantity());
|
||||
mydoJobDetailService.updateMydoJobDetail(mydoJobDetail);
|
||||
|
||||
@@ -397,6 +394,7 @@ public class PdaServiceImp implements PdaService {
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse, mydoJob);
|
||||
wcsMakeSure(trayCodeMakeSure, mydoJob);
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
@@ -517,6 +515,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("2".equals(basWarehouse.getWarehouseType()) && "23".equals(mydoJob.getInOrOut())) {
|
||||
BasTag basTag = basTagService.selectBasTagByTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
basTag.setTrayCode("");
|
||||
basTag.setSendCompleted("0");
|
||||
basTagService.updateBasTag(basTag);
|
||||
//删除电子标签
|
||||
TagTask param = new TagTask();
|
||||
@@ -527,19 +526,35 @@ public class PdaServiceImp implements PdaService {
|
||||
.map(TagTask::getId)
|
||||
.toArray(Long[]::new));
|
||||
}
|
||||
if (mydoJob.getExitId().startsWith("fluent")) {
|
||||
//通知wcs出库确认成功
|
||||
HashMap<String, String> outMydojobMakeSureParam = new HashMap<>();
|
||||
outMydojobMakeSureParam.put("trayCode", trayCodeMakeSure.getTrayCode());
|
||||
AjaxResult ajaxResult = iToWcsService.outMydojobMakeSure(outMydojobMakeSureParam);
|
||||
if (!ajaxResult.isSuccess()) {
|
||||
throw new RuntimeException(ajaxResult.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知wcs出库确认成功
|
||||
* @param trayCodeMakeSure
|
||||
* @param mydoJob
|
||||
*/
|
||||
private void wcsMakeSure(TrayCodeMakeSure trayCodeMakeSure, MydoJob mydoJob) {
|
||||
String type;
|
||||
if (mydoJob.getExitId().startsWith("fluent")) {
|
||||
//流利架
|
||||
type = "1";
|
||||
}else {
|
||||
//输送机
|
||||
type = "2";
|
||||
}
|
||||
//通知wcs出库确认成功
|
||||
HashMap<String, String> outMydojobMakeSureParam = new HashMap<>();
|
||||
outMydojobMakeSureParam.put("trayCode", trayCodeMakeSure.getTrayCode());
|
||||
outMydojobMakeSureParam.put("type", type);
|
||||
outMydojobMakeSureParam.put("pickSsj", trayCodeMakeSure.getPickId());
|
||||
AjaxResult ajaxResult = iToWcsService.outMydojobMakeSure(outMydojobMakeSureParam);
|
||||
if (!ajaxResult.isSuccess()) {
|
||||
throw new RuntimeException(ajaxResult.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult outException(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
@@ -604,6 +619,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
//删除电子标签信息
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse, mydoJob);
|
||||
wcsMakeSure(trayCodeMakeSure, mydoJob);
|
||||
//自动分配
|
||||
return outStockoutService.autoAllot(stockOutId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user