Commit 78ea30c1 zshaohui

结构提交

1 个父辈 293d58f1
正在显示 34 个修改的文件 包含 248 行增加488 行删除
......@@ -8,7 +8,7 @@ import com.neotel.smfcore.core.api.bean.CodeValidateParam;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.order.service.po.LiteOrder;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -63,7 +63,7 @@ public class SmfApi {
protected String importUrl;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
@PostConstruct
public void init(){
......
......@@ -140,8 +140,8 @@ public class CodeResolve {
if (!lastLabelPartNumber.equals(currentLabelPartNumber)) {
//本次解析出来的数量与上次条码解析出来的数量不一样,重新设置数量
log.info("重新设置" + codeBeanFromRule.getCodeStr() + "partNumber为:" + currentLabelPartNumber);
barcode.setPartNumber(currentLabelPartNumber);
needUpdate = true;
//barcode.setPartNumber(currentLabelPartNumber);
//needUpdate = true;
}
Date produceDate = barcodeFromRule.getProduceDate();
if(produceDate != null){
......@@ -190,8 +190,8 @@ public class CodeResolve {
}
//设置label数量
if (barcodeFromRule.getLabelAmount() != barcode.getLabelAmount()) {
barcode.setLabelAmount(barcodeFromRule.getLabelAmount());
needUpdate = true;
//barcode.setLabelAmount(barcodeFromRule.getLabelAmount());
//needUpdate = true;
}
if(needUpdate){
try {
......
......@@ -21,9 +21,9 @@ import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.bean.OrderSetting;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.innerBox.rest.InnerBoxRestController;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.security.TokenProvider;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
......@@ -57,7 +57,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
private InListCache inListCache;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
String putInColor = "green";
int delayCloseTime = 30000;
......
......@@ -23,7 +23,7 @@ import com.neotel.smfcore.core.system.service.dao.IAlarmInfoDao;
import com.neotel.smfcore.core.system.service.po.AlarmInfo;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.virtual.service.manager.IVirInventoryManager;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
......@@ -66,7 +66,7 @@ public class DeviceController {
private SmfApi smfApi;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
@Autowired
private IBarcodeManager barcodeManager;
......
......@@ -30,7 +30,7 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.custom.lizhen.innerBox.bean.StorageExport;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil;
......@@ -75,7 +75,7 @@ public class LiteOrderCache {
private IBarcodeManager barcodeManager;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
@Autowired
private MaiZhengApi maiZhengApi;
......
......@@ -28,9 +28,9 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.dao.IDataLogDao;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.virtual.service.manager.IVirInventoryManager;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -63,7 +63,7 @@ public class TaskService {
private ILiteOrderItemManager liteOrderItemManager;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
@Autowired
private IVirInventoryManager virInventoryManager;
......
......@@ -3,7 +3,6 @@ package com.neotel.smfcore.custom.lizhen;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ApiException;
......@@ -23,15 +22,14 @@ import com.neotel.smfcore.core.order.service.po.LiteOrder;
import com.neotel.smfcore.core.order.service.po.LiteOrderItem;
import com.neotel.smfcore.core.system.service.manager.IDataLogManager;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetReturnInventoryRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetSpareNoRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetUnclaimedRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.SpareInHourseRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.result.SpareInHourseResult;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.request.GetReturnInventoryRequest;
import com.neotel.smfcore.custom.lizhen.innerBox.bean.PreWarningItem;
import com.neotel.smfcore.custom.lizhen.innerBox.util.PreWarningItemCache;
import com.neotel.smfcore.custom.lizhen.third.maicheng.bean.AskReelBoxList;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.request.GetSpareNoRequest;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.request.GetUnclaimedRequest;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.request.SpareInHourseRequest;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -371,7 +369,7 @@ public class LizhenController {
GetSpareNoRequest spareNoRequest = new GetSpareNoRequest();
spareNoRequest.setFunctionDept(functionDept);
spareNoRequest.setDeptId(deptId);
return ResultBean.newOkResult(LizhenApiListener.getSpareNo(spareNoRequest));
return ResultBean.newOkResult(LuxsanSpApi.getSpareNo(spareNoRequest));
}
// 退库查询接口
......@@ -391,7 +389,7 @@ public class LizhenController {
GetReturnInventoryRequest request = new GetReturnInventoryRequest();
request.setFunctionDept(functionDept);
request.setDeptId(deptId);
return ResultBean.newOkResult(LizhenApiListener.getReturnInventory(request));
return ResultBean.newOkResult(LuxsanSpApi.getReturnInventory(request));
}
// 预约待领取接口
......@@ -412,7 +410,7 @@ public class LizhenController {
request.setFunctionDept(functionDept);
request.setDeptId(deptId);
// 假设还有其它参数需要解析
return ResultBean.newOkResult(LizhenApiListener.getUnclaimedDetails(request));
return ResultBean.newOkResult(LuxsanSpApi.getUnclaimedDetails(request));
}
// 备品仓入库接口
......@@ -432,7 +430,7 @@ public class LizhenController {
if (ObjectUtil.isNotEmpty(request.getDetailList())) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}料号明细列表不能为空", new String[]{""});
}
return ResultBean.newOkResult(LizhenApiListener.spareInHourse(request));
return ResultBean.newOkResult(LuxsanSpApi.spareInHourse(request));
}
......
......@@ -20,7 +20,7 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.InventoryData;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.PartitionInfo;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.Station;
......@@ -74,7 +74,7 @@ public class InventoryController {
private CodeResolve codeResolve;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
/**
* 盘点数据key
......
......@@ -23,7 +23,7 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.luxsan_sp.api.LuxsanSpApi;
import com.neotel.smfcore.custom.lizhen.agvBox.enums.INOUT_TYPE;
import com.neotel.smfcore.custom.lizhen.agvBox.util.BoxUtil;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
......@@ -68,7 +68,7 @@ public class OutLineController {
private ILiteOrderItemManager liteOrderItemManager;
@Autowired
private LizhenApiListener lizhenApi;
private LuxsanSpApi luxsanSpApi;
/*
* key为工位信息,value为上一个隔口信息
......
......@@ -21,7 +21,6 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.GrLabel;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.Station;
import com.neotel.smfcore.custom.lizhen.agvBox.enums.INOUT_TYPE;
......@@ -70,9 +69,6 @@ public class WarehouseController {
private DataCache dataCache;
@Autowired
private LizhenApiListener lizhenApi;
@Autowired
private GrLabelManager grLabelManager;
@Autowired
......
......@@ -23,7 +23,6 @@ import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.manager.IDataLogManager;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.lizhen.api.LizhenApiListener;
import com.neotel.smfcore.custom.lizhen.innerBox.bean.VirImportLog;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.innerBox.service.manager.IVirImportLogManager;
......@@ -66,9 +65,6 @@ public class VirtualRestController {
private TaskService taskService;
@Autowired
private LizhenApiListener lizhenApi;
@Autowired
private SmfApi smfApi;
@Autowired
......
package com.neotel.smfcore.custom.lizhen.api;
package com.neotel.smfcore.custom.luxsan_sp.api;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
......@@ -8,15 +8,11 @@ import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.HttpHelper;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.api.listener.DefaultSmfApiListener;
import com.neotel.smfcore.custom.lizhen.api.bean.LizhenApiResult;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetReturnInventoryRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetSpareNoRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.GetUnclaimedRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.request.SpareInHourseRequest;
import com.neotel.smfcore.custom.lizhen.api.bean.result.GetReturnInventoryResult;
import com.neotel.smfcore.custom.lizhen.api.bean.result.GetSpareNoResult;
import com.neotel.smfcore.custom.lizhen.api.bean.result.GetUnclaimedResult;
import com.neotel.smfcore.custom.lizhen.api.bean.result.SpareInHourseResult;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.LuxsanSpApiResult;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.request.*;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.result.GetSpareNoResult;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.result.GetUnclaimedResult;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.result.SpareInHourseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......@@ -25,7 +21,7 @@ import java.util.Map;
@Slf4j
@Component
public class LizhenApiListener extends DefaultSmfApiListener {
public class LuxsanSpApi extends DefaultSmfApiListener {
public static String GetSpareNoUrl;
public static String SpareInHourseUrl;
......@@ -34,19 +30,19 @@ public class LizhenApiListener extends DefaultSmfApiListener {
@Value("${api.getSpareNo:}")
public void setGetSpareNoUrl(String url) {
LizhenApiListener.GetSpareNoUrl = url;
LuxsanSpApi.GetSpareNoUrl = url;
}
@Value("${api.spareInhourse:}")
public void setSpareInHourseUrl(String url) {
LizhenApiListener.SpareInHourseUrl = url;
LuxsanSpApi.SpareInHourseUrl = url;
}
@Value("${api.getUnclaimed:}")
private void setGetUnclaimedUrl(String url) {
LizhenApiListener.GetUnclaimedUrl = url;
LuxsanSpApi.GetUnclaimedUrl = url;
}
@Value("${api.getReturnInventory:}")
private void setGetReturnInventory(String url) {
LizhenApiListener.GetReturnInventory = url;
LuxsanSpApi.GetReturnInventory = url;
}
// 备品仓退库查询接口的GET方法
......@@ -60,7 +56,7 @@ public class LizhenApiListener extends DefaultSmfApiListener {
String resJsonStr = HttpHelper.sendGet(url);
log.info("备品仓退库查询接口返回为:" + JSON.toJSONString(request));
// 将响应字符串解析为LizhenApiResult对象
LizhenApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LizhenApiResult.class);
LuxsanSpApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LuxsanSpApiResult.class);
// 检查API调用是否成功,并返回结果对象
if (ObjectUtil.isNotNull(lizhenApiResult)) {
if (lizhenApiResult.getCode() != 200) {
......@@ -86,7 +82,7 @@ public class LizhenApiListener extends DefaultSmfApiListener {
String url = GetUnclaimedUrl + getQueryStr(request);
log.info("预约待领取接口请求返回:" + JSON.toJSONString(request));
String resJsonStr = HttpHelper.sendGet(url);
LizhenApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LizhenApiResult.class);
LuxsanSpApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LuxsanSpApiResult.class);
if (lizhenApiResult.getCode() != 200) {
throw new Exception(String.format("预约待领取接口接口请求失败, 错误代码[%d],错误原因[%s]",
lizhenApiResult.getCode(), lizhenApiResult.getMsg()));
......@@ -109,7 +105,7 @@ public class LizhenApiListener extends DefaultSmfApiListener {
log.info("备品仓入库接口请求为:" + JSON.toJSONString(request));
String resJsonStr = HttpHelper.postJson(SpareInHourseUrl, request);
log.info("备品仓入库接口返回:" + JSON.toJSONString(request));
LizhenApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LizhenApiResult.class);
LuxsanSpApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LuxsanSpApiResult.class);
if (lizhenApiResult.getCode() != 200) {
throw new ApiException(String.format("备品仓入库接口请求失败, 错误代码[%d],错误原因[%s]",
lizhenApiResult.getCode(), lizhenApiResult.getMsg()));
......@@ -132,7 +128,7 @@ public class LizhenApiListener extends DefaultSmfApiListener {
String url = GetSpareNoUrl + getQueryStr(request);
log.info("获取入库单号返回:" + JSON.toJSONString(request));
String resJsonStr = HttpHelper.sendGet(url);
LizhenApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LizhenApiResult.class);
LuxsanSpApiResult lizhenApiResult = JSONObject.parseObject(resJsonStr, LuxsanSpApiResult.class);
if (lizhenApiResult.getCode() != 200) {
throw new Exception(String.format("获取入库单号接口请求失败, 错误代码[%d],错误原因[%s]",
lizhenApiResult.getCode(), lizhenApiResult.getMsg()));
......@@ -149,18 +145,9 @@ public class LizhenApiListener extends DefaultSmfApiListener {
}
@Override
public boolean isForThisApi(String apiName) {
return apiName != null && apiName.equalsIgnoreCase("Lizhen");
return apiName != null && apiName.equalsIgnoreCase("Luxsan_sp");
}
private static String getQueryStr(Object obj) {
......
package com.neotel.smfcore.custom.lizhen.api.bean;
package com.neotel.smfcore.custom.luxsan_sp.api.bean;
import lombok.Data;
@Data
public class LizhenApiResult {
public class LuxsanSpApiResult {
private String msg;
......
package com.neotel.smfcore.custom.lizhen.api.bean.request;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.request;
import lombok.Data;
......
package com.neotel.smfcore.custom.luxsan_sp.api.bean.request;
import lombok.Data;
@Data
public class GetReturnInventoryResult {
/**
* 功能部门
*/
private String functionDept;
/**
* 厂区id
*/
private String deptId;
}
package com.neotel.smfcore.custom.lizhen.api.bean.request;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.request;
import lombok.Data;
......
package com.neotel.smfcore.custom.lizhen.api.bean.request;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.request;
import lombok.Data;
/**
* 请求类,用于获取未领取的备件申请信息
*/
@Data
public class GetUnclaimedRequest {
/**
* 厂区id
*/
......@@ -15,4 +13,5 @@ public class GetUnclaimedRequest {
* 功能部门
*/
private String functionDept;
}
package com.neotel.smfcore.custom.lizhen.api.bean.request;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.request;
import com.neotel.smfcore.custom.lizhen.api.bean.result.SpareInHourseDetail;
import com.neotel.smfcore.custom.luxsan_sp.api.bean.result.SpareInHourseDetail;
import lombok.Data;
import java.util.List;
/**
* 请求类,用于表示SpareInHourse的请求参数
*/
@Data
public class SpareInHourseRequest {
/**
* 厂区id
*/
......@@ -29,4 +27,5 @@ public class SpareInHourseRequest {
* 料号明细列表
*/
private List<SpareInHourseDetail> detailList;
}
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
import java.util.Date;
/**
* 响应类,用于表示获取退库库存结果
*/
@Data
public class GetReturnInventoryResult {
/**
......
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
......
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
......
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* 请求类,用于获取未领取的备件申请信息
*/
@Data
public class GetUnclaimedResult {
/**
......@@ -39,4 +36,3 @@ public class GetUnclaimedResult {
*/
private List<SpareApplyDetail> spareApplyDetailList;
}
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
/**
* 封装备件申请明细信息
*/
@Data
public class SpareApplyDetail {
/**
* 单据号
*/
......@@ -31,4 +29,5 @@ public class SpareApplyDetail {
* 预计数量
*/
private Integer expectQty;
}
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
/**
* 封装料号明细中的详细信息
*/
@Data
public class SpareInHourseDetail {
/**
* 料号
*/
......@@ -14,9 +12,9 @@ public class SpareInHourseDetail {
/**
* 储位
*/
private String locationCode;
/**
* 数量
*/
private Integer inQty;
}
package com.neotel.smfcore.custom.lizhen.api.bean.result;
package com.neotel.smfcore.custom.luxsan_sp.api.bean.result;
import lombok.Data;
import java.util.List;
/**
* 表示SpareInHourse的结果
*/
@Data
public class SpareInHourseResult {
/**
* 厂区id
*/
......@@ -24,4 +23,5 @@ public class SpareInHourseResult {
* 料号明细列表
*/
private List<SpareInHourseDetail> detailList;
}
package com.neotel.smfcore.custom.lizhen.agvBox.rest;
package com.neotel.smfcore.custom.luxsan_sp.controller;
import cn.hutool.core.util.ObjectUtil;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.utils.JsonUtil;
import com.neotel.smfcore.common.utils.ReelLockPosUtil;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
......@@ -17,16 +15,13 @@ import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.dao.IDataLogDao;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.core.system.websocket.MsgType;
import com.neotel.smfcore.core.system.websocket.SocketMsg;
import com.neotel.smfcore.core.system.websocket.WebSocketServer;
import com.neotel.smfcore.custom.lizhen.agvBox.bean.Station;
import com.neotel.smfcore.custom.lizhen.agvBox.util.StationCacheUtil;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.luxsan_sp.util.SpBoxUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -43,7 +38,7 @@ import java.util.stream.Collectors;
*/
@Slf4j
@RestController
public class AgvBoxDeviceClientController {
public class SpAgvDeviceClientController {
@Autowired
private DataCache dataCache;
......@@ -226,7 +221,7 @@ public class AgvBoxDeviceClientController {
}
}
}
StoragePos pos = taskService.findEmptyPosForPutIn(storageList, barcode, "", "");
StoragePos pos = SpBoxUtil.locOnePos(barcode);
if (pos != null){
Storage storage = dataCache.getStorageById(pos.getStorageId());
taskService.addPutInTaskToExecute(storage,barcode,pos,"");
......@@ -417,7 +412,7 @@ public class AgvBoxDeviceClientController {
/**
* 仓位状态
*/
storagePos.setBarcode(barcode);
//storagePos.setBarcode(barcode);
storagePos.setUsed(true);
storagePos.setCanCheckOutTime(System.currentTimeMillis());
storagePosManager.save(storagePos);
......@@ -454,8 +449,8 @@ public class AgvBoxDeviceClientController {
barcodeManager.save(barcode);
}
storagePos.setBarcode(null);
storagePos.setUsed(false);
//storagePos.setBarcode(null);
//storagePos.setUsed(false);
storagePosManager.save(storagePos);
log.info("出库完成,清空仓位: " + storagePos.getId() + "[" + storagePos.getPosName() + "]");
......
package com.neotel.smfcore.custom.luxsan_sp.controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ApiOperation("备件仓 料箱入库")
@RestController
@RequestMapping("/spBoxCheckOut")
public class SpBoxCheckOutController {
}
package com.neotel.smfcore.custom.luxsan_sp.controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ApiOperation("备件仓 料箱入库")
@RestController
@RequestMapping("/spBoxPutIn")
public class SpBoxPutInController {
}
package com.neotel.smfcore.custom.luxsan_sp.util;
import com.neotel.smfcore.common.bean.ReelLockPosInfo;
import com.neotel.smfcore.common.utils.ReelLockPosUtil;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.util.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Service
public class SpBoxUtil {
private static IStoragePosManager storagePosManager;
@Autowired
public void setStoragePosManager(IStoragePosManager manager){
SpBoxUtil.storagePosManager = manager;
}
private static TaskService taskService;
@Autowired
public void setTaskService(TaskService service){
SpBoxUtil.taskService = service;
}
private static DataCache dataCache;
@Autowired
public void setDataCache(DataCache cache){
SpBoxUtil.dataCache = cache;
}
public static synchronized StoragePos locOnePos(Barcode boxBarcode) {
//判断信息是否在已经在库位中(出入库只改变料箱位置状态,不从StoragePos表中清除)
StoragePos pos = storagePosManager.getByBarcode(boxBarcode.getBarcode());
if (pos != null) {
return pos;
}
List<String> cidList = new ArrayList<>();
List<Storage> storageList = new ArrayList<>();
for (Storage storage : dataCache.getAllStorage().values()) {
if (!storage.isVirtual()) {
storageList.add(storage);
cidList.add(storage.getCid());
}
}
pos = taskService.findEmptyPosForPutIn(storageList, boxBarcode, "", "");
if (pos == null) {
log.info(boxBarcode.getBarcode() + "未找到可用库位");
return null;
} else {
log.info("料箱[" + boxBarcode.getBarcode() + "]信息加入库位[" + pos.getPosName() + "]中");
pos.setBarcode(boxBarcode);
pos.setUsed(true);
storagePosManager.save(pos);
//3.锁定库位
Storage storage = dataCache.getStorageById(pos.getStorageId());
ReelLockPosInfo reelLocInfo = new ReelLockPosInfo();
reelLocInfo.setBarcode(boxBarcode.getBarcode());
reelLocInfo.setCid(storage.getCid());
reelLocInfo.setLockPosName(pos.getPosName());
reelLocInfo.setLockPosId(pos.getId());
reelLocInfo = ReelLockPosUtil.addReelLockPosInfo(reelLocInfo, cidList);
if (reelLocInfo == null) {
log.info("[" + boxBarcode.getBarcode() + "]库位锁定失败,暂停入库");
return null;
}
}
return pos;
}
}
#厂区名称
luxsan:
plantCode: W339
#C区配置文件
api:
name: luxsan
#todo 后续需要改成半成品仓地址
cancelOdn: http://10.68.27.86/smf-core/cancelRestock/cancelOdn
#禁用料
inCheckUrl: http://10.190.25.124:8001/Npm/WmsCheckReelfob
#储位查询
queryBin: http://10.68.30.22:8082/api/mlb/QueryBin
#更新储位
updateBin: http://10.68.30.22:8082/api/mlb/UpdateBin
#GR查询
queryGr: http://10.68.30.22:8082/api/mlb/QueryGR
#校验DC有效期
getInDate: http://10.68.30.22:8082/api/mes/GetInDate
#GR过账状态查询
queryGrStatus: http://10.68.30.22:8082/api/mlb/QueryGrStatus
#按GR生成标签码并上架
newLabelToCell: http://10.68.30.22:8082/api/mlb/NewLabelToCell
#电子料入退库
backToWarehouse: http://10.68.30.22:8082/api/mlb/BackToWarehouse
#Tower发料
towerIssue: http://10.68.30.22:8082/api/mlb/TowerIssue;
#pk发料
pickingIssue: http://10.68.30.22:8082/api/mlb/PickingIssue
#料卷退PK
returnToPK: http://10.68.30.22:8082/api/mlb/ReturnToPK
#单据挑料
ticketPost: http://10.68.30.22:8082/api/mlb/TicketPost
#拆分标签码
splitLabelID:
#合并标签码
mergeLabelID:
#单据产生标签码
getLabelByTicket:
#标签码信息查询
queryLabelID:
#标签码上架
labelUpToShelf:
#PoDoSo挑料送WMS
dnIssueListToWMS:
#出退货还原
revoke:
#智能仓库存查询
queryIwInventory:
#查询所有库存标签码信息
queryInvLabelId:
#单据备料还原
ticketRevert:
#校验箱号信息
validCarton: http://10.68.30.22:8082/api/mlb/ValidCarton
#获取栈板信息
fetchPalletInfo: http://10.68.30.22:8082/api/mlb/FetchPalletInfo
#栈板同库别转移
palletUpdate: http://10.68.30.22:8082/api/mlb/PalletUpdate
#获取可用库存
fetchValidInv: http://10.68.30.22:8082/api/wcs/FetchValidInv
#栈板拆分
palletSplit: http://10.68.30.22:8082/api/wcs/PalletSplit
#栈板合并
palletMerge: http://10.68.30.22:8082/api/wcs/PalletMerge
#箱去向接口
cartonDst: http://10.68.30.22:8082/api/wcs/CartonDst
#挑料完成绑定栈板
bindPallet:
#挑料批量绑定栈板
bindPalletBulk:
#取消绑定栈板
unBindPallet:
#拉取转库单据
fetchMoveTicket: http://10.68.30.22:8082/api/wcs/FetchMoveTicket
#转库单据备料
moveTicketPick: http://10.68.30.22:8082/api/wcs/MoveTicketPick
#转库单据过账
moveTicketPost: http://10.68.30.22:8082/api/wcs/MoveTicketPost
#Check检查站
checkPassStation: http://10.68.30.22:8082/api/wcs/CheckPassStation
#PPS CHECK检查结果
checkLabelResult: http://10.68.30.22:8082/api/wcs/CheckLabelResult
#集货单锁定料箱查询
lockedCartonQuery: http://10.68.30.22:8082/api/wcs/LockedCartonQuery
#用栈板号获取箱信息清单
fetchPalletCarton: http://10.68.30.22:8082/api/wcs/FetchPalletCarton
#PPS 按栈板获取箱清单
checkPalletCarton: http://10.68.30.22:8082/api/wcs/CheckPalletCarton
#获取不可用(HOLD)库存信息
fetchHoldInfo: http://10.68.30.22:8082/api/wcs/FetchHoldInfo
#激活预分车任务信息
activeTruck:
#转库单据备料还原
moveTicketRestore: http://10.68.30.22:8082/api/wcs/MoveTicketRestore
#重置转库单据
resetMoveTicket: http://10.68.30.22:8082/api/wcs/ResetMoveTicket
#查询挑料单列表
queryPicking: http://10.68.30.22:8082/api/mlb/QueryPicking
#获取挑料单详情
getPickingItems: http://10.68.30.22:8082/api/mlb/GetPickingItems
#获取尺寸信息
brandQtyUrl: http://10.68.30.22:8082/api/wcs/brandQty
#自动仓获取ODN单信息
fetchShipmentInfo: http://10.68.30.22:8082/api/FetchShipment
#储位转移
binMove: http://10.68.30.22:8082/api/mlb/BinMove
#砍单回库
shipCancelUpshelf: http://10.68.30.22:8082/api/mlb/ShipCancelUpshelf
\ No newline at end of file
#厂区名称
luxsan:
plantCode: W339
#C区配置文件
api:
name: luxsan
cancelOdn: http://10.68.27.86/smf-core/cancelRestock/cancelOdn
#禁用料
inCheckUrl: http://10.68.21.21:8001/Npm/WmsCheckReelfob
#储位查询
queryBin: http://10.42.220.171:8082/api/mlb/QueryBin
#更新储位
updateBin: http://10.42.220.171:8082/api/mlb/UpdateBin
#GR查询
queryGr: http://10.42.220.171:8082/api/mlb/QueryGR
#校验DC有效期
getInDate: http://10.42.220.171:8082/api/mes/GetInDate
#GR过账状态查询
queryGrStatus: http://10.42.220.171:8082/api/mlb/QueryGrStatus
#按GR生成标签码并上架
newLabelToCell: http://10.42.220.171:8082/api/mlb/NewLabelToCell
#电子料入退库
backToWarehouse: http://10.42.220.171:8082/api/mlb/BackToWarehouse
#Tower发料
towerIssue: http://10.42.220.171:8082/api/mlb/TowerIssue;
#pk发料
pickingIssue: http://10.42.220.171:8082/api/mlb/PickingIssue
#料卷退PK
returnToPK: http://10.42.220.171:8082/api/mlb/ReturnToPK
#单据挑料
ticketPost: http://10.42.220.171:8082/api/mlb/TicketPost
#拆分标签码
splitLabelID:
#合并标签码
mergeLabelID:
#单据产生标签码
getLabelByTicket:
#标签码信息查询
queryLabelID:
#标签码上架
labelUpToShelf:
#PoDoSo挑料送WMS
dnIssueListToWMS:
#出退货还原
revoke:
#智能仓库存查询
queryIwInventory:
#查询所有库存标签码信息
queryInvLabelId:
#单据备料还原
ticketRevert:
#校验箱号信息
validCarton: http://10.42.220.171:8082/api/mlb/ValidCarton
#获取栈板信息
fetchPalletInfo: http://10.42.220.171:8082/api/mlb/FetchPalletInfo
#栈板同库别转移
palletUpdate: http://10.42.220.171:8082/api/mlb/PalletUpdate
#获取可用库存
fetchValidInv: http://10.42.220.171:8082/api/wcs/FetchValidInv
#栈板拆分
palletSplit: http://10.42.220.171:8082/api/wcs/PalletSplit
#栈板合并
palletMerge: http://10.42.220.171:8082/api/wcs/PalletMerge
#箱去向接口
cartonDst: http://10.42.220.171:8082/api/wcs/CartonDst
#挑料完成绑定栈板
bindPallet:
#挑料批量绑定栈板
bindPalletBulk:
#取消绑定栈板
unBindPallet:
#拉取转库单据
fetchMoveTicket: http://10.42.220.171:8082/api/wcs/FetchMoveTicket
#转库单据备料
moveTicketPick: http://10.42.220.171:8082/api/wcs/MoveTicketPic
#转库单据过账
moveTicketPost: http://10.42.220.171:8082/api/wcs/MoveTicketPost
#Check检查站
checkPassStation: http://10.42.220.171:8082/api/wcs/CheckPassStation
#PPS CHECK检查结果
checkLabelResult: http://10.42.220.171:8082/api/wcs/CheckLabelResult
#集货单锁定料箱查询
lockedCartonQuery: http://10.42.220.171:8082/api/wcs/LockedCartonQuery
#用栈板号获取箱信息清单
fetchPalletCarton: http://10.42.220.171:8082/api/wcs/FetchPalletCarton
#PPS 按栈板获取箱清单
checkPalletCarton: http://10.42.220.171:8082/api/wcs/CheckPalletCarton
#获取不可用(HOLD)库存信息
fetchHoldInfo: http://10.42.220.171:8082/api/wcs/FetchHoldInfo
#激活预分车任务信息
activeTruck:
#转库单据备料还原
moveTicketRestore: http://10.42.220.171:8082/api/wcs/MoveTicketRestore
#重置转库单据
resetMoveTicket: http://10.42.220.171:8082/api/wcs/ResetMoveTicket
#查询挑料单列表
queryPicking: http://10.42.220.171:8082/api/mlb/QueryPicking
#获取挑料单详情
getPickingItems: http://10.42.220.171:8082/api/mlb/GetPickingItems
#获取尺寸信息
brandQtyUrl: http://10.42.220.171:8082/api/mlb/brandQty
#自动仓获取ODN单信息
fetchShipmentInfo: http://10.42.220.171:8082/api/FetchShipment
#储位转移
binMove: http://10.42.220.171:8082/api/mlb/BinMove
#砍单回库
shipCancelUpshelf: http://10.42.220.171:8082/api/mlb/ShipCancelUpshelf
#备品仓入库单号查询接口
getSpareNo: http://10.42.220.118:8108/iams-api/getSpareNo
#备品仓入库接口
spareInhourse: http://10.42.220.118:8108/iams-api/spareInhourse
#预约待领取接口
getUnclaimed: http://10.42.220.118:8108/iams-api/getUnclaimed
#备品仓退库查询接口
getReturnInventory: http://10.42.220.118:8108/iams-api/getReturnInventory
api:
name: Luxsan_sp
getSpareNo: https://iamsapi.luxsan-ict.com/iams-api/getSpareNo
\ No newline at end of file
api:
name: Luxsan_sp
getSpareNo: http://10.42.220.118:8108/iams-api/getSpareNo
\ No newline at end of file
......@@ -2,67 +2,67 @@ server:
port: 8800
api:
name: #Lizhen
inCheckUrl: #http://10.190.25.124:8001/Npm/WmsCheckReelfob #禁用料
batchCheckUrl: #http://172.30.60.117:8001/Npm/WmsCheckReelfob_Batch #批量禁用料
outNotifyUrl: #http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(外仓配置)
outNotifyUrlPK: #http://172.30.170.148:8001/Sct/SaveReelInfo #PK发料保存(外仓配置)
inNotifyUrl: #http://10.190.25.124:8082/SmtAutoWH/Save2DReelInfo #保存物料(内仓配置)
fetchOrderUrl: #http://172.30.170.148:8082/SmtAutoWH/GetWoPickingList #获取工单
barcodeInfoUrl: #http://10.190.25.124:8001/Sct/GetReelInfo #mes数量
fetchGRUrl: #http://10.42.25.199:8082/api/wcs/fetchGR #gr标签
brandQtyUrl: #http://172.30.170.199:8082/api/wcs/brandQty #gr标签满卷数
importUrl: #http://10.42.222.52:8001/smf-core/ext/forward/getDataLogs #内仓导入外仓picking虚拟仓数据
checkReelMeasure: #http://10.190.25.124:8001/Sct/CheckReelMeasure #散料量测接口
plant: #2810
werks: #2810
name:
inCheckUrl:
batchCheckUrl:
outNotifyUrl:
outNotifyUrlPK:
inNotifyUrl:
fetchOrderUrl:
barcodeInfoUrl:
fetchGRUrl:
brandQtyUrl:
importUrl:
checkReelMeasure:
plant:
werks:
outerFactory:
bc:
plant: #2810
factory: #B3
plant:
factory:
#缺料预警对应的地址
lizhen:
F2:
name: #2F
line: #A05-2FSMT-16S,A05-2FSMT-17S,A05-2FSMT-06S,A05-2FSMT-07S
url: #http://172.30.88.19:8001/smf-core/api/Mes/machineCallMaterial
name:
line:
url:
F3:
name: 3F
name:
line:
url: http://10.68.27.85/smf-core/wcs/machineCallMaterial
url:
F5:
name: #5F
line: #A05-5FSMT-13S,A05-5FSMT-03S,A05-5FSMT-02S,A05-5FSMT-12S #,A05-5FARF-06,A05-5FSMT-01S,A05-5FSMT-11S
url: #http://172.30.97.63:8001/smf-core/api/Mes/machineCallMaterial
name:
line:
url:
F4:
name: #4F
line: #B03-4FSMT-11,B03-4FSMT-01,B03-4FSMT-13,B03-4FSMT-03,B03-4FSMT-14,B03-4FSMT-04
url: #http://172.25.252.12:8001/smf-core/api/Mes/machineCallMaterial
name:
line:
url:
manual:
url: http://10.68.27.85/smf-core/wcs/manualTower
url:
#
#转发地址
forward:
f2:
name: #2F
url: #http://172.30.88.19:8001/smf-core
name:
url:
f3:
name: #3F
url: #http://172.30.97.99:8001/smf-core
name:
url:
f5:
name: #5F
url: #http://172.30.97.63:8001/smf-core
name:
url:
b15:
name: #B15
url: #http://10.42.176.209:8001/smf-core
name:
url:
f4:
name: #4F
url: #http://127.0.0.1:8800
name:
url:
#手动出库料箱
manualcheckout:
......@@ -82,7 +82,7 @@ spring:
check-template-location: false
profiles:
active: 'prod'
include: 21088test
include: apitest
jackson:
time-zone: GMT+8
data:
......@@ -105,6 +105,5 @@ app:
type: ""
menu:
#show: grStorage,pkStorage,storageTransfer,docMaterialRe,docTransferWarehous,docReturn,manualWarehous
show: #manualWork,requisition,Shipment,transferInventory
show:
hide:
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!