修改流利架空料箱入库逻辑
This commit is contained in:
@@ -35,25 +35,7 @@ public class AgvController extends BaseController {
|
|||||||
return apiService.agvCallback(request);
|
return apiService.agvCallback(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 接收出库任务
|
|
||||||
* @param mydoJob
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/receiveOutMydoJob")
|
|
||||||
public AjaxResult receiveOutMydoJob(@RequestBody MydoJob mydoJob) {
|
|
||||||
return apiService.receiveOutMydoJob(mydoJob);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 接收流利架空料箱入库任务
|
|
||||||
* @param mydoJob
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/receiveInMydoJob")
|
|
||||||
public AjaxResult receiveInMydoJob(@RequestBody MydoJob mydoJob) {
|
|
||||||
return apiService.receiveInMydoJob(mydoJob);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.ruoyi.api.controller;
|
package com.ruoyi.api.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@@ -7,4 +13,36 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/wcs2Wms/api")
|
@RequestMapping("/wcs2Wms/api")
|
||||||
public class Wcs2WmsController {
|
public class Wcs2WmsController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IApiService apiService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收出库任务
|
||||||
|
* @param mydoJob
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/receiveOutMydoJob")
|
||||||
|
public AjaxResult receiveOutMydoJob(@RequestBody MydoJob mydoJob) {
|
||||||
|
return apiService.receiveOutMydoJob(mydoJob);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收流利架空料箱入库任务
|
||||||
|
* @param mydoJob
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/receiveInMydoJob")
|
||||||
|
public AjaxResult receiveInMydoJob(@RequestBody MydoJob mydoJob) {
|
||||||
|
return apiService.receiveInMydoJob(mydoJob);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流利架出库确认,清空状态记录表
|
||||||
|
* @param mydoJob
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/outMydojobMakesure")
|
||||||
|
public AjaxResult outMydojobMakesure(@RequestBody MydoJob mydoJob) {
|
||||||
|
return apiService.outMydojobMakesure(mydoJob);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,4 +122,11 @@ public interface IApiService
|
|||||||
* @param mydoJob
|
* @param mydoJob
|
||||||
*/
|
*/
|
||||||
AjaxResult receiveInMydoJob(MydoJob mydoJob);
|
AjaxResult receiveInMydoJob(MydoJob mydoJob);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流利架状态清空表
|
||||||
|
* @param mydoJob
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult outMydojobMakesure(MydoJob mydoJob);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRespons
|
|||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.PositionCodeData;
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.PositionCodeData;
|
||||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
|
||||||
|
import com.ruoyi.bas.fluent.service.IBasFluentFrameService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.device.agv.domain.AgvQueue;
|
import com.ruoyi.device.agv.domain.AgvQueue;
|
||||||
@@ -50,6 +52,8 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
private RequestLogServiceImpl requestLogService;
|
private RequestLogServiceImpl requestLogService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAgvQueueService agvQueueService;
|
private IAgvQueueService agvQueueService;
|
||||||
|
@Autowired
|
||||||
|
private IBasFluentFrameService fluentFrameService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求入库
|
* 请求入库
|
||||||
@@ -236,7 +240,13 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
fluentPickParam.put("wmsType", "2");
|
fluentPickParam.put("wmsType", "2");
|
||||||
fluentPickParam.put("pickSsj", agvQueue.getPositionCode2());
|
fluentPickParam.put("pickSsj", agvQueue.getPositionCode2());
|
||||||
RequestLog requestLog = finishMydoJob(JOB_FINISH_URL, "流利架任务到达拣选口", fluentPickParam);
|
RequestLog requestLog = finishMydoJob(JOB_FINISH_URL, "流利架任务到达拣选口", fluentPickParam);
|
||||||
log.info("【AGV流利架任务结束】任务号:{},返回结果{}", taskCode, requestLog);
|
agvQueue.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
agvQueueService.updateAgvQueue(agvQueue);
|
||||||
|
//插入历史
|
||||||
|
agvQueueService.insertHistory(agvQueue.getReqCode());
|
||||||
|
//删除队列
|
||||||
|
agvQueueService.deleteAgvQueueByReqCode(agvQueue.getReqCode());
|
||||||
|
log.info("【AGV出库任务结束】任务号:{}", taskCode);
|
||||||
}else {
|
}else {
|
||||||
//输送机出库 PLC写入任务号
|
//输送机出库 PLC写入任务号
|
||||||
//通知wms 任务结束
|
//通知wms 任务结束
|
||||||
@@ -328,6 +338,26 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流利架出库确认,清空流利架状态信息
|
||||||
|
* @param mydoJob
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult outMydojobMakesure(MydoJob mydoJob) {
|
||||||
|
BasFluentFrame param = new BasFluentFrame();
|
||||||
|
param.setTrayCode(mydoJob.getTrayCode());
|
||||||
|
List<BasFluentFrame> basFluentFrames = fluentFrameService.selectBasFluentFrameList(param);
|
||||||
|
if (CollUtil.isEmpty(basFluentFrames)){
|
||||||
|
return AjaxResult.error("无流利架信息");
|
||||||
|
}
|
||||||
|
BasFluentFrame basFluentFrame = basFluentFrames.get(0);
|
||||||
|
basFluentFrame.setTrayCode("");
|
||||||
|
basFluentFrame.setAllotNum(0L);
|
||||||
|
fluentFrameService.updateBasFluentFrame(basFluentFrame);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成agv队列
|
* 生成agv队列
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="wmsTaskType != null and wmsTaskType != ''"> and wms_task_type = #{wmsTaskType}</if>
|
<if test="wmsTaskType != null and wmsTaskType != ''"> and wms_task_type = #{wmsTaskType}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by req_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAgvQueueFinishByReqCode" parameterType="String" resultMap="AgvQueueFinishResult">
|
<select id="selectAgvQueueFinishByReqCode" parameterType="String" resultMap="AgvQueueFinishResult">
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||||
<if test="wmsTaskType != null and wmsTaskType != ''"> and wms_task_type = #{wmsTaskType}</if>
|
<if test="wmsTaskType != null and wmsTaskType != ''"> and wms_task_type = #{wmsTaskType}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by req_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAgvQueueByReqCode" parameterType="String" resultMap="AgvQueueResult">
|
<select id="selectAgvQueueByReqCode" parameterType="String" resultMap="AgvQueueResult">
|
||||||
|
|||||||
@@ -115,9 +115,9 @@ public class SecurityConfig
|
|||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/changeLanguage", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/pda/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/changeLanguage", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/pda/**").permitAll()
|
||||||
.antMatchers("/device/api/**").permitAll()
|
|
||||||
.antMatchers("/device/operation/**").permitAll()
|
.antMatchers("/device/operation/**").permitAll()
|
||||||
.antMatchers("/agv/api/**").permitAll()
|
.antMatchers("/agv/api/**").permitAll()
|
||||||
|
.antMatchers("/wcs2Wms/api/**").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
<dict-tag :options="dict.type.wms_task_type" :value="scope.row.wmsTaskType"/>
|
<dict-tag :options="dict.type.wms_task_type" :value="scope.row.wmsTaskType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
v-hasPermi="['agv:queue:remove']"
|
v-hasPermi="['agv:queue:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|||||||
Reference in New Issue
Block a user