库区接口类代码维护
parent
92af2beb64
commit
7482e6e133
|
|
@ -110,7 +110,7 @@ public class ContainerServiceImpl implements ContainerService {
|
||||||
log.error("请扫描正确点位,操作失败!");
|
log.error("请扫描正确点位,操作失败!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String areaName = point.getArea().getName();//库区名称
|
String areaName = point.getArea().getCode();//库区
|
||||||
String code = "0";
|
String code = "0";
|
||||||
String message = null;
|
String message = null;
|
||||||
String agv_on_off = "OFF";
|
String agv_on_off = "OFF";
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public class Point extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Column(name = "`item_height`")
|
@Column(name = "`item_height`")
|
||||||
@ApiModelProperty(value = "高度")
|
@ApiModelProperty(value = "高度")
|
||||||
private Double itemHeight;
|
private Double itemHeight=0d;
|
||||||
|
|
||||||
public void copy(Point source) {
|
public void copy(Point source) {
|
||||||
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class PointDto implements Serializable {
|
||||||
private int rows;
|
private int rows;
|
||||||
|
|
||||||
/** 高度 */
|
/** 高度 */
|
||||||
private Double itemHeight;
|
private Double itemHeight=0d;
|
||||||
|
|
||||||
/** 创建人 */
|
/** 创建人 */
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ public class PointServiceImpl implements PointService {
|
||||||
map.put("描述", point.getDescription());
|
map.put("描述", point.getDescription());
|
||||||
map.put("区域编码", point.getBeatCode());
|
map.put("区域编码", point.getBeatCode());
|
||||||
map.put("物料编码", point.getItemCode());
|
map.put("物料编码", point.getItemCode());
|
||||||
map.put("库区名称", point.getArea().getName());
|
map.put("库区名称", .getName());
|
||||||
map.put("是否启用", point.getEnabled());
|
map.put("是否启用", point.getEnabled());
|
||||||
map.put("仓库名称", point.getDept().getName());
|
map.put("仓库名称", point.getDept().getName());
|
||||||
map.put("坐标X", point.getPosX());
|
map.put("坐标X", point.getPosX());
|
||||||
|
|
|
||||||
|
|
@ -215,11 +215,11 @@ public class StockServiceImpl implements StockService {
|
||||||
public void containerIn(String containerCode, String position, String itemCode) {
|
public void containerIn(String containerCode, String position, String itemCode) {
|
||||||
Stock stock = validateStock(containerCode);//验证容器
|
Stock stock = validateStock(containerCode);//验证容器
|
||||||
Point point = validateSrcPoint(position);//验证点位
|
Point point = validateSrcPoint(position);//验证点位
|
||||||
if (!isRestrictedArea(point.getArea().getName())) {
|
if (!isRestrictedArea(.getCode())) {
|
||||||
throw new RuntimeException(point.getCode() + "点位不能入场!");
|
throw new RuntimeException(point.getCode() + "点位不能入场!");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (point.getArea().getName()) {
|
switch (.getCode()) {
|
||||||
case AreaNameDic.XJQ:
|
case AreaNameDic.XJQ:
|
||||||
case AreaNameDic.DJQ:
|
case AreaNameDic.DJQ:
|
||||||
if (StringUtils.isEmpty(itemCode)) {
|
if (StringUtils.isEmpty(itemCode)) {
|
||||||
|
|
@ -288,7 +288,7 @@ public class StockServiceImpl implements StockService {
|
||||||
validateStockStatus(stock);//验证容器状态
|
validateStockStatus(stock);//验证容器状态
|
||||||
validateStockAndItem(stock, item);//验证容器类型和物料类型是否匹配
|
validateStockAndItem(stock, item);//验证容器类型和物料类型是否匹配
|
||||||
Point srcPoint = validateSrcPoint(pointCode);//验证点位
|
Point srcPoint = validateSrcPoint(pointCode);//验证点位
|
||||||
String srcPointAreaName = srcPoint.getArea().getName();
|
String srcPointAreaName = src.getCode();
|
||||||
if (!isValidMCArea(srcPointAreaName)) {
|
if (!isValidMCArea(srcPointAreaName)) {
|
||||||
throw new RuntimeException(srcPoint.getCode() + "为" + srcPointAreaName + "不能入库!");
|
throw new RuntimeException(srcPoint.getCode() + "为" + srcPointAreaName + "不能入库!");
|
||||||
}
|
}
|
||||||
|
|
@ -439,7 +439,7 @@ public class StockServiceImpl implements StockService {
|
||||||
|
|
||||||
private void handleFullContainerCall(String itemCode, Point endPoint) {
|
private void handleFullContainerCall(String itemCode, Point endPoint) {
|
||||||
Item item = validateItem(itemCode);//验证物料
|
Item item = validateItem(itemCode);//验证物料
|
||||||
String endPointAreaName = endPoint.getArea().getName();
|
String endPointAreaName = end.getCode();
|
||||||
//只允许叫料区叫满车
|
//只允许叫料区叫满车
|
||||||
if (!isValidMCJLArea(endPointAreaName)) {
|
if (!isValidMCJLArea(endPointAreaName)) {
|
||||||
throw new RuntimeException(endPoint.getCode() + "点位不能叫满车!");
|
throw new RuntimeException(endPoint.getCode() + "点位不能叫满车!");
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ public class AgvTaskServiceImpl implements AgvTaskService {
|
||||||
String viewBoardType = "";
|
String viewBoardType = "";
|
||||||
Point point = pointService.findByCode(agvTasks.getStartSlotCode(), null, null, null, null,null);
|
Point point = pointService.findByCode(agvTasks.getStartSlotCode(), null, null, null, null,null);
|
||||||
//到达上视自动识别
|
//到达上视自动识别
|
||||||
if (AreaNameDic.CPRKQ.equals(point.getArea().getName())) {
|
if (AreaNameDic.CPRKQ.equals(point.getArea().getCode())) {
|
||||||
viewBoardType = "IDENTIFY_REQUIRE";
|
viewBoardType = "IDENTIFY_REQUIRE";
|
||||||
}
|
}
|
||||||
objMap.put("viewBoardType", viewBoardType);//上视识别类型;需要 IDENTIFY_REQUIRE 不需要NORMAL
|
objMap.put("viewBoardType", viewBoardType);//上视识别类型;需要 IDENTIFY_REQUIRE 不需要NORMAL
|
||||||
|
|
@ -444,7 +444,7 @@ public class AgvTaskServiceImpl implements AgvTaskService {
|
||||||
private void handleComContainer(AgvTask agvTask, String containerCode) {
|
private void handleComContainer(AgvTask agvTask, String containerCode) {
|
||||||
//任务完成;根据AGV任务的目标点位走对应流程
|
//任务完成;根据AGV任务的目标点位走对应流程
|
||||||
Point endPoint = pointService.findByCode(agvTask.getEndSlotCode(), null, null, null, null,null);
|
Point endPoint = pointService.findByCode(agvTask.getEndSlotCode(), null, null, null, null,null);
|
||||||
String endAreaName = endPoint.getArea().getName();
|
String endAreaName = endPoint.getArea().getCode();
|
||||||
Stock stock = stockRepository.findByCode(containerCode, null);
|
Stock stock = stockRepository.findByCode(containerCode, null);
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
throw new RuntimeException(containerCode + "容器不存在! 请维护");
|
throw new RuntimeException(containerCode + "容器不存在! 请维护");
|
||||||
|
|
@ -637,7 +637,7 @@ public class AgvTaskServiceImpl implements AgvTaskService {
|
||||||
private void handleCanceledTask(AgvTask agvTask, String containerCode) {
|
private void handleCanceledTask(AgvTask agvTask, String containerCode) {
|
||||||
//任务取消完成
|
//任务取消完成
|
||||||
Point endPoint = pointService.findByCode(agvTask.getEndSlotCode(), null, null, null, null,null);
|
Point endPoint = pointService.findByCode(agvTask.getEndSlotCode(), null, null, null, null,null);
|
||||||
String endAreaName = endPoint.getArea().getName();
|
String endAreaName = endPoint.getArea().getCode();
|
||||||
Stock stock = stockRepository.findByCode(containerCode, null);
|
Stock stock = stockRepository.findByCode(containerCode, null);
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
throw new RuntimeException(containerCode + "容器不存在! 请维护");
|
throw new RuntimeException(containerCode + "容器不存在! 请维护");
|
||||||
|
|
|
||||||
|
|
@ -10,36 +10,41 @@ public interface AreaNameDic {
|
||||||
/**
|
/**
|
||||||
* 大小件入库区
|
* 大小件入库区
|
||||||
*/
|
*/
|
||||||
public static String DXJRKQ = "大小件入库区";
|
public static String DXJRKQ = "DXJRKQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大件存储区
|
* 大件存储区
|
||||||
*/
|
*/
|
||||||
public static String DJQ = "大件存储区";
|
public static String DJQ = "DJQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小件存储区
|
* 小件存储区
|
||||||
*/
|
*/
|
||||||
public static String XJQ = "小件存储区";
|
public static String XJQ = "XJQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻包区
|
* 翻包区
|
||||||
*/
|
*/
|
||||||
public static String FBQ = "翻包区";
|
public static String FBQ = "FBQ";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 翻包存储区
|
||||||
|
*/
|
||||||
|
public static String FBCQ = "FBCQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成品入库区
|
* 成品入库区
|
||||||
*/
|
*/
|
||||||
public static String CPRKQ = "成品入库区";
|
public static String CPRKQ = "CPRKQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返修区
|
* 返修区
|
||||||
*/
|
*/
|
||||||
public static String FXQ = "返修区";
|
public static String FXQ = "FXQ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 叫料区
|
* 叫料区
|
||||||
*/
|
*/
|
||||||
public static String JLQ = "叫料区";
|
public static String JLQ = "JLQ";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue