Commit 0698a9c8 zshaohui

1.电子展会云仓下架指示修改

2.菜单增加order看板
1 个父辈 bf363331
正在显示 17 个修改的文件 包含 191 行增加106 行删除
......@@ -116,7 +116,7 @@ public class MenuInit {
//Mimo临时看板
addDefaultFunctionMenu(0,null,"SMD BOX MIMO","SMDBOXMIMO", "smdBoxMimo/index","smdMimo");
Menu boardMap = Menu.CreatePMenu("仪表盘", 1, "dashBoard", "kanban", null);
Menu boardMap = Menu.CreatePMenu("仪表盘", 0, "dashBoard", "kanban", null);
//新的电子看板
addDefaultFunctionMenu(0, boardMap, "仪表盘1", "boxmimokanban", "boxmimokanban/index", "kanban");
......@@ -130,39 +130,40 @@ public class MenuInit {
addDefaultFunctionMenu(2,null,"设备互联","equipmentView", "neolight/equipmentView/index","sKanban");
//物料管理:工单出库,查找出库(UID出库,PN出库),物料标签,料盒操作,出库策略,工单设置
Menu poutOut = Menu.CreatePMenu("物料管理", 1, "order", "workOrder", null);
Menu poutOut = Menu.CreatePMenu("物料管理", 3, "order", "workOrder", null);
//Menu out = Menu.CreatePMenu("查找出库", 11, "searchOut", "findOut",poutOut);
addDefaultFunctionMenu(1,poutOut,"UID出库", "singleOuput", "neolight/singleOuput/index","export1",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(2, poutOut,"PN出库", "tacticsOuput", "neolight/tacticsOuput/index", "tacticsOuput",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(1,poutOut,"工单出库","workOrder", "neolight/workOrder/index","orderOut",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(2,poutOut,"库位出库", "posOutput", "system/posOutput/index", "swagger");
addDefaultFunctionMenu(3, poutOut, "物料标签", "labelOuput", "neolight/labelOuput/index", "mgroup");
addDefaultFunctionMenu(4, poutOut, "料盒操作", "materialBox", "neolight/materialBox/index", "mIbox");
addDefaultFunctionMenu(12, poutOut, "出库策略", "outSetting", "system/outSetting/index", "outSet",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(3,poutOut,"工单出库","workOrder", "neolight/workOrder/index","orderOut",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(4,poutOut,"工单","orderkanban", "orderkanban/index","kanban");
addDefaultFunctionMenu(5,poutOut,"库位出库", "posOutput", "system/posOutput/index", "swagger");
addDefaultFunctionMenu(6, poutOut, "物料标签", "labelOuput", "neolight/labelOuput/index", "mgroup");
addDefaultFunctionMenu(7, poutOut, "料盒操作", "materialBox", "neolight/materialBox/index", "mIbox");
addDefaultFunctionMenu(8, poutOut, "出库策略", "outSetting", "system/outSetting/index", "outSet",DEFAULT_SHOW_MENU);
// Menu orderSet = new Menu(, "orderSetting", "工单设置", "orderSetting", "system/orderSetting/index", "sysSet");
addDefaultFunctionMenu(5, poutOut, "入库单", "inList", "system/inList/index", "headIcon");
addDefaultFunctionMenu(6, poutOut, "物料入库", "putIn", "system/putIn/index", "headIcon");
addDefaultFunctionMenu(7, poutOut, "转储入库", "dumpWarehousing", "system/dumpWarehousing/index", "headIcon");
addDefaultFunctionMenu(8, poutOut, "单盘入库", "singleDiskWarehousing", "system/singleDiskWarehousing/index", "headIcon");
addDefaultFunctionMenu(9, poutOut, "呆滞物料", "sluggishMaterials", "system/sluggishMaterials/index", "sMaterial");
addDefaultFunctionMenu(10,poutOut, "安全库存", "safetyInventory", "system/safetyInventory/index", "safeInventory");
addDefaultFunctionMenu(11, poutOut,"过期物料", "expireMaterials", "system/expireMaterials/index", "sMaterial");
addDefaultFunctionMenu(12, poutOut,"生成工单", "createOrder", "system/createOrder/index", "createOrder");
addDefaultFunctionMenu(9, poutOut, "入库单", "inList", "system/inList/index", "headIcon");
addDefaultFunctionMenu(10, poutOut, "物料入库", "putIn", "system/putIn/index", "headIcon");
addDefaultFunctionMenu(11, poutOut, "转储入库", "dumpWarehousing", "system/dumpWarehousing/index", "headIcon");
addDefaultFunctionMenu(12, poutOut, "单盘入库", "singleDiskWarehousing", "system/singleDiskWarehousing/index", "headIcon");
addDefaultFunctionMenu(13, poutOut, "呆滞物料", "sluggishMaterials", "system/sluggishMaterials/index", "sMaterial");
addDefaultFunctionMenu(14,poutOut, "安全库存", "safetyInventory", "system/safetyInventory/index", "safeInventory");
addDefaultFunctionMenu(15, poutOut,"过期物料", "expireMaterials", "system/expireMaterials/index", "sMaterial");
addDefaultFunctionMenu(16, poutOut,"生成工单", "createOrder", "system/createOrder/index", "createOrder");
addDefaultFunctionMenu(91,poutOut, "共享文件夹", "orderSetting", "system/orderSetting/index", "sysSet");
//MSD管理:MSD库存.MSD追溯性.MSD设置
Menu msd = Menu.CreatePMenu("MSD管理", 2, "msd", "MSD",null);
Menu msd = Menu.CreatePMenu("MSD管理", 4, "msd", "MSD",null);
addDefaultFunctionMenu(21, msd, "MSD库存", "msdManage", "neolight/msdManage/index", "MSDManager");
addDefaultFunctionMenu(22, msd, "MSD追溯性", "msdData", "neolight/msdData/index", "MSDData");
addDefaultFunctionMenu(23, msd, "MSD设置", "msdSetting", "neolight/msdSetting/index", "MSDSet");
//锡膏管理:设备概览.库存.追溯性.设置
Menu solderPaste = Menu.CreatePMenu("锡膏管理", 3, "solderPaste", "sMana",null);
Menu solderPaste = Menu.CreatePMenu("锡膏管理", 5, "solderPaste", "sMana",null);
addDefaultFunctionMenu(31, solderPaste,"设备概览","solderPasteKanban", "neolight/solderPasteKanban/index","sKanban",SP_SHOW_MENU);
addDefaultFunctionMenu(32,solderPaste, "库存", "solderPasteManage", "neolight/solderPasteManage/index","solder",SP_SHOW_MENU);
addDefaultFunctionMenu(33, solderPaste,"追溯性", "solderPasteData", "neolight/solderPasteData/index","sData",SP_SHOW_MENU);
......@@ -171,22 +172,22 @@ public class MenuInit {
//档案管理:元器件
Menu pMenuWl = Menu.CreatePMenu("档案管理", 4, "materiel ", "BOM",null);
Menu pMenuWl = Menu.CreatePMenu("档案管理", 6, "materiel ", "BOM",null);
addDefaultFunctionMenu(41, pMenuWl,"元器件","componentParts", "parts/component/index","server",DEFAULT_SHOW_MENU);
//条形码:条码管理,条码设置
Menu pMenuBarcode = Menu.CreatePMenu("条形码", 5, "barcodes ", "barcodeMenu",null);
Menu pMenuBarcode = Menu.CreatePMenu("条形码", 7, "barcodes ", "barcodeMenu",null);
addDefaultFunctionMenu(51,pMenuBarcode, "条码管理", "barcode", "barcode/barcode/index","chart",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(52, pMenuBarcode, "条码设置","barcodeSetting", "system/barcodeSetting/index", "barcode",DEFAULT_SHOW_MENU);
//日志管理:物料日志
Menu pMenuLog = Menu.CreatePMenu("日志管理", 6, "log","log",null);
Menu pMenuLog = Menu.CreatePMenu("日志管理", 8, "log","log",null);
addDefaultFunctionMenu(61, pMenuLog, "物料日志", "taskLog", "neolight/taskLog/index", "education",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(62, pMenuLog, "消息查询", "message", "neolight/message/index", "messagefind");
addDefaultFunctionMenu(63, pMenuLog, "接口异常", "interfaceException", "neolight/interfaceException/index", "messagefind");
//报表:出入库、库存
Menu pMenuReport = Menu.CreatePMenu("报表", 7, "report","inOutData",null);
Menu pMenuReport = Menu.CreatePMenu("报表", 9, "report","inOutData",null);
addDefaultFunctionMenu(70, pMenuReport, "锁定物料", "lockMaterials", "system/lockMaterials/index", "lockMaterials");
addDefaultFunctionMenu(71, pMenuReport, "出入库", "inOutData", "neolight/inOutData/index", "outPut");
//新的出入库报表
......@@ -196,15 +197,15 @@ public class MenuInit {
addDefaultFunctionMenu(73, pMenuReport,"温湿度", "spHumiture", "humiture/spHumitureReport/index", "humiture");
//可观测性:物料追踪
Menu guanceMenu = Menu.CreatePMenu("可观测性", 8, "observability", "scanKey",null);
Menu guanceMenu = Menu.CreatePMenu("可观测性", 10, "observability", "scanKey",null);
addDefaultFunctionMenu(81,guanceMenu, "物料追踪", "materialChart", "neolight/materialChart/index", "maChart");
//物联网:共享文件夹
Menu pMenuWulian = Menu.CreatePMenu("物联网", 9, "internet", "interMenu",null);
Menu pMenuWulian = Menu.CreatePMenu("物联网", 11, "internet", "interMenu",null);
//设置:料仓管理,菜单管理
Menu poutSet = Menu.CreatePMenu("设置", 10, "system","system",null);
Menu poutSet = Menu.CreatePMenu("设置", 12, "system","system",null);
addDefaultFunctionMenu(101, poutSet, "设备管理", "bunker", "storage/storage/index", "database",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(102,poutSet, "库位管理", "storagePos", "storagePos/storagePos/index", "tree-table",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(103, poutSet, "菜单管理", "menu", "system/menu/index", "menu");
......@@ -217,11 +218,11 @@ public class MenuInit {
//用户管理:用户管理,角色管理
Menu pMenuUser = Menu.CreatePMenu("用户管理", 11, "userManager", "Steve-Jobs", null);
Menu pMenuUser = Menu.CreatePMenu("用户管理", 13, "userManager", "Steve-Jobs", null);
addDefaultFunctionMenu(111, pMenuUser,"用户管理", "peoples", "system/user/index", "peoples",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(112, pMenuUser,"角色管理", "role", "system/role/index", "role",DEFAULT_SHOW_MENU);
//条形码:条码管理,条码设置
Menu selfAudit = Menu.CreatePMenu("盘点管理", 12, "selfAuditManagerment", "selfAudit",null);
Menu selfAudit = Menu.CreatePMenu("盘点管理", 14, "selfAuditManagerment", "selfAudit",null);
addDefaultFunctionMenu(121,selfAudit, "盘点", "selfAudit", "system/selfAudit/index","selfAudit");
addDefaultFunctionMenu(122, selfAudit, "盘点记录","selfAuditLog", "system/selfAuditLog/index", "selfAuditLog");
......
......@@ -165,16 +165,29 @@ public class HttpHelper {
throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage());
}
}
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
} finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -196,6 +209,8 @@ public class HttpHelper {
public static String postParam(String url, Map<String, Object> paramMap, String contentType) throws ApiException {
// 设置请求参数
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
List<NameValuePair> params = toNameValuePair(paramMap);
URI uri = new URIBuilder(url).setParameters(params).build();
......@@ -203,15 +218,26 @@ public class HttpHelper {
HttpPost httpPost = new HttpPost(uri);
httpPost.addHeader("Content-Type", contentType);
// httpPost.setEntity(new UrlEncodedFormEntity(params, CONTENT_CHARSET));
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request params to [" + url + "] failed:" + e.getMessage());
}finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -250,16 +276,29 @@ public class HttpHelper {
throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage());
}
}
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
}finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -282,9 +321,11 @@ public class HttpHelper {
// throw new ApiException("Request params to [" + url + "] failed:" + e.getMessage());
// }
// }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode();
//System.out.println(response.getStatusLine().getStatusCode() + "\n");
......@@ -296,11 +337,22 @@ public class HttpHelper {
}
result.setHttpCode(code);
result.setResponseData(responseContent);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return result;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
}finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -339,22 +391,35 @@ public class HttpHelper {
throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage());
}
}
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
HttpGet httpGet = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build();
httpGet.setConfig(requestConfig);
httpGet.addHeader("Content-Type", "application/json;charset=utf-8");
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
}finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -375,6 +440,8 @@ public class HttpHelper {
throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage());
}
}
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try {
HttpGet httpGet = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build();
......@@ -384,17 +451,28 @@ public class HttpHelper {
httpGet.addHeader(entry.getKey(), entry.getValue());
}
}
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet);
httpClient = HttpClients.createDefault();
response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
//response.close();
//httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
}finally {
try {
if (response != null) {
response.close();
}
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
......
package com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.first;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard;
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.firstdashboard;
package com.neotel.smfcore.core.dashboard.first;
import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.BoxStatusBean;
import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard.SluggishDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.SluggishDto;
import com.neotel.smfcore.core.inout.service.manager.IInOutDataManager;
import com.neotel.smfcore.core.inout.service.po.InOutData;
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.dashboard.bean.dto.firstdashboard.ExpireDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.ExpireDto;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
......
package com.neotel.smfcore.core.dashboard.seconddashboard;
package com.neotel.smfcore.core.dashboard.second;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.core.agv.bean.AgvInfo;
import com.neotel.smfcore.core.agv.util.AgvCache;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard.MachineStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard.StorageCapacityDto;
import com.neotel.smfcore.core.dashboard.bean.dto.seconddashboard.UpcomingExpirationsDto;
import com.neotel.smfcore.core.dashboard.bean.dto.second.MachineStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.second.StorageCapacityDto;
import com.neotel.smfcore.core.dashboard.bean.dto.second.UpcomingExpirationsDto;
import com.neotel.smfcore.core.device.bean.BoxStatusBean;
import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache;
......
......@@ -18,7 +18,7 @@ import com.neotel.smfcore.core.report.rest.query.ReportQuery;
import com.neotel.smfcore.core.storage.bean.UsageItem;
import com.neotel.smfcore.core.storage.service.manager.IStorageManager;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard.InOutDataDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.InOutDataDto;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import com.neotel.smfcore.security.service.manager.IGroupManager;
import com.neotel.smfcore.security.service.manager.IUserManager;
......
......@@ -85,9 +85,9 @@ public class TaskController {
criteria.setStatus(null);
finished=true;
}
if (StringUtils.isBlank(criteria.getStorageId())){
/*if (StringUtils.isBlank(criteria.getStorageId())){
criteria.setStorageIdList(SecurityUtils.getUserGroupStorageId());
}
}*/
Query query = QueryHelp.getQuery(criteria);
if (unEnd) {
query.addCriteria(Criteria.where("status").nin(OP_STATUS.END.name(), OP_STATUS.FINISHED.name()));
......@@ -111,6 +111,7 @@ public class TaskController {
@ApiOperation("导出查找出入库日志")
@GetMapping(value = "/history/download")
@PreAuthorize("@el.check('taskLog')")
@AnonymousAccess
public void download(HttpServletResponse response, TaskQueryCondition criteria, Pageable pageable, HttpServletRequest request) throws IOException {
Query query = getQuery(criteria);
Locale locale = request.getLocale();
......
package com.neotel.smfcore.custom.exhibition.controller;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.order.LiteOrderCache;
import com.neotel.smfcore.core.order.service.manager.ILiteOrderManager;
import com.neotel.smfcore.core.order.service.po.LiteOrder;
import com.neotel.smfcore.core.order.service.po.LiteOrderItem;
import com.neotel.smfcore.core.storage.enums.CHECKOUT_TYPE;
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.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.exhibition.bean.OrderTable;
import com.neotel.smfcore.custom.exhibition.bean.OutDepotOrder;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
......@@ -17,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@Api("电子展")
......@@ -26,50 +37,44 @@ import java.util.List;
public class ElectronicExhibitionController {
@Autowired
private ILiteOrderManager liteOrderManager;
private IStoragePosManager storagePosManager;
@Autowired
private DataCache dataCache;
@Autowired
private LiteOrderCache liteOrderCache;
@Autowired
private TaskService taskService;
@ApiOperation("云仓下架指示")
@RequestMapping("/outDepotOrder")
@AnonymousAccess
public ResultBean outDepotOrder(@RequestBody OutDepotOrder depotOrder) {
//判断工单号是否存在
String orderno = depotOrder.getOrderno();
LiteOrder liteOrder = liteOrderManager.findByOrderNo(orderno);
if (liteOrder != null) {
return ResultBean.newErrorResult(-1, "smfcore.order.ameExists", "工单名称[{0}]已存在", new String[]{orderno});
}
//开始处理明细数据
List<LiteOrderItem> orderItemList = new ArrayList<>();
log.info("收到云仓下架指示,数据为:"+ JSON.toJSONString(depotOrder));
List<OrderTable> tableList = depotOrder.getTable();
for (OrderTable table : tableList) {
LiteOrderItem item = new LiteOrderItem();
item.setPn(table.getCompno());
int num = 1;
try {
num = Integer.parseInt(table.getNum());
} catch (NumberFormatException e) {
e.printStackTrace();
if (tableList != null && !tableList.isEmpty()) {
for (OrderTable table : tableList) {
List<String> availableStorageIds = dataCache.getAvailableStorageIds();
Collection<String> excludePosIds = liteOrderCache.excludeOutPosIds();
CHECKOUT_TYPE checkoutType = dataCache.getCheckOutType();
String compno = table.getCompno();
StoragePos storagePos = storagePosManager.findPartNumberInStorages(availableStorageIds, compno, excludePosIds, checkoutType);
if (storagePos != null) {
Storage storage = dataCache.getStorageById(storagePos.getStorageId());
DataLog task = new DataLog(storage, storagePos.getBarcode(), storagePos);
task.setType(OP.CHECKOUT);
task.setStatus(OP_STATUS.WAIT.name());
task.setSourceName(depotOrder.getOrderno());
taskService.addTaskToExecute(task);
log.info(table.getCompno()+"生成任务,库位号为:"+storagePos.getPosName());
} else {
log.info(table.getCompno() + "未找到要出库的物料");
}
}
item.setNeedNum(num);
item.setFeederInfo(table.getRowno());
orderItemList.add(item);
}
if (orderItemList != null && !orderItemList.isEmpty()) {
LiteOrder order = new LiteOrder();
order.setOrderNo(orderno);
order.setOrderItems(orderItemList);
order = liteOrderManager.createWithItems(order);
liteOrderCache.addOrderToMap(order);
return ResultBean.newOkResult("");
}
return ResultBean.newErrorResult(-1,"smfcore.valueCanotNull","{0}不能为空",new String[]{"Table"});
return ResultBean.newOkResult("");
}
}
......@@ -13,8 +13,8 @@ import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.device.bean.BoxStatusBean;
import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.firstdashboard.InOutDataDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.dashboard.bean.dto.first.InOutDataDto;
import com.neotel.smfcore.core.inout.service.manager.IInOutDataManager;
import com.neotel.smfcore.core.inout.service.po.InOutData;
import com.neotel.smfcore.core.kanban.rest.bean.dto.BoxStatusDto;
......
......@@ -63,6 +63,7 @@ smfcore.lockMaterial=EPM
smfcore.lightGroup=Neo Light Grouping
smfcore.order=Material Management
smfcore.workOrder=Work Order
smfcore.workOrderkanban=WO KANBAN
smfcore.searchOut=Search
smfcore.singleOuput=UID
smfcore.system=System
......
......@@ -61,6 +61,7 @@ smfcore.loadMaterialFinished=\u8BBE\u5907\u52A0\u8F7D\u5B8C\u6210: {0}
smfcore.lockMaterial=\u8BBE\u5907\u770B\u677F
smfcore.lightGroup=\u6599\u67B6\u5206\u7EC4
smfcore.order=\u7269\u6599\u7BA1\u7406
smfcore.workOrderkanban=\u5DE5\u5355
smfcore.workOrder=\u5DE5\u5355\u51FA\u5E93
smfcore.searchOut=\u67E5\u627E\u51FA\u5E93
smfcore.singleOuput=UID\u51FA\u5E93
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!