Commit c9e6fd04 zshaohui

1.增加展示3F缺料

1 个父辈 a59128fd
...@@ -202,6 +202,9 @@ public class DataInitManager { ...@@ -202,6 +202,9 @@ public class DataInitManager {
addNewFunctionMenu(8, raw, "returnInventoryAndPutShelves", "退货上架", "returnInventoryAndPutShelves", "returnInventoryAndPutShelves/index", "returnInPut", functionMenuMap); addNewFunctionMenu(8, raw, "returnInventoryAndPutShelves", "退货上架", "returnInventoryAndPutShelves", "returnInventoryAndPutShelves/index", "returnInPut", functionMenuMap);
addNewFunctionMenu(9, raw, "materialShortage", "3F缺料", "materialShortage", "materialShortage/index", "materialNull", functionMenuMap);
Menu manual = Menu.CreatePMenu("手动出入库", 5, "manual", 2, "manual", raw); Menu manual = Menu.CreatePMenu("手动出入库", 5, "manual", 2, "manual", raw);
//手动入库 //手动入库
......
...@@ -578,6 +578,7 @@ public class CDeviceController { ...@@ -578,6 +578,7 @@ public class CDeviceController {
String face = ""; String face = "";
String brand = ""; String brand = "";
String batchCode = ""; String batchCode = "";
String targetLoc = "";
LiteOrderItem orderItem = liteOrderItemManager.get(orderItemId); LiteOrderItem orderItem = liteOrderItemManager.get(orderItemId);
if(orderItem != null){ if(orderItem != null){
orderNo = orderItem.getOrderNo(); orderNo = orderItem.getOrderNo();
...@@ -590,6 +591,7 @@ public class CDeviceController { ...@@ -590,6 +591,7 @@ public class CDeviceController {
} }
LiteOrder order = liteOrderManager.get(orderItem.getOrderId()); LiteOrder order = liteOrderManager.get(orderItem.getOrderId());
if (order != null){ if (order != null){
targetLoc = order.getLoc();
checkType = order.getCheckType(); checkType = order.getCheckType();
} }
} }
...@@ -599,6 +601,17 @@ public class CDeviceController { ...@@ -599,6 +601,17 @@ public class CDeviceController {
try { try {
LuxsanApi.pickingIssue(new PickingIssueRequest(CommonUtil.plantCode, orderNo, pkItemId, barcode.getPartNumber() LuxsanApi.pickingIssue(new PickingIssueRequest(CommonUtil.plantCode, orderNo, pkItemId, barcode.getPartNumber()
, barcode.getWarehouseCode(), brand, face, batchCode, Arrays.asList(barcode.getBarcode()))); , barcode.getWarehouseCode(), brand, face, batchCode, Arrays.asList(barcode.getBarcode())));
//同时 更新下 缓存目的地
if (StringUtils.isNotEmpty(targetLoc)){
if (targetLoc.endsWith("BG")){
log.info("自动绑定料串["+materialStr+"]目的地:C2-3F-BG");
MaterialLocUtil.updateStackerLoc(materialStr,"", "C2-3F-BG");
} else if (targetLoc.endsWith("CG")){
log.info("自动绑定料串["+materialStr+"]目的地:C2-3F-CG");
MaterialLocUtil.updateStackerLoc(materialStr,"", "C2-3F-CG");
}
}
} catch (Exception e) { } catch (Exception e) {
log.info(barcode.getBarcode() + "PK发料失败:" + e.getMessage() + ",隔口:" + barcode.getPosName() + "需要清空出库信息"); log.info(barcode.getBarcode() + "PK发料失败:" + e.getMessage() + ",隔口:" + barcode.getPosName() + "需要清空出库信息");
...@@ -794,8 +807,9 @@ public class CDeviceController { ...@@ -794,8 +807,9 @@ public class CDeviceController {
callAgvTask(stackerId, stackerBarcode); callAgvTask(stackerId, stackerBarcode);
} catch (Exception e) { } catch (Exception e) {
log.info("入料机构获取可用料格:"+stackerId+"结果异常:"+e.getMessage()); //log.info("入料机构获取可用料格:"+stackerId+"结果异常:"+e.getMessage());
e.printStackTrace(); log.info("入料机构获取可用料格:"+stackerId+"结果异常:",e);
log.info(e.getMessage());
return ResultBean.newErrorResult(-1,"",stackerId+"获取可用料格失败:"+e.getMessage()); return ResultBean.newErrorResult(-1,"",stackerId+"获取可用料格失败:"+e.getMessage());
} }
isProcess.set(false); isProcess.set(false);
......
package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.controller;
import com.alibaba.fastjson.JSONObject;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.common.utils.HttpHelper;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.order.service.po.LiteOrderItem;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import java.util.logging.SimpleFormatter;
@Api(tags = "展示的3楼缺料信息")
@RestController
@RequestMapping("/materialShortage")
public class MaterialShortageController {
@Value("${lizhen.shortage.bg}")
private String bgShortageUrl = "";
@Value("${lizhen.shortage.cg}")
private String cgShortageUrl = "";
@ApiOperation("缺料详情")
@RequestMapping("/detail")
@AnonymousAccess
public ResultBean detail() {
List<LiteOrderItem> bgItemList = new ArrayList<>();
List<LiteOrderItem> cgItemList = new ArrayList<>();
//获取BG/CG的缺料信息
bgItemList = getShortageDetail(bgShortageUrl);
cgItemList = getShortageDetail(cgShortageUrl);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("BG", bgItemList);
resultMap.put("CG", cgItemList);
resultMap.put("updateTime", DateUtil.toDateString(new Date(), "yyyy-MM-dd HH:mm:ss"));
return ResultBean.newOkResult(resultMap);
}
private List<LiteOrderItem> getShortageDetail(String url) {
String result = HttpHelper.sendGet(url);
if (StringUtils.isEmpty(result)){
return new ArrayList<>();
}
return JSONObject.parseArray(result, LiteOrderItem.class);
}
}
...@@ -572,7 +572,7 @@ public class BoxHandleUtil { ...@@ -572,7 +572,7 @@ public class BoxHandleUtil {
task.setNum(opQty); task.setNum(opQty);
task.setType(opType); task.setType(opType);
task.setPosName(barcode.getPosName()); task.setPosName(barcode.getPosName());
task.setOperator(SecurityUtils.getCurrentUsername()); task.setOperator(SecurityUtils.getLoginUsername());
task.setDateCode(barcode.getDateCode()); task.setDateCode(barcode.getDateCode());
task.setBatchInfo(barcode.getBatch()); task.setBatchInfo(barcode.getBatch());
task.setProvider(barcode.getProvider()); task.setProvider(barcode.getProvider());
......
...@@ -46,6 +46,10 @@ lizhen: ...@@ -46,6 +46,10 @@ lizhen:
manual: manual:
url: http://10.68.27.85/smf-core/wcs/manualTower url: http://10.68.27.85/smf-core/wcs/manualTower
cgUrl: http://10.68.27.79/smf-core/wcs/manualTower cgUrl: http://10.68.27.79/smf-core/wcs/manualTower
shortage:
bg: http://10.68.27.85/smf-core/api/orders/shortageDetail
cg: http://10.68.27.79/smf-core/api/orders/shortageDetail
# #
#转发地址 #转发地址
...@@ -108,5 +112,5 @@ app: ...@@ -108,5 +112,5 @@ app:
menu: menu:
show: show: materialShortage
hide: hide:
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!