手持机
This commit is contained in:
@@ -29,4 +29,6 @@ public class ToWcsApiController {
|
||||
public AjaxResult pushAgvMoveJob(@RequestBody AgvMoveParam agvMoveParam) {
|
||||
return toWcsService.pushAgvMoveJob(agvMoveParam);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
157
ruoyi-admin/src/main/java/com/ruoyi/api/domain/WcsPort.java
Normal file
157
ruoyi-admin/src/main/java/com/ruoyi/api/domain/WcsPort.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 点位管理对象 wcs_port
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public class WcsPort extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 点位编码 */
|
||||
@Excel(name = "点位编码")
|
||||
private String portCode;
|
||||
|
||||
/** 点位名称 */
|
||||
@Excel(name = "点位名称")
|
||||
private String portName;
|
||||
|
||||
/** 点位类型 */
|
||||
@Excel(name = "点位类型")
|
||||
private String portType;
|
||||
|
||||
/** 点位区域 */
|
||||
@Excel(name = "点位区域")
|
||||
private String portRegion;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare3;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setPortCode(String portCode)
|
||||
{
|
||||
this.portCode = portCode;
|
||||
}
|
||||
|
||||
public String getPortCode()
|
||||
{
|
||||
return portCode;
|
||||
}
|
||||
|
||||
public void setPortName(String portName)
|
||||
{
|
||||
this.portName = portName;
|
||||
}
|
||||
|
||||
public String getPortName()
|
||||
{
|
||||
return portName;
|
||||
}
|
||||
|
||||
public void setPortType(String portType)
|
||||
{
|
||||
this.portType = portType;
|
||||
}
|
||||
|
||||
public String getPortType()
|
||||
{
|
||||
return portType;
|
||||
}
|
||||
|
||||
public void setPortRegion(String portRegion)
|
||||
{
|
||||
this.portRegion = portRegion;
|
||||
}
|
||||
|
||||
public String getPortRegion()
|
||||
{
|
||||
return portRegion;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("portCode", getPortCode())
|
||||
.append("portName", getPortName())
|
||||
.append("portType", getPortType())
|
||||
.append("portRegion", getPortRegion())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.api.service;
|
||||
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.WcsPort;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -40,4 +41,8 @@ public interface IToWcsService {
|
||||
AjaxResult cancelTaskByTaskNo(String taskNo);
|
||||
|
||||
|
||||
AjaxResult selectWcsPort();
|
||||
|
||||
AjaxResult updateWcsPort(WcsPort wcsPort);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.AgvMoveParam;
|
||||
import com.ruoyi.api.domain.WcsPort;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
@@ -37,6 +38,8 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
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 SELECT_WCS_PORT = "http://localhost:8081/wcs2Wms/api/selectWcsPort";
|
||||
public static final String UPDATE_WCS_PORT = "http://localhost:8081/wcs2Wms/api/updateWcsPort";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -127,5 +130,29 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
return AjaxResult.error(requestLog.getErrorDetails());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectWcsPort() {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
RequestLog requestLog = requestLogService.getRequestLog(SELECT_WCS_PORT, JSONUtil.toJsonStr(map), "查询缓存点");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
//将requestLog中的responseBody转为List<WcsPort>
|
||||
AjaxResult bean = JSONUtil.toBean(requestLog.getResponseBody(), AjaxResult.class);
|
||||
List<WcsPort> wcsPortList = JSONUtil.toList(JSONUtil.parseArray(bean.get("data")), WcsPort.class);
|
||||
return AjaxResult.success(wcsPortList);
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateWcsPort(WcsPort wcsPort) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("portCode", wcsPort.getPortCode());
|
||||
map.put("status", wcsPort.getStatus());
|
||||
RequestLog requestLog = requestLogService.getRequestLog(UPDATE_WCS_PORT, JSONUtil.toJsonStr(map), "修改缓存点状态");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.ruoyi.pda.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WcsPort;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.bas.container.domain.BasContainer;
|
||||
@@ -50,6 +52,7 @@ public class PdaController extends BaseController {
|
||||
private PdaService pdaService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 入库扫码生成作业
|
||||
*/
|
||||
@@ -101,6 +104,18 @@ public class PdaController extends BaseController {
|
||||
return pdaService.checkMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
|
||||
@RequestMapping("/selectWcsPort")
|
||||
@ResponseBody
|
||||
public AjaxResult selectWcsPort() {
|
||||
return pdaService.selectWcsPort();
|
||||
}
|
||||
|
||||
@RequestMapping("/updateWcsPort")
|
||||
@ResponseBody
|
||||
public AjaxResult updateWcsPort(@RequestBody WcsPort wcsPort) {
|
||||
return pdaService.updateWcsPort(wcsPort);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.pda.service;
|
||||
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WcsPort;
|
||||
import com.ruoyi.bas.container.domain.BasContainer;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.pda.domain.TrayCodeMakeSure;
|
||||
@@ -21,5 +22,9 @@ public interface PdaService {
|
||||
|
||||
AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure);
|
||||
|
||||
public AjaxResult selectWcsPort();
|
||||
|
||||
AjaxResult updateWcsPort(WcsPort wcsport);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.pda.service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WcsPort;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.api.service.IToWmsService;
|
||||
import com.ruoyi.check.commit.domain.CheckCommitRecord;
|
||||
import com.ruoyi.check.commit.service.ICheckCommitRecordService;
|
||||
@@ -45,18 +47,22 @@ public class PdaServiceImp implements PdaService {
|
||||
private IToWmsService iToWmsService;
|
||||
@Autowired
|
||||
private IMydoJobDetailService mydoJobDetailService;
|
||||
@Autowired
|
||||
private IToWcsService toWcsService;
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult addInJob(RequestEnter requestEnter) {
|
||||
if(requestEnter.getEntranceId()!=null && "G1005".equals(requestEnter.getEntranceId())){
|
||||
if(requestEnter.getEntranceId()!=null){
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJob.setStatus("1");
|
||||
MydoJob mydoJob1 = mydoJobService.selectMydoJobByEntranceId(mydoJob);
|
||||
if(mydoJob1!=null){
|
||||
return AjaxResult.error("该入口已有补码作业");
|
||||
return AjaxResult.error("该入口已有作业");
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("请选择出口");
|
||||
}
|
||||
AjaxResult ajaxResult = iToWmsService.requestEnterByTrayCode(requestEnter);
|
||||
return ajaxResult;
|
||||
@@ -159,5 +165,15 @@ public class PdaServiceImp implements PdaService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectWcsPort() {
|
||||
AjaxResult ajaxResult = toWcsService.selectWcsPort();
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateWcsPort(WcsPort wcsport) {
|
||||
AjaxResult ajaxResult = toWcsService.updateWcsPort(wcsport);
|
||||
return ajaxResult;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user