任务推送解耦
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
<view class="table-container" v-if="materialList.length > 0">
|
||||
<uni-table border stripe :emptyText="$t('inbound.bindMsg.noData')">
|
||||
<uni-tr>
|
||||
@@ -97,7 +97,7 @@
|
||||
<view class="button-group" v-if="materialList.length > 0">
|
||||
<button class="confirm-button" @click="handleConfirm">{{ $t('inbound.bindMsg.confirmInbound') }}</button>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 货位选择弹出框 -->
|
||||
<uni-popup ref="cargoSpacePopup" type="center">
|
||||
<view class="popup-content">
|
||||
@@ -174,7 +174,7 @@
|
||||
selectedEntrance: '',
|
||||
selectedEntranceId: '',
|
||||
selectedEntranceIndex: 0,
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
@@ -183,8 +183,8 @@
|
||||
this.$refs.trayCodeInput.onFocus()
|
||||
})
|
||||
}, 100)
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 根据仓库ID获取入口列表
|
||||
@@ -193,7 +193,7 @@
|
||||
this.selectedEntrance = ''
|
||||
this.selectedEntranceId = ''
|
||||
this.selectedEntranceIndex = 0
|
||||
|
||||
|
||||
if (warehouseId === '02') {
|
||||
this.entranceList = [
|
||||
{ id: 'G1001', name: 'G1001' },
|
||||
@@ -202,11 +202,13 @@
|
||||
} else if (warehouseId === '13') {
|
||||
this.entranceList = [
|
||||
{ id: 'G3006', name: 'G3006' },
|
||||
{ id: 'G1001', name: 'G1001' }
|
||||
{ id: 'G2007', name: 'G2007' },
|
||||
{ id: 'G4006', name: 'G4006' },
|
||||
{ id: 'G5006', name: 'G5006' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 处理货位选择
|
||||
async handleRecommendCargoSpace() {
|
||||
// try {
|
||||
@@ -268,14 +270,14 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
const response = await addInJob({
|
||||
cargoSpaceId: this.cargoSpaceId,
|
||||
trayCode: this.trayCode,
|
||||
warehouseId: this.materialList[0].warehouseId
|
||||
})
|
||||
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.bindMsg.inboundSuccess'),
|
||||
@@ -324,7 +326,7 @@
|
||||
async fetchTrayInfo(trayCode) {
|
||||
try {
|
||||
const response = await getTrayInfo(trayCode)
|
||||
|
||||
|
||||
if (response.code===200) {
|
||||
|
||||
if(response.data.length>0){
|
||||
@@ -332,7 +334,7 @@
|
||||
}else{
|
||||
this.materialList=[]
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: response.msg || this.$t('inbound.bindMsg.getTrayInfoFailed'),
|
||||
@@ -362,7 +364,7 @@
|
||||
if (warehouseType === '1') {
|
||||
// 显示货位选择弹出框
|
||||
this.$refs.cargoSpacePopup.open()
|
||||
|
||||
|
||||
} else {
|
||||
// 非货位类型仓库,显示入口选择弹出框
|
||||
this.getEntranceListByWarehouseId(warehouseId)
|
||||
@@ -428,7 +430,7 @@
|
||||
trayCode: this.trayCode,
|
||||
warehouseId: this.materialList[0].warehouseId
|
||||
})
|
||||
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.bindMsg.inboundSuccess'),
|
||||
@@ -459,7 +461,7 @@
|
||||
warehouseId: this.materialList[0].warehouseId,
|
||||
entranceId: this.selectedEntranceId
|
||||
})
|
||||
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.bindMsg.inboundSuccess'),
|
||||
@@ -503,7 +505,7 @@
|
||||
if (this.subOrderInfo) {
|
||||
this.$refs.subOrderPopup.open()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 处理子单据清除事件
|
||||
@@ -579,7 +581,7 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const response = await bindTray({
|
||||
trayCode: this.trayCode,
|
||||
@@ -597,7 +599,7 @@
|
||||
this.subOrderInfo = null
|
||||
this.inQuantity=''
|
||||
this.fetchTrayInfo(this.trayCode)
|
||||
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: response.msg || this.$t('inbound.bindMsg.bindFailed'),
|
||||
@@ -621,7 +623,7 @@
|
||||
trayCode: this.trayCode,
|
||||
stockinDetailId: stockinDetailId
|
||||
})
|
||||
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.bindMsg.unbindSuccess'),
|
||||
@@ -644,7 +646,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -665,38 +667,38 @@
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.input-label {
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
||||
.scan-icon {
|
||||
font-size: 40rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.table-container {
|
||||
background-color: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
|
||||
.cargo-space-container {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.cargo-space-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.recommend-btn {
|
||||
background-color: #409eff;
|
||||
color: #ffffff;
|
||||
@@ -707,12 +709,12 @@
|
||||
font-size: 28rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.button-group {
|
||||
margin-top: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.confirm-button {
|
||||
background-color: #409eff;
|
||||
color: #ffffff;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.GenAgvSchedulingTaskRequest;
|
||||
import com.ruoyi.api.domain.SsjTaskNoParam;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -20,23 +21,6 @@ public class ToWcsApiController {
|
||||
@Autowired
|
||||
private IToWcsService toWcsService;
|
||||
|
||||
/**
|
||||
* 推送CTU出库任务
|
||||
*//*
|
||||
//@PostMapping("/pushOutMydoJob")
|
||||
@Scheduled(fixedDelay=10000)
|
||||
public void pushOutMydoJob() {
|
||||
toWcsService.pushOutMydoJob();
|
||||
}
|
||||
|
||||
*//**
|
||||
* 推送CTU流利架空料箱入库任务
|
||||
*//*
|
||||
@Scheduled(fixedDelay=10000)
|
||||
public void pushInMydoJob() {
|
||||
toWcsService.pushInMydoJob();
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 推送agv搬运作业
|
||||
* @return
|
||||
|
||||
@@ -40,6 +40,17 @@ public class ToWmsApiController {
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库任务请求
|
||||
*/
|
||||
@PostMapping("/requestEnterByTaskNo")
|
||||
public AjaxResult requestEnterByTaskNo(@RequestBody RequestEnter requestEnter) {
|
||||
AjaxResult ajaxResult = toWmsService.requestEnterByTaskNo(requestEnter);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库任务请求(任务号)",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 小车接收开始信号
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SsjTaskNoParam {
|
||||
private String taskNo;
|
||||
private String deviceCode;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.api.service;
|
||||
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.GenAgvSchedulingTaskRequest;
|
||||
import com.ruoyi.api.domain.SsjTaskNoParam;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
|
||||
@@ -49,4 +49,8 @@ public interface IToWmsService {
|
||||
* @return
|
||||
*/
|
||||
AjaxResult takeCompleted(Map<String, Object> map);
|
||||
/**
|
||||
* 入库任务请求根据任务号
|
||||
*/
|
||||
AjaxResult requestEnterByTaskNo(RequestEnter requestEnter);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.GenAgvSchedulingTaskRequest;
|
||||
import com.ruoyi.api.domain.SsjTaskNoParam;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.api.service.IToWmsService;
|
||||
@@ -30,6 +31,7 @@ import com.ruoyi.log.service.IRequestLogService;
|
||||
import com.ruoyi.out.tagTask.domain.TagTask;
|
||||
import com.ruoyi.out.tagTask.service.ITagTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
@@ -46,14 +48,18 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
@Autowired
|
||||
private IAgvContainerTaskService agvContainerTaskService;
|
||||
|
||||
public static final String PUSH_OUT_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveOutMydoJob";
|
||||
public static final String PUSH_IN_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveInMydoJob";
|
||||
public static final String PUSH_AGV_MOVE_JOB = "http://localhost:8081/agv/api/receiveAgvMoveJob";
|
||||
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2Wms/api/outMydojobMakesure";
|
||||
public static final String CANCEL_MYDOJOB = "http://localhost:8081/wcs2Wms/api/cancelMydoJob";
|
||||
public static final String WCS_BASE_URL = "http://localhost:8081/wcs2Wms/api";
|
||||
|
||||
public static final String PUSH_OUT_MYDO_JOB = WCS_BASE_URL+"/receiveOutMydoJob";
|
||||
public static final String PUSH_IN_MYDO_JOB = WCS_BASE_URL+"/receiveInMydoJob";
|
||||
public static final String PUSH_AGV_MOVE_JOB = WCS_BASE_URL+"/receiveAgvMoveJob";
|
||||
public static final String OUT_MYDOJOB_MS = WCS_BASE_URL+"/outMydojobMakesure";
|
||||
public static final String CANCEL_MYDOJOB = WCS_BASE_URL+"/cancelMydoJob";
|
||||
public static final String PUSH_SSJ_TASK_NO = WCS_BASE_URL+"/receiveSsjTaskNo";
|
||||
|
||||
|
||||
@Override
|
||||
@Scheduled(cron = "0/5 * * * * ?")
|
||||
public void pushOutMydoJob() {
|
||||
//查询所有未推送的料箱出库作业
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
@@ -93,9 +99,10 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Scheduled(cron = "0/5 * * * * ?")
|
||||
public void pushInMydoJob() {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setInOrOut("1");
|
||||
mydoJobParam.setInOut("1");
|
||||
mydoJobParam.setStatus("1");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (CollUtil.isNotEmpty(mydoJobs)){
|
||||
@@ -107,17 +114,6 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
}
|
||||
}
|
||||
}
|
||||
mydoJobParam.setEntranceId("fluent");
|
||||
mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (CollUtil.isNotEmpty(mydoJobs)){
|
||||
for (MydoJob mydoJob : mydoJobs) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(PUSH_IN_MYDO_JOB, JSONUtil.toJsonStr(mydoJob), "推送出库任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
mydoJob.setStatus("2");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.out.tagTask.domain.TagTask;
|
||||
import com.ruoyi.out.tagTask.service.ITagTaskService;
|
||||
import com.ruoyi.out.tagTask.thread.TagOutReadThread;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -66,70 +65,69 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
private IAgvContainerTaskService agvContainerTaskService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult requestEnterByTrayCode(RequestEnter requestEnter) {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setTrayCode(requestEnter.getTrayCode());
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if(mydoJobs.isEmpty()){
|
||||
if (mydoJobs.isEmpty()) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message"));
|
||||
}
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
if ("1".equals(mydoJob.getExecutionPhase())){
|
||||
if ("1".equals(mydoJob.getExecutionPhase())) {
|
||||
mydoJob.setExecutionPhase("2");
|
||||
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJob.setStatus("2");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
}
|
||||
return AjaxResult.success(new RequestEnterResponse(mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo()));
|
||||
return AjaxResult.success(new RequestEnterResponse(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), mydoJob.getTaskNo()));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult jobFinish(WmsJobRequest wmsJobRequest) {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
switch (wmsJobRequest.getWmsType()){
|
||||
switch (wmsJobRequest.getWmsType()) {
|
||||
case "1":
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTrayCode())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTrayCode())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message1"));
|
||||
}
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message2"));
|
||||
}
|
||||
//入库
|
||||
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
|
||||
mydoJobParam.setTrayCode(wmsJobRequest.getTrayCode());
|
||||
List<MydoJob> inMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (inMydoJobs.isEmpty()){
|
||||
if (inMydoJobs.isEmpty()) {
|
||||
return AjaxResult.error(MessageUtils.message("warn.message"));
|
||||
}
|
||||
MydoJob inMydoJob = inMydoJobs.get(0);
|
||||
mydoJobService.manualCompleted(inMydoJob,1);
|
||||
mydoJobService.manualCompleted(inMydoJob, 1);
|
||||
break;
|
||||
case "2":
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPickSsj())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPickSsj())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message3"));
|
||||
}
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message2"));
|
||||
}
|
||||
//出库
|
||||
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
|
||||
//mydoJobParam.setTrayCode(wmsJobRequest.getTrayCode());
|
||||
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (outMydoJobs.isEmpty()){
|
||||
if (outMydoJobs.isEmpty()) {
|
||||
return AjaxResult.error(MessageUtils.message("warn.message"));
|
||||
}
|
||||
MydoJob outJob = outMydoJobs.get(0);
|
||||
//料箱出库 需同步电子标签
|
||||
if("23".equals(outJob.getInOrOut())){
|
||||
if ("23".equals(outJob.getInOrOut())) {
|
||||
//查询拣选工位绑定的电子标签
|
||||
BasTag tagParam = new BasTag();
|
||||
tagParam.setPickAdd(wmsJobRequest.getPickSsj());
|
||||
tagParam.setSpare3("1");
|
||||
List<BasTag> tags = iBasTagService.selectBasTagList(tagParam);
|
||||
if (tags.isEmpty()){
|
||||
if (tags.isEmpty()) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message4"));
|
||||
}
|
||||
BasTag basTag = tags.get(0);
|
||||
@@ -155,13 +153,13 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getContainerCode())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getContainerCode())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message5"));
|
||||
}
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPositionCode1())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPositionCode1())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message6"));
|
||||
}
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPositionCode2())){
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getPositionCode2())) {
|
||||
return AjaxResult.error(MessageUtils.message("error.message7"));
|
||||
}
|
||||
//agv搬运作业
|
||||
@@ -170,7 +168,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
basContainerParam.setContainerId(wmsJobRequest.getContainerCode());
|
||||
//basContainerParam.setPortName(wmsJobRequest.getPositionCode2());
|
||||
List<BasContainer> basContainers = basContainerService.selectBasContainerList(basContainerParam);
|
||||
if (basContainers.isEmpty()){
|
||||
if (basContainers.isEmpty()) {
|
||||
log.error("没有该料架 {}", wmsJobRequest.getContainerCode());
|
||||
return AjaxResult.error(MessageUtils.message("error.message11"));
|
||||
}
|
||||
@@ -183,7 +181,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
AgvContainerTask agvContainerTaskParam = new AgvContainerTask();
|
||||
agvContainerTaskParam.setContainer(basContainer.getContainerId());
|
||||
List<AgvContainerTask> agvContainerTasks = agvContainerTaskService.selectAgvContainerTaskList(agvContainerTaskParam);
|
||||
if (CollUtil.isNotEmpty(agvContainerTasks)){
|
||||
if (CollUtil.isNotEmpty(agvContainerTasks)) {
|
||||
for (AgvContainerTask agvContainerTask : agvContainerTasks) {
|
||||
agvContainerTask.setStatus("2");
|
||||
agvContainerTask.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||
@@ -206,10 +204,10 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(reMaterialParam.getJobId());
|
||||
String warehouseId = mydoJob.getWarehouseId();
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectEmptyCargoSpaceByWarehouseId(warehouseId);
|
||||
if (basCargoSpace == null){
|
||||
if (basCargoSpace == null) {
|
||||
log.error("没有空货位");
|
||||
return AjaxResult.error(MessageUtils.message("error.message20"));
|
||||
}else {
|
||||
} else {
|
||||
mydoJob.setCargoSpaceId(basCargoSpace.getCargoSpaceId());
|
||||
mydoJob.setFaultFlag("1");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
@@ -236,13 +234,13 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult startSignal(RequestEnter requestEnter) {
|
||||
switch (requestEnter.getWmsType()){
|
||||
switch (requestEnter.getWmsType()) {
|
||||
case "1":
|
||||
case "2":
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setTaskNo(requestEnter.getTaskNo());
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (mydoJobs.isEmpty()){
|
||||
if (mydoJobs.isEmpty()) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
for (MydoJob mydoJob1 : mydoJobs) {
|
||||
@@ -255,7 +253,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
AgvContainerTask agvContainerTaskParam = new AgvContainerTask();
|
||||
agvContainerTaskParam.setTaskNo(requestEnter.getTaskNo());
|
||||
List<AgvContainerTask> agvContainerTasks = agvContainerTaskService.selectAgvContainerTaskList(agvContainerTaskParam);
|
||||
if (CollUtil.isEmpty(agvContainerTasks)){
|
||||
if (CollUtil.isEmpty(agvContainerTasks)) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
for (AgvContainerTask agvContainerTask : agvContainerTasks) {
|
||||
@@ -269,19 +267,20 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* ctu取完箱子反馈
|
||||
* @param map{
|
||||
* "portCode"
|
||||
* "wmsType"
|
||||
* }
|
||||
*
|
||||
* @param map{ "portCode"
|
||||
* "wmsType"
|
||||
* }
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult takeCompleted(Map<String, Object> map) {
|
||||
String wmsType = Convert.toStr(map.get("wmsType"));
|
||||
|
||||
switch (wmsType){
|
||||
switch (wmsType) {
|
||||
case "1":
|
||||
//流利架入库
|
||||
String lljCode = Convert.toStr(map.get("portCode"));
|
||||
@@ -292,23 +291,41 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
basTag.setSpare2("2");
|
||||
iBasTagService.updateBasTag(basTag);
|
||||
}
|
||||
case "2":
|
||||
case "2":
|
||||
|
||||
break;
|
||||
case "3":
|
||||
//小车搬运料架
|
||||
String startPoint = Convert.toStr(map.get("portCode"));
|
||||
BasContainer basContainerParam = new BasContainer();
|
||||
basContainerParam.setPortName(startPoint);
|
||||
List<BasContainer> basContainers = basContainerService.selectBasContainerList(basContainerParam);
|
||||
for (BasContainer basContainer : basContainers) {
|
||||
basContainer.setPortName("");
|
||||
basContainerService.updateBasContainer(basContainer);
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
//小车搬运料架
|
||||
String startPoint = Convert.toStr(map.get("portCode"));
|
||||
BasContainer basContainerParam = new BasContainer();
|
||||
basContainerParam.setPortName(startPoint);
|
||||
List<BasContainer> basContainers = basContainerService.selectBasContainerList(basContainerParam);
|
||||
for (BasContainer basContainer : basContainers) {
|
||||
basContainer.setPortName("");
|
||||
basContainerService.updateBasContainer(basContainer);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("wmsType错误");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult requestEnterByTaskNo(RequestEnter requestEnter) {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setTaskNo(requestEnter.getTaskNo());
|
||||
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.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJob.setStatus("2");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
}
|
||||
return AjaxResult.success(new RequestEnterResponse(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), mydoJob.getTaskNo()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("v_stock_check_id", currentCheckStock.getStockCheckId());
|
||||
checkStockinMapper.autoAllot(map);
|
||||
iToWcsService.pushOutMydoJob();
|
||||
//iToWcsService.pushOutMydoJob();
|
||||
if ("10".equals(map.get("v_result"))){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
|
||||
@@ -516,7 +516,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
map.put("v_stock_id", stockId);
|
||||
map.put("v_exit_id", exitId);
|
||||
mydoJobMapper.pointOut(map);
|
||||
iToWcsService.pushOutMydoJob();
|
||||
//iToWcsService.pushOutMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
msg = "操作成功!";
|
||||
|
||||
@@ -181,7 +181,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
if (detail.getAllotQuantity().compareTo(detail.getQuantity()) < 0){
|
||||
map.put("v_stockout_detail_id", detail.getStockoutDetailId());
|
||||
outStockoutMapper.autoAllot(map);
|
||||
toWcsService.pushOutMydoJob();
|
||||
//toWcsService.pushOutMydoJob();
|
||||
if (!"10".equals(map.get("v_result"))){
|
||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ public class TagInReadThread implements Runnable {
|
||||
trayCodeMsg.setWarehouseId("02");
|
||||
trayCodeMsg.setEntranceId(basTag.getPickAdd());
|
||||
pdaService.emptyBoxIn(trayCodeMsg);
|
||||
toWcsService.pushInMydoJob();
|
||||
//toWcsService.pushInMydoJob();
|
||||
} else {
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
mydoJob.setEntranceId(basTag.getPickAdd());
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
toWcsService.pushInMydoJob();
|
||||
//toWcsService.pushInMydoJob();
|
||||
}
|
||||
//ctu 取货完成,灭灯
|
||||
boolean b1 = ElectronicTagClient.sendDzbqOff(socket, Convert.toInt(basTag.getId()));
|
||||
|
||||
@@ -9,6 +9,7 @@ import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.SsjTaskNoParam;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
@@ -226,6 +227,7 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addInJob(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
@@ -328,7 +330,7 @@ public class PdaServiceImp implements PdaService {
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_type", "1");
|
||||
pdaMapper.outMakeSure(map);
|
||||
iToWcsService.pushInMydoJob();
|
||||
//iToWcsService.pushInMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
//通知wcs 出库确认
|
||||
@@ -391,7 +393,7 @@ public class PdaServiceImp implements PdaService {
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_type", "1");
|
||||
pdaMapper.outMakeSure(map);
|
||||
iToWcsService.pushInMydoJob();
|
||||
//iToWcsService.pushInMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse, mydoJob);
|
||||
@@ -475,7 +477,7 @@ public class PdaServiceImp implements PdaService {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
pdaMapper.checkMakeSure(map);
|
||||
iToWcsService.pushInMydoJob();
|
||||
//iToWcsService.pushInMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
@@ -597,7 +599,7 @@ public class PdaServiceImp implements PdaService {
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_type", "1");
|
||||
pdaMapper.outMakeSureException(map);
|
||||
iToWcsService.pushInMydoJob();
|
||||
//iToWcsService.pushInMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
//删除电子标签信息
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user