Commit 902d68b5 孙克
2 个父辈 9e01f250 2c61e73b
正在显示 61 个修改的文件 包含 1509 行增加92 行删除
...@@ -165,16 +165,29 @@ public class HttpHelper { ...@@ -165,16 +165,29 @@ public class HttpHelper {
throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage()); throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage());
} }
} }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost); response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET); String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return responseContent; return responseContent;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage()); 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 { ...@@ -196,6 +209,8 @@ public class HttpHelper {
public static String postParam(String url, Map<String, Object> paramMap, String contentType) throws ApiException { public static String postParam(String url, Map<String, Object> paramMap, String contentType) throws ApiException {
// 设置请求参数 // 设置请求参数
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
List<NameValuePair> params = toNameValuePair(paramMap); List<NameValuePair> params = toNameValuePair(paramMap);
URI uri = new URIBuilder(url).setParameters(params).build(); URI uri = new URIBuilder(url).setParameters(params).build();
...@@ -203,15 +218,26 @@ public class HttpHelper { ...@@ -203,15 +218,26 @@ public class HttpHelper {
HttpPost httpPost = new HttpPost(uri); HttpPost httpPost = new HttpPost(uri);
httpPost.addHeader("Content-Type", contentType); httpPost.addHeader("Content-Type", contentType);
// httpPost.setEntity(new UrlEncodedFormEntity(params, CONTENT_CHARSET)); // httpPost.setEntity(new UrlEncodedFormEntity(params, CONTENT_CHARSET));
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost); response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET); String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return responseContent; return responseContent;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request params to [" + url + "] failed:" + e.getMessage()); 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 { ...@@ -250,16 +276,29 @@ public class HttpHelper {
throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage()); throw new ApiException("Request params to [" + url + "] json exception:" + e.getMessage());
} }
} }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost); response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET); String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return responseContent; return responseContent;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage()); 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 { ...@@ -282,9 +321,11 @@ public class HttpHelper {
// throw new ApiException("Request params to [" + url + "] failed:" + e.getMessage()); // throw new ApiException("Request params to [" + url + "] failed:" + e.getMessage());
// } // }
// } // }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet); response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode(); int code = response.getStatusLine().getStatusCode();
//System.out.println(response.getStatusLine().getStatusCode() + "\n"); //System.out.println(response.getStatusLine().getStatusCode() + "\n");
...@@ -296,11 +337,22 @@ public class HttpHelper { ...@@ -296,11 +337,22 @@ public class HttpHelper {
} }
result.setHttpCode(code); result.setHttpCode(code);
result.setResponseData(responseContent); result.setResponseData(responseContent);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return result; return result;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage()); 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 { ...@@ -339,22 +391,35 @@ public class HttpHelper {
throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage()); throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage());
} }
} }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
HttpGet httpGet = new HttpGet(url); HttpGet httpGet = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build(); RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build();
httpGet.setConfig(requestConfig); httpGet.setConfig(requestConfig);
httpGet.addHeader("Content-Type", "application/json;charset=utf-8"); httpGet.addHeader("Content-Type", "application/json;charset=utf-8");
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet); response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode(); int code = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET); String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return responseContent; return responseContent;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage()); 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 { ...@@ -375,6 +440,8 @@ public class HttpHelper {
throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage()); throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage());
} }
} }
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
try { try {
HttpGet httpGet = new HttpGet(url); HttpGet httpGet = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build(); RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build();
...@@ -384,17 +451,28 @@ public class HttpHelper { ...@@ -384,17 +451,28 @@ public class HttpHelper {
httpGet.addHeader(entry.getKey(), entry.getValue()); httpGet.addHeader(entry.getKey(), entry.getValue());
} }
} }
CloseableHttpClient httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet); response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode(); int code = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET); String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close(); //response.close();
httpClient.close(); //httpClient.close();
return responseContent; return responseContent;
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage()); 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.agv;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.core.agv.util.AgvCache;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("agv信息")
@RequestMapping("/agv")
@RestController
public class AgvController {
@ApiOperation("呼叫agv")
@RequestMapping("/call")
@AnonymousAccess
public ResultBean call() {
boolean callAgv = AgvCache.getCallAgv();
if (callAgv){
return ResultBean.newErrorResult(-1,"smfcore.agv.already.call","已经呼叫");
}
AgvCache.updateCallAgv(true);
return ResultBean.newOkResult("");
}
@ApiOperation("定时请求agv是否呼叫")
@RequestMapping("/agvIsAlready")
@AnonymousAccess
public ResultBean agvIsAlready(){
return ResultBean.newOkResult(AgvCache.getCallAgv());
}
@ApiOperation("完成呼叫")
@RequestMapping("/finishCall")
@AnonymousAccess
public ResultBean finishCall(){
AgvCache.updateCallAgv(false);
return ResultBean.newOkResult("");
}
}
package com.neotel.smfcore.core.agv.bean;
import lombok.Data;
@Data
public class AgvInfo {
/**
* 小车名称
*/
private String name;
/**
* 小车电量
*/
private String elec;
/**
* 小车位置
*/
private String loc;
/**
* 状态
*/
private int status;
}
package com.neotel.smfcore.core.agv.util;
import com.google.common.collect.Maps;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Component
public class AgvCache {
public static boolean callAgv = false;
public static void updateCallAgv(boolean isCall) {
callAgv = isCall;
}
public static boolean getCallAgv() {
return callAgv;
}
}
package com.neotel.smfcore.core.elecKanban.bean.dto; package com.neotel.smfcore.core.dashboard.bean.dto.first;
import lombok.Data; import lombok.Data;
......
package com.neotel.smfcore.core.elecKanban.bean.dto; package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.neotel.smfcore.core.elecKanban.bean.dto; package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.neotel.smfcore.core.elecKanban.bean.dto; package com.neotel.smfcore.core.dashboard.bean.dto.first;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
@Data
public class MachineStatusDto {
/**
* 温度
*/
private String temperature = "";
/**
* 湿度
*/
private String humidity = "";
}
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
@Data
public class StorageCapacityDto {
/**
*容量
*/
private int capacity;
/**
* 百分比容量
*/
private int perCapacity;
}
package com.neotel.smfcore.core.dashboard.bean.dto.second;
import lombok.Data;
@Data
public class UpcomingExpirationsDto {
/**
* 0到7天
*/
private int zeroToSeven = 0;
/**
* 7到30天
*/
private int sevenToThirty = 0;
/**
* 已过期
*/
private int expirated = 0;
}
package com.neotel.smfcore.core.elecKanban; package com.neotel.smfcore.core.dashboard.first;
import com.neotel.smfcore.common.utils.DateUtil; import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.core.barcode.service.po.Barcode; import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.BoxStatusBean; import com.neotel.smfcore.core.device.bean.BoxStatusBean;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.elecKanban.bean.dto.ElecKanbanBoxStatusDto; import com.neotel.smfcore.core.dashboard.bean.dto.first.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.elecKanban.bean.dto.SluggishDto; 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.manager.IInOutDataManager;
import com.neotel.smfcore.core.inout.service.po.InOutData; 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.manager.IStoragePosManager;
import com.neotel.smfcore.core.storage.service.po.Storage; import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos; import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.elecKanban.bean.dto.ExpireDto; import com.neotel.smfcore.core.dashboard.bean.dto.first.ExpireDto;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil; import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess; import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -34,9 +34,9 @@ import java.util.stream.Collectors; ...@@ -34,9 +34,9 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "看板") @Api(tags = "仪表盘")
@RequestMapping("/elecKanban") @RequestMapping("/elecKanban")
public class ElecKanbanController { public class FirstDashboardController {
@Autowired @Autowired
private IStoragePosManager storagePosManager; private IStoragePosManager storagePosManager;
......
package com.neotel.smfcore.core.dashboard.second;
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.barcode.service.po.Barcode;
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;
import com.neotel.smfcore.core.equipment.bean.EquipStatusBean;
import com.neotel.smfcore.core.equipment.enums.EquipmentType;
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.DevicesStatusUtil;
import com.neotel.smfcore.core.system.util.EquipStatusUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(tags = "仪表盘(新)")
@RequestMapping("/dashboard")
public class SecondDashboardController {
@Autowired
private DataCache dataCache;
@Autowired
private IStoragePosManager storagePosManager;
@ApiOperation("MachineStatus")
@RequestMapping("/machineStatus")
@AnonymousAccess
public ResultBean machineStatus(@RequestParam("storageId") String storageId) {
MachineStatusDto dto = new MachineStatusDto();
//获取到设备的状态 温度湿度信息
Storage storage = dataCache.getStorageById(storageId);
if (storage != null) {
StatusBean statusBean = DevicesStatusUtil.getStatusBean(storage.getCid());
if (statusBean != null) {
Collection<BoxStatusBean> boxStatusBeans = statusBean.getBoxStatus().values();
if (boxStatusBeans != null && !boxStatusBeans.isEmpty()) {
for (BoxStatusBean boxStatusBean : boxStatusBeans) {
dto.setHumidity(boxStatusBean.getHumidity());
dto.setTemperature(boxStatusBean.getTemperature());
}
}
}
}
return ResultBean.newOkResult(dto);
}
@ApiOperation("StorageCapacity")
@RequestMapping("/storageCapacity")
@AnonymousAccess
public ResultBean storageCapacity(@RequestParam("storageId") String storageId) {
StorageCapacityDto dto = new StorageCapacityDto();
Storage storage = dataCache.getStorageById(storageId);
if (storage != null) {
int totalSlots = storage.getTotalSlots();
if (totalSlots != 0) {
int emptySlots = storage.getEmptySlots();
int capacity = totalSlots - emptySlots;
int perCapacity = (capacity * 100 )/ totalSlots ;
dto.setCapacity(capacity);
dto.setPerCapacity(perCapacity);
}
}
return ResultBean.newOkResult(dto);
}
@ApiOperation("Upcoming Expirations")
@RequestMapping("/upcomingExpirations")
@AnonymousAccess
public ResultBean upcomingExpirations(@RequestParam("storageId") String storageId) {
UpcomingExpirationsDto dto = new UpcomingExpirationsDto();
List<StoragePos> storagePosList = storagePosManager.findNotEmptyByStorageId(storageId);
if (storagePosList != null && !storagePosList.isEmpty()) {
int zeroToSeven = 0;
int sevenToThirty = 0;
int expirated = 0;
for (StoragePos storagePos : storagePosList) {
Barcode barcode = storagePos.getBarcode();
Date expireDate = barcode.getExpireDate();
//判断过期时间.相差天数
if (expireDate != null) {
long between = DateUtil.between(new Date(), expireDate, DateUnit.DAY, false);
if (between < 0) {
expirated = expirated + 1;
} else if (between >= 0 && between < 7) {
zeroToSeven = zeroToSeven + 1;
} else if (between >= 7 && between < 30) {
sevenToThirty = sevenToThirty + 1;
}
}
}
dto.setZeroToSeven(zeroToSeven);
dto.setSevenToThirty(sevenToThirty);
dto.setExpirated(expirated);
}
return ResultBean.newOkResult(dto);
}
@ApiOperation("AGV")
@RequestMapping("agv")
@AnonymousAccess
public ResultBean agv() {
List<AgvInfo> agvCacheList = new ArrayList<>();
Collection<EquipStatusBean> allStatusBean = EquipStatusUtil.getAllStatusBean();
if (allStatusBean != null && !allStatusBean.isEmpty()) {
for (EquipStatusBean statusBean : allStatusBean) {
if (statusBean.getType().equals(EquipmentType.AGV.name())){
AgvInfo agvInfo = new AgvInfo();
agvInfo.setName(statusBean.getName());
if (statusBean.timeOut()){
agvInfo.setStatus(0);
} else {
agvInfo.setStatus(statusBean.getStatus());
}
agvInfo.setElec(statusBean.getData().get("elec").toString());
agvCacheList.add(agvInfo);
}
}
}
return ResultBean.newOkResult(agvCacheList);
}
}
...@@ -75,6 +75,7 @@ public class NLLShelfHandler extends BaseDeviceHandler { ...@@ -75,6 +75,7 @@ public class NLLShelfHandler extends BaseDeviceHandler {
barcode = new Barcode(); barcode = new Barcode();
barcode.setBarcode(code); barcode.setBarcode(code);
barcode.setPartNumber(code); barcode.setPartNumber(code);
barcode.setSubCodeList(new ArrayList<>());
} }
dto = barcodeMapper.toDto(barcode); dto = barcodeMapper.toDto(barcode);
......
package com.neotel.smfcore.core.device.handler.impl;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Api(tags = "SHELF: NLS(钢网料架)")
@Slf4j
public class NLSShelfHandler extends NLShelfHandler{
@Override
public DeviceType getDeviceType() {
return DeviceType.NLS;
}
}
...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.util; ...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.util;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.equipment.service.manager.IEquipmentManager; import com.neotel.smfcore.core.equipment.service.manager.IEquipmentManager;
import com.neotel.smfcore.core.equipment.service.po.Equipment; import com.neotel.smfcore.core.equipment.service.po.Equipment;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -86,7 +87,7 @@ public class EquipmentCache { ...@@ -86,7 +87,7 @@ public class EquipmentCache {
} }
} }
public Equipment autoCreateEquip(String cid, String type) { public Equipment autoCreateEquip(String name,String cid, String type) {
//判断cid存在 //判断cid存在
Equipment equipment = null; Equipment equipment = null;
equipment = getEquipment(cid); equipment = getEquipment(cid);
...@@ -101,7 +102,11 @@ public class EquipmentCache { ...@@ -101,7 +102,11 @@ public class EquipmentCache {
equipment = new Equipment(); equipment = new Equipment();
equipment.setCid(cid); equipment.setCid(cid);
equipment.setType(type); equipment.setType(type);
equipment.setName(cid); if (StringUtils.isNotBlank(name)){
equipment.setName(name);
} else {
equipment.setName(cid);
}
equipment = equipmentManager.save(equipment); equipment = equipmentManager.save(equipment);
reloadEquipment(equipment, ""); reloadEquipment(equipment, "");
......
...@@ -17,6 +17,11 @@ public class EquipStatusBean implements Serializable { ...@@ -17,6 +17,11 @@ public class EquipStatusBean implements Serializable {
private String cid; private String cid;
/** /**
* 设备名称
*/
private String name;
/**
* 设备类型 ,NEOSCAN=扫码贴标,COUNTING=点料机 * 设备类型 ,NEOSCAN=扫码贴标,COUNTING=点料机
*/ */
private String type = EquipmentType.AUTO.name(); private String type = EquipmentType.AUTO.name();
...@@ -87,7 +92,10 @@ public class EquipStatusBean implements Serializable { ...@@ -87,7 +92,10 @@ public class EquipStatusBean implements Serializable {
} }
public void addData(String key, String value) { public void addData(String key, String value) {
String oldValue = data.get(key).toString(); String oldValue = "";
if (data.get(key) != null){
oldValue = data.get(key).toString();
}
String valueStr = value; String valueStr = value;
if (!Strings.isNullOrEmpty(oldValue)) { if (!Strings.isNullOrEmpty(oldValue)) {
valueStr = valueStr + "|" + oldValue; valueStr = valueStr + "|" + oldValue;
...@@ -95,10 +103,12 @@ public class EquipStatusBean implements Serializable { ...@@ -95,10 +103,12 @@ public class EquipStatusBean implements Serializable {
data.put(key, valueStr); data.put(key, valueStr);
} }
public EquipMsg getMsgByType(String type){ public EquipMsg getMsgByType(String type) {
for (EquipMsg msg : getMsgList()){ if (msgList != null && !msgList.isEmpty()) {
if(msg.getType().equals(type)){ for (EquipMsg msg : msgList) {
return msg; if (msg.getType().equals(type)) {
return msg;
}
} }
} }
return null; return null;
......
...@@ -18,5 +18,27 @@ public enum EquipmentType { ...@@ -18,5 +18,27 @@ public enum EquipmentType {
/** /**
* 2 点料机 * 2 点料机
*/ */
COUNTING() COUNTING(),
/**
* 3 插件机
*/
NEOSTATION(),
/**
* 4 FUJINEOLINK
*/
FUJINEOLINK(),
/**
* 5 PANACIMNEOLINK
*/
PANACIMNEOLINK(),
/**
* 6 AGV
*/
AGV()
} }
package com.neotel.smfcore.core.equipment.handler.impl; package com.neotel.smfcore.core.equipment.handler.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.neotel.smfcore.core.agv.util.AgvCache;
import com.neotel.smfcore.core.equipment.bean.EquipMsg; import com.neotel.smfcore.core.equipment.bean.EquipMsg;
import com.neotel.smfcore.core.equipment.bean.EquipStatusBean; import com.neotel.smfcore.core.equipment.bean.EquipStatusBean;
import com.neotel.smfcore.core.equipment.enums.EquipmentType; import com.neotel.smfcore.core.equipment.enums.EquipmentType;
...@@ -19,6 +20,15 @@ public class BaseEquipHandler implements IEquipmentHandler { ...@@ -19,6 +20,15 @@ public class BaseEquipHandler implements IEquipmentHandler {
statusBean.setClientIp(request.getRemoteHost()); statusBean.setClientIp(request.getRemoteHost());
handleMsg(statusBean); handleMsg(statusBean);
//处理AGV调度
if (statusBean.getType().equals(EquipmentType.AGV.name())){
boolean callAgv = AgvCache.getCallAgv();
if (callAgv){
statusBean.addData("call","1");
} else {
statusBean.addData("call","0");
}
}
return statusBean; return statusBean;
} }
/** /**
......
package com.neotel.smfcore.core.equipment.rest; package com.neotel.smfcore.core.equipment.rest;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.device.util.EquipmentCache; import com.neotel.smfcore.core.device.util.EquipmentCache;
import com.neotel.smfcore.core.equipment.bean.EquipStatusBean; import com.neotel.smfcore.core.equipment.bean.EquipStatusBean;
import com.neotel.smfcore.core.equipment.enums.EquipmentType; import com.neotel.smfcore.core.equipment.enums.EquipmentType;
...@@ -41,15 +42,23 @@ public class EquipCommunicationController { ...@@ -41,15 +42,23 @@ public class EquipCommunicationController {
public EquipStatusBean communication(@RequestBody final EquipStatusBean statusBean, HttpServletRequest request) { public EquipStatusBean communication(@RequestBody final EquipStatusBean statusBean, HttpServletRequest request) {
try { try {
String cid = statusBean.getCid(); String cid = statusBean.getCid();
String name = statusBean.getName();
Equipment equipment = equipmentCache.getEquipment(cid); Equipment equipment = equipmentCache.getEquipment(cid);
if (equipment == null) { if (equipment == null) {
equipment = equipmentCache.autoCreateEquip(cid, statusBean.getType()); equipment = equipmentCache.autoCreateEquip(name,cid, statusBean.getType());
if (equipment != null) { if (equipment != null) {
log.error("设备cid: [" + cid + "]不存在,自动创建设备完成"); log.error("设备cid: [" + cid + "]不存在,自动创建设备完成");
} else { } else {
log.error("设备cid: [" + cid + "]不存在,自动创建设备失败"); log.error("设备cid: [" + cid + "]不存在,自动创建设备失败");
return null; return null;
} }
} else {
if (StringUtils.isNotBlank(name)){
if (!name.equals(equipment.getName())){
equipment.setName(name);
equipment = equipmentCache.reloadEquipment(equipment,equipment.getCid());
}
}
} }
synchronized (equipment) { synchronized (equipment) {
String deviceType = equipment.getType(); String deviceType = equipment.getType();
......
package com.neotel.smfcore.core.equipment.rest; package com.neotel.smfcore.core.equipment.rest;
import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.device.util.EquipmentCache; import com.neotel.smfcore.core.device.util.EquipmentCache;
import com.neotel.smfcore.core.equipment.bean.EquipMsg; import com.neotel.smfcore.core.equipment.bean.EquipMsg;
import com.neotel.smfcore.core.equipment.bean.EquipStatusBean; import com.neotel.smfcore.core.equipment.bean.EquipStatusBean;
...@@ -7,6 +9,9 @@ import com.neotel.smfcore.core.equipment.bean.EquipStatusDto; ...@@ -7,6 +9,9 @@ import com.neotel.smfcore.core.equipment.bean.EquipStatusDto;
import com.neotel.smfcore.core.equipment.service.po.Equipment; ; import com.neotel.smfcore.core.equipment.service.po.Equipment; ;
import com.neotel.smfcore.core.message.enums.MessageType; import com.neotel.smfcore.core.message.enums.MessageType;
import com.neotel.smfcore.core.message.service.po.Message; import com.neotel.smfcore.core.message.service.po.Message;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import com.neotel.smfcore.core.system.util.EquipStatusUtil; import com.neotel.smfcore.core.system.util.EquipStatusUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -19,10 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -19,10 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@Slf4j @Slf4j
...@@ -35,6 +37,9 @@ public class EquipViewController { ...@@ -35,6 +37,9 @@ public class EquipViewController {
@Autowired @Autowired
private EquipmentCache equipmentCache; private EquipmentCache equipmentCache;
@Autowired
private DataCache dataCache;
@ApiOperation("获取看板数据") @ApiOperation("获取看板数据")
@GetMapping @GetMapping
@PreAuthorize("@el.check('equipmentView:info')") @PreAuthorize("@el.check('equipmentView:info')")
...@@ -72,8 +77,26 @@ public class EquipViewController { ...@@ -72,8 +77,26 @@ public class EquipViewController {
// } // }
} }
} }
resultList.add(dto); resultList.add(dto);
} }
//再把NLL加进去
Collection<Storage> storages = dataCache.getAllStorage().values();
for (Storage storage : storages) {
if (storage.getType().equals(DeviceType.NLL.name())){
EquipStatusDto dto=new EquipStatusDto(storage.getId(),storage.getName(),storage.getCid(),false,0,"",storage.getType());
StatusBean bean = DevicesStatusUtil.getStatusBean(storage.getCid());
if (bean == null || bean.timeOut()){
dto.setOnLine(false);
dto.setStatus(0);
} else {
dto.setOnLine(true);
dto.setStatus(bean.getStatus());
}
resultList.add(dto);
}
}
return resultList; return resultList;
} }
} }
...@@ -52,14 +52,24 @@ public class HumitureController { ...@@ -52,14 +52,24 @@ public class HumitureController {
Float maxHumidity = msdSettiings.getMaxHumidity(); Float maxHumidity = msdSettiings.getMaxHumidity();
Float minTemperature = msdSettiings.getMinTemperature(); Float minTemperature = msdSettiings.getMinTemperature();
Float minHumidity = msdSettiings.getMinHumidity(); Float minHumidity = msdSettiings.getMinHumidity();
List<String> cids = criteria.getCids(); List<String> cids = criteria.getCids();
String storageId = criteria.getStorageId();
if (StringUtils.isNotBlank(storageId)){
Storage storage = dataCache.getStorageById(storageId);
if (cids == null || cids.isEmpty()){
cids = new ArrayList<>();
}
cids.add(storage.getCid());
criteria.setCids(cids);
}
if (cids == null || cids.isEmpty()) { if (cids == null || cids.isEmpty()) {
criteria.setCids(SecurityUtils.getUserGroupCid()); criteria.setCids(SecurityUtils.getUserGroupCid());
} }
Query query = QueryHelp.getQuery(criteria); Query query = QueryHelp.getQuery(criteria);
query.with(Sort.by(Sort.Direction.ASC, "createDate")); query.with(Sort.by(Sort.Direction.ASC, "createDate"));
query.addCriteria(Criteria.where("temperature").ne("0")); query.addCriteria(Criteria.where("temperature").ne("0").exists(true));
PageData<Humiture> humitureList = humitureManager.findByPage(query, pageable); PageData<Humiture> humitureList = humitureManager.findByPage(query, pageable);
HumitureDto restultDto = new HumitureDto(); HumitureDto restultDto = new HumitureDto();
restultDto.setMaxHumidity(maxHumidity); restultDto.setMaxHumidity(maxHumidity);
...@@ -90,6 +100,16 @@ public class HumitureController { ...@@ -90,6 +100,16 @@ public class HumitureController {
Float maxTemperature = msdSettiings.getMaxTemperature(); Float maxTemperature = msdSettiings.getMaxTemperature();
Float maxHumidity = msdSettiings.getMaxHumidity(); Float maxHumidity = msdSettiings.getMaxHumidity();
List<String> cids = criteria.getCids(); List<String> cids = criteria.getCids();
String storageId = criteria.getStorageId();
if (StringUtils.isNotBlank(storageId)){
Storage storage = dataCache.getStorageById(storageId);
if (cids == null || cids.isEmpty()){
cids = new ArrayList<>();
}
cids.add(storage.getCid());
}
if (cids == null || cids.isEmpty()) { if (cids == null || cids.isEmpty()) {
criteria.setCids(SecurityUtils.getUserGroupCid()); criteria.setCids(SecurityUtils.getUserGroupCid());
} }
...@@ -118,8 +138,8 @@ public class HumitureController { ...@@ -118,8 +138,8 @@ public class HumitureController {
Locale locale = request.getLocale(); Locale locale = request.getLocale();
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.cid", locale, "CID"))); header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.cid", locale, "CID")));
if (isSpStorage) { if (isSpStorage) {
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.ntemperature", locale, "回温区温度"))); header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.ntemperature", locale, "冷藏温度")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.codetemperature", locale, "冷藏区温度"))); header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.codetemperature", locale, "制冷温度")));
}else{ }else{
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.temperature", locale, "温度"))); header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.temperature", locale, "温度")));
} }
......
...@@ -25,4 +25,7 @@ public class HumitureQueryCriteria { ...@@ -25,4 +25,7 @@ public class HumitureQueryCriteria {
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "createDate") @QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "createDate")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private BetweenData<Date> createDate; private BetweenData<Date> createDate;
private String storageId;
} }
...@@ -206,7 +206,7 @@ public class InListController { ...@@ -206,7 +206,7 @@ public class InListController {
for (String cid : cidList) { for (String cid : cidList) {
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if (storage != null) { if (storage != null) {
if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
storage.setInListName(inListName); storage.setInListName(inListName);
log.info("设置组[" + groupId + "]料架[" + storage.getName() + "]的入库单为:[" + inListName + "]"); log.info("设置组[" + groupId + "]料架[" + storage.getName() + "]的入库单为:[" + inListName + "]");
storageManager.save(storage); storageManager.save(storage);
...@@ -218,7 +218,7 @@ public class InListController { ...@@ -218,7 +218,7 @@ public class InListController {
} else { } else {
Storage storage = dataCache.getStorageById(storageId); Storage storage = dataCache.getStorageById(storageId);
if (storage != null) { if (storage != null) {
if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
storage.setInListName(inListName); storage.setInListName(inListName);
log.info("设置料架[" + storage.getName() + "]的入库单为:[" + inListName + "]"); log.info("设置料架[" + storage.getName() + "]的入库单为:[" + inListName + "]");
storageManager.save(storage); storageManager.save(storage);
......
...@@ -31,15 +31,19 @@ public enum ORDER_COLOR { ...@@ -31,15 +31,19 @@ public enum ORDER_COLOR {
// 'magenta':[17,125,125,0] // 'magenta':[17,125,125,0]
BLUE("0000FF"), BLUE("0000FF"),
//MAGENTA("FF00FF"), //MAGENTA("FF00FF"),
CYAN("00FFFF"), //CYAN("00FFFF"),
FIREBRICK("B22222"), FIREBRICK("B22222"),
PURPLE("A020F0"), PURPLE("A020F0"),
SKYBLUE("6CA6CD"), //SKYBLUE("6CA6CD"),
PINK("FF1493"), //PINK("FF1493"),
FORESTGREEN("228B22"), //FORESTGREEN("228B22"),
LIGHTBLUE("8470FF"), //LIGHTBLUE("8470FF"),
INDIANRED("8B3A3A"), //INDIANRED("8B3A3A"),
DARKGREEN("556B2F"), DARKGREEN("556B2F"),
RED("FF0000"),
YELLOW("FFFF00"),
ORANGE("FFA500"),
WHITE("FFFFFF")
; ;
private static int currentColorIndex = -1; private static int currentColorIndex = -1;
......
...@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUnit; ...@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.neotel.smfcore.common.bean.BetweenData; import com.neotel.smfcore.common.bean.BetweenData;
import com.neotel.smfcore.common.utils.QueryHelp; import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.inout.service.manager.IInOutDataManager; import com.neotel.smfcore.core.inout.service.manager.IInOutDataManager;
import com.neotel.smfcore.core.inout.service.po.InOutData; import com.neotel.smfcore.core.inout.service.po.InOutData;
...@@ -19,7 +18,7 @@ import com.neotel.smfcore.core.report.rest.query.ReportQuery; ...@@ -19,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.bean.UsageItem;
import com.neotel.smfcore.core.storage.service.manager.IStorageManager; import com.neotel.smfcore.core.storage.service.manager.IStorageManager;
import com.neotel.smfcore.core.storage.service.po.Storage; import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.elecKanban.bean.dto.InOutDataDto; import com.neotel.smfcore.core.dashboard.bean.dto.first.InOutDataDto;
import com.neotel.smfcore.security.annotation.AnonymousAccess; import com.neotel.smfcore.security.annotation.AnonymousAccess;
import com.neotel.smfcore.security.service.manager.IGroupManager; import com.neotel.smfcore.security.service.manager.IGroupManager;
import com.neotel.smfcore.security.service.manager.IUserManager; import com.neotel.smfcore.security.service.manager.IUserManager;
......
...@@ -127,8 +127,17 @@ public enum DeviceType { ...@@ -127,8 +127,17 @@ public enum DeviceType {
/** /**
* 20 第三方料仓 麦康尼虚拟料仓 * 20 第三方料仓 麦康尼虚拟料仓
*/ */
SMDBOX_THIRD("storage.type.SMDBOX_THIRD"); SMDBOX_THIRD("storage.type.SMDBOX_THIRD"),
;
/**
* 21 标签料架 NLL
*/
NLL("storage.type.nll"),
/**
* 22 钢网料架 NLS
*/
NLS("storage.type.nls");
private String key; private String key;
...@@ -149,6 +158,6 @@ public enum DeviceType { ...@@ -149,6 +158,6 @@ public enum DeviceType {
} }
public static List<DeviceType> availableTypeList(){ public static List<DeviceType> availableTypeList(){
return Lists.newArrayList(AUTO,LINE,BATCH,SOLDERPASTE,VERTICALBOX,SMD_XL,SMD_DUO,SMD_XLC,SMD_XLR,VIRTUAL,NL,NLP,NLM,SMDBOX_THIRD); return Lists.newArrayList(AUTO,LINE,BATCH,SOLDERPASTE,VERTICALBOX,SMD_XL,SMD_DUO,SMD_XLC,SMD_XLR,VIRTUAL,NL,NLP,NLM,NLL,NLS,SMDBOX_THIRD);
} }
} }
...@@ -187,7 +187,7 @@ public class StorageController { ...@@ -187,7 +187,7 @@ public class StorageController {
@ApiOperation("料架设置界面,返回所有的料架列表") @ApiOperation("料架设置界面,返回所有的料架列表")
@GetMapping(value = "/allShelf") @GetMapping(value = "/allShelf")
public List<StorageDto> allShelf() { public List<StorageDto> allShelf() {
Query query=new Query(Criteria.where("type").in(new String[]{DeviceType.NLP.name(),DeviceType.NL.name() })); Query query=new Query(Criteria.where("type").in(new String[]{DeviceType.NLP.name(),DeviceType.NL.name(),DeviceType.NLS.name() }));
List<Storage> storages=storageManager.findByQuery(query); List<Storage> storages=storageManager.findByQuery(query);
List<StorageDto> storageDtos= new ArrayList<>(); List<StorageDto> storageDtos= new ArrayList<>();
for (Storage storage : for (Storage storage :
...@@ -474,7 +474,7 @@ public class StorageController { ...@@ -474,7 +474,7 @@ public class StorageController {
int priIndex = csvRead.getCsvIndex("优先级","pri"); int priIndex = csvRead.getCsvIndex("优先级","pri");
int hIndex = csvRead.getCsvIndex("高度","h"); int hIndex = csvRead.getCsvIndex("高度","h");
int wIndex = csvRead.getCsvIndex("宽度","w"); int wIndex = csvRead.getCsvIndex("宽度","w");
int warmPosIndex = csvRead.getHasCsvIndex("回温库位","warmPos"); int warmPosIndex = csvRead.getHasCsvIndex("回温库位","warmPos");//true表示回温区库位,
int areaIndex = csvRead.getHasCsvIndex("区域","area"); int areaIndex = csvRead.getHasCsvIndex("区域","area");
...@@ -525,7 +525,6 @@ public class StorageController { ...@@ -525,7 +525,6 @@ public class StorageController {
newList.add(posInfo); newList.add(posInfo);
}else{ }else{
boolean needUpdate=posInfo.updatePosInfo(storageId,posName,height,width,priority); boolean needUpdate=posInfo.updatePosInfo(storageId,posName,height,width,priority);
posInfo.setWarmPos(isWarmPos);
if(posInfo.isWarmPos()){ if(posInfo.isWarmPos()){
if(!isWarmPos){ if(!isWarmPos){
needUpdate = true; needUpdate = true;
...@@ -535,6 +534,7 @@ public class StorageController { ...@@ -535,6 +534,7 @@ public class StorageController {
needUpdate = true; needUpdate = true;
} }
} }
posInfo.setWarmPos(isWarmPos);
if(!posInfo.getLabelName().equals(labelName)){ if(!posInfo.getLabelName().equals(labelName)){
posInfo.setLabelName(labelName); posInfo.setLabelName(labelName);
needUpdate=true; needUpdate=true;
......
...@@ -367,6 +367,12 @@ public class StoragePosController { ...@@ -367,6 +367,12 @@ public class StoragePosController {
Query query=getPosFindCriteria(criteria); Query query=getPosFindCriteria(criteria);
PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable); PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable);
List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent()); List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent());
for (StoragePosDto storagePosDto : StoragePosDtos) {
Storage storage = dataCache.getStorageById(storagePosDto.getStorageId());
if (storage != null){
storagePosDto.setStorageName(storage.getName());
}
}
// for (StoragePosDto storagePosDto : StoragePosDtos) { // for (StoragePosDto storagePosDto : StoragePosDtos) {
// BarcodeDto barcode = storagePosDto.getBarcode(); // BarcodeDto barcode = storagePosDto.getBarcode();
// List<BarcodeDto> subCodes = Lists.newArrayList(barcode); // List<BarcodeDto> subCodes = Lists.newArrayList(barcode);
......
...@@ -89,4 +89,8 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> { ...@@ -89,4 +89,8 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
List<StoragePos> findExistPosList(String id, List<String> list); List<StoragePos> findExistPosList(String id, List<String> list);
StoragePos getAndCreatePos(String storageId,String posName); StoragePos getAndCreatePos(String storageId,String posName);
StoragePos findByStorageName(String code);
StoragePos findOne(Query query);
} }
...@@ -831,4 +831,14 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -831,4 +831,14 @@ public class StoragePosManagerImpl implements IStoragePosManager {
} }
return storagePos; return storagePos;
} }
@Override
public StoragePos findByStorageName(String posName) {
return storagePosDao.findOne(new Query(Criteria.where("posName").is(posName)));
}
@Override
public StoragePos findOne(Query query) {
return storagePosDao.findOne(query);
}
} }
...@@ -134,7 +134,7 @@ public class Storage extends BasePo implements Serializable { ...@@ -134,7 +134,7 @@ public class Storage extends BasePo implements Serializable {
* 是否是普通料架 * 是否是普通料架
*/ */
public boolean isNLShelf() { public boolean isNLShelf() {
return DeviceType.NL.name().equals(type); return DeviceType.NL.name().equals(type)||DeviceType.NLS.name().equals(type);
} }
/** /**
* 是否是感应料架 * 是否是感应料架
......
...@@ -140,7 +140,7 @@ public class SettingsController { ...@@ -140,7 +140,7 @@ public class SettingsController {
List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values()); List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values());
for (Storage storage : storages for (Storage storage : storages
) { ) {
if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
orderSetting.setShowLightType(true); orderSetting.setShowLightType(true);
break; break;
} }
......
...@@ -85,9 +85,9 @@ public class TaskController { ...@@ -85,9 +85,9 @@ public class TaskController {
criteria.setStatus(null); criteria.setStatus(null);
finished=true; finished=true;
} }
if (StringUtils.isBlank(criteria.getStorageId())){ /*if (StringUtils.isBlank(criteria.getStorageId())){
criteria.setStorageIdList(SecurityUtils.getUserGroupStorageId()); criteria.setStorageIdList(SecurityUtils.getUserGroupStorageId());
} }*/
Query query = QueryHelp.getQuery(criteria); Query query = QueryHelp.getQuery(criteria);
if (unEnd) { if (unEnd) {
query.addCriteria(Criteria.where("status").nin(OP_STATUS.END.name(), OP_STATUS.FINISHED.name())); query.addCriteria(Criteria.where("status").nin(OP_STATUS.END.name(), OP_STATUS.FINISHED.name()));
...@@ -111,6 +111,7 @@ public class TaskController { ...@@ -111,6 +111,7 @@ public class TaskController {
@ApiOperation("导出查找出入库日志") @ApiOperation("导出查找出入库日志")
@GetMapping(value = "/history/download") @GetMapping(value = "/history/download")
@PreAuthorize("@el.check('taskLog')") @PreAuthorize("@el.check('taskLog')")
@AnonymousAccess
public void download(HttpServletResponse response, TaskQueryCondition criteria, Pageable pageable, HttpServletRequest request) throws IOException { public void download(HttpServletResponse response, TaskQueryCondition criteria, Pageable pageable, HttpServletRequest request) throws IOException {
Query query = getQuery(criteria); Query query = getQuery(criteria);
Locale locale = request.getLocale(); Locale locale = request.getLocale();
......
...@@ -6,6 +6,7 @@ import com.neotel.smfcore.core.message.util.DeviceMessageUtil; ...@@ -6,6 +6,7 @@ import com.neotel.smfcore.core.message.util.DeviceMessageUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -37,6 +38,13 @@ public class EquipStatusUtil { ...@@ -37,6 +38,13 @@ public class EquipStatusUtil {
statusMap.put(statusBean.getCid(), statusBean); statusMap.put(statusBean.getCid(), statusBean);
} }
/**
* 获取所有的设备信息
* @return
*/
public static Collection<EquipStatusBean> getAllStatusBean(){
return statusMap.values();
}
public static void runTimer() { public static void runTimer() {
try { try {
......
package com.neotel.smfcore.custom.exhibition;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.common.exception.ApiException;
import com.neotel.smfcore.common.utils.HttpHelper;
import com.neotel.smfcore.core.api.listener.BaseSmfApiListener;
import com.neotel.smfcore.core.system.service.po.DataLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Service
public class ElectronicExhibitionApi extends BaseSmfApiListener {
@Override
public boolean isForThisApi(String apiName) {
return "electronicExhibition".equals(apiName);
}
@Override
public void inTaskStatusChange(String inNotifyUrl, DataLog task) {
if (task.isFinished() || task.isEnd()) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("funcname", "Indepot");
paramMap.put("depotno", "YLC");
Map<String, Object> tableMap = new HashMap<>();
tableMap.put("id", task.getBarcode());
tableMap.put("compno", task.getPartNumber());
tableMap.put("num", task.getNum());
paramMap.put("Table", Arrays.asList(tableMap));
log.info(task.getBarcode() + "入库通知,参数为:" + JSON.toJSONString(paramMap));
try {
String result = HttpHelper.postJson(inNotifyUrl, paramMap);
log.info(task.getBarcode() + "入库通知,结果为:" + result);
} catch (ApiException e) {
log.error(task.getBarcode() + "入库通知,出错:" + e.getMessage());
e.printStackTrace();
}
}
}
@Override
public void outTaskStatusChange(String outNotifyUrl, DataLog task) {
if (task.isFinished() || task.isEnd()){
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("funcname", "Outdepot");
paramMap.put("depotno", "YLC");
Map<String, Object> tableMap = new HashMap<>();
tableMap.put("id", task.getBarcode());
tableMap.put("compno", task.getPartNumber());
tableMap.put("num", task.getNum());
paramMap.put("Table", Arrays.asList(tableMap));
log.info(task.getBarcode() + "出库通知,参数为:" + JSON.toJSONString(paramMap));
try {
String result = HttpHelper.postJson(outNotifyUrl, paramMap);
log.info(task.getBarcode() + "出库通知,结果为:" + result);
} catch (ApiException e) {
log.error(task.getBarcode() + "出库通知,出错:" + e.getMessage());
e.printStackTrace();
}
}
}
}
package com.neotel.smfcore.custom.exhibition.bean;
import lombok.Data;
@Data
public class OrderTable {
private String rowno;
private String compno;
private String num;
}
package com.neotel.smfcore.custom.exhibition.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel("OutDepotOrder")
public class OutDepotOrder {
@ApiModelProperty("方法名")
private String funcname;
@ApiModelProperty("工单号")
private String orderno;
@ApiModelProperty("仓库号")
private String depotno;
@ApiModelProperty("工单明细集合")
List<OrderTable> Table;
}
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;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
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("电子展")
@Slf4j
@RestController
@RequestMapping("/electronicExhibition")
public class ElectronicExhibitionController {
@Autowired
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) {
log.info("收到云仓下架指示,数据为:"+ JSON.toJSONString(depotOrder));
List<OrderTable> tableList = depotOrder.getTable();
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();
compno = compno.toUpperCase();
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() + "未找到要出库的物料");
}
}
}
return ResultBean.newOkResult("");
}
}
package com.neotel.smfcore.custom.iriichi1081; package com.neotel.smfcore.custom.iriichi1081;
import cn.hutool.core.net.URLDecoder;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -19,6 +20,9 @@ import org.apache.poi.ss.usermodel.IgnoredErrorType; ...@@ -19,6 +20,9 @@ import org.apache.poi.ss.usermodel.IgnoredErrorType;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -64,6 +68,7 @@ public class IriichiApi extends BaseSmfApiListener { ...@@ -64,6 +68,7 @@ public class IriichiApi extends BaseSmfApiListener {
"&readonly=true" + "&readonly=true" +
"&loadtype=NEXT" + "&loadtype=NEXT" +
"&customloadmethodparms=" + orderNumber, headerMap, null); "&customloadmethodparms=" + orderNumber, headerMap, null);
log.info(orderNumber+"fetchOrder结果为:"+result);
return getOrderByResult(orderNumber, result); return getOrderByResult(orderNumber, result);
} catch (ApiException e) { } catch (ApiException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -98,11 +103,13 @@ public class IriichiApi extends BaseSmfApiListener { ...@@ -98,11 +103,13 @@ public class IriichiApi extends BaseSmfApiListener {
+ "NULL" + "NULL"
+ "," + ","
+ "NULL"; + "NULL";
log.info(barcode.getBarcode() + "cycleCount入参为:" + parms); log.info(barcode.getBarcode() + ":cycleCount入参为:" + parms);
try { try {
parms = URLEncoder.encode(parms, StandardCharsets.UTF_8.name());
String result = HttpHelper.getJson(IriichiConfig.cycleCount_url + "?parms=" + parms, headerMap, null); String result = HttpHelper.getJson(IriichiConfig.cycleCount_url + "?parms=" + parms, headerMap, null);
} catch (ApiException e) { log.info("cycleCount出参为:" + result);
} catch (ApiException | UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
...@@ -136,7 +143,7 @@ public class IriichiApi extends BaseSmfApiListener { ...@@ -136,7 +143,7 @@ public class IriichiApi extends BaseSmfApiListener {
orderItem.setPn(map.get("Value")); orderItem.setPn(map.get("Value"));
} else if ("qty_to_pick".equals(map.get("Name"))) { } else if ("qty_to_pick".equals(map.get("Name"))) {
try { try {
orderItem.setNeedReelCount(NumberUtil.parseInt(map.get("Value"))); orderItem.setNeedNum(NumberUtil.parseInt(map.get("Value")));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -146,6 +153,7 @@ public class IriichiApi extends BaseSmfApiListener { ...@@ -146,6 +153,7 @@ public class IriichiApi extends BaseSmfApiListener {
} }
if (itemList != null && !itemList.isEmpty()) { if (itemList != null && !itemList.isEmpty()) {
LiteOrder order = new LiteOrder(); LiteOrder order = new LiteOrder();
order.setOrderNo(orderNo);
order.setOrderItems(itemList); order.setOrderItems(itemList);
liteOrderManager.createWithItems(order); liteOrderManager.createWithItems(order);
liteOrderCache.addOrderToMap(order); liteOrderCache.addOrderToMap(order);
......
...@@ -7,13 +7,13 @@ public class IriichiConfig { ...@@ -7,13 +7,13 @@ public class IriichiConfig {
public static final String iriichi_crp_config_name = "Neotel@478*"; public static final String iriichi_crp_config_name = "Neotel@478*";
// token url // token url
public static final String token_url = "http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/token/IRIICHI_CRP"; public static final String token_url = "http://192.168.60.249/IDORequestService/MGRestService.svc/json/token/IRIICHI_CRP";
// Job Material Picklist url 在配置文件中,配置fetchOrderUrl 地址 // Job Material Picklist url 在配置文件中,配置fetchOrderUrl 地址
//public static final String picklist_url = "http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/IR_SLAPIs/pick_list,job,job_suffix,job_item,job_item_desc,item_code,Rating,workcenter,vendnum,vendor_name,qty_to_pick/adv"; //public static final String picklist_url = "http://192.168.60.249/IDORequestService/MGRestService.svc/json/IR_SLAPIs/pick_list,job,job_suffix,job_item,job_item_desc,item_code,Rating,workcenter,vendnum,vendor_name,qty_to_pick/adv";
//Cycle Count url //Cycle Count url
public static final String cycleCount_url = "http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/method/IR_SLAPIs/IR_InsertCycleCountSp"; public static final String cycleCount_url = "http://192.168.60.249/IDORequestService/MGRestService.svc/json/method/IR_SLAPIs/IR_InsertCycleCountSp";
// userId // userId
public static final String userId = "app_neotel"; public static final String userId = "app_neotel";
......
package com.neotel.smfcore.custom.nexim;
import com.neotel.smfcore.common.utils.FileUtil;
import com.neotel.smfcore.common.utils.SmbUtil;
import com.neotel.smfcore.core.api.listener.BaseSmfApiListener;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.nexim.bean.Notify;
import com.neotel.smfcore.custom.nexim.enums.Action;
import com.neotel.smfcore.custom.nexim.enums.NexObject;
import com.neotel.smfcore.custom.nexim.util.NotifyUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.io.File;
@Service
@Slf4j
public class NeximApi extends BaseSmfApiListener {
private final String remoteFilePath = "smb://192.168.1.243/Test/";
@Override
public boolean isForThisApi(String apiName) {
return apiName != null && apiName.equalsIgnoreCase("nexim");
}
@Override
public void inTaskStatusChange(String inNotifyUrl, DataLog task) {
if (task.isFinished()) {
Notify notify = NotifyUtil.getNotifyByTask(Action.LOAD.name(), NexObject.CARRIER.name(), task);
//创建本地文件
String localFilePath = NotifyUtil.getLocalFilePathByNotify(notify);
boolean put = SmbUtil.smbPut(remoteFilePath, localFilePath);
log.info(localFilePath + "入库通知结果为:" + put);
FileUtil.del(new File(localFilePath));
}
}
@Override
public void outTaskStatusChange(String outNotifyUrl, DataLog task) {
if (task.isFinished()) {
Notify notify = NotifyUtil.getNotifyByTask(Action.PROVIDE.name(), NexObject.CARRIER.name(), task);
//创建本地文件
String localFilePath = NotifyUtil.getLocalFilePathByNotify(notify);
boolean put = SmbUtil.smbPut(remoteFilePath, localFilePath);
log.info(localFilePath + "出库通知结果为:" + put);
FileUtil.del(new File(localFilePath));
}
}
}
package com.neotel.smfcore.custom.nexim.bean;
import lombok.Data;
import java.io.Serializable;
@Data
public class Notify implements Serializable {
/**
* action NEW = Object (item or carrier) creation
* DELETE = Object (item or carrier) deletion
* LOAD = Carrier check in
* PROVIDE = Carrier check out
*/
private String action;
/**
* object ARTICLE or CARRIER
*/
private String object;
/**
* objectname Item or carrier name(DID)
*/
private String name;
/**
* Date of Action、yyyymmdd format
*/
private String date;
/**
* Action Time
*/
private String time;
/**
* Job name
*/
private String jobName;
/**
* storage location (Only if object=CARRIER)
*/
private String depot;
/**
* Item designation (Only if object=CARRIER)
*/
private String demand;
/**
* Current carrier's parts inventory or total inventory of the item
*/
private int stock;
}
\ No newline at end of file \ No newline at end of file
package com.neotel.smfcore.custom.nexim.bean;
import lombok.Data;
@Data
public class OrderReq {
private String action;
private String object;
private String name;
private String date;
private String time;
private String depot;
private String stock;
private String expiry;
private String mSL;
private String mSLWATCH;
private String stockMin;
private String stockMax;
private String reelsMin;
private String reelsMax;
private String height;
private String diameter;
private String supply;
private String stockNew;
private String article;
private String units;
private String target;
private String forceTower;
private String demand;
private String los;
}
package com.neotel.smfcore.custom.nexim.bean;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class OrderResp extends OrderReq {
private String answer = "TRUE";
private int error;
private String carrier;
private String values;
private List<String> carrierNameList;
public void setCarrierNameList(String carrierName) {
if (carrierNameList == null || carrierNameList.isEmpty()){
carrierNameList = new ArrayList<>();
}
this.carrierNameList.add(carrierName);
}
}
package com.neotel.smfcore.custom.nexim.enums;
/**
* Action 类型
*/
public enum Action {
/**
* Object (item or carrier) creation
*/
NEW,
/**
* Object (item or carrier) deletion
*/
DELETE,
/**
* Carrier check in
*/
LOAD,
/**
* Carrier check out
*/
PROVIDE,
/**
* 修改
*/
UPDATE,
/**
* 读取
*/
READ
}
package com.neotel.smfcore.custom.nexim.enums;
public class ErrorCode {
public static final int ok = 0;
public static final int lockingError = 1;
public static final int unknownAction = 9;
}
package com.neotel.smfcore.custom.nexim.enums;
public enum NexObject {
/**
* 料号
*/
ARTICLE,
/**
* 唯一码
*/
CARRIER,
/**
* 工单
*/
JOBLIST
}
package com.neotel.smfcore.custom.nexim.enums;
public class OrderType {
public static final String order = "[Order]";
public static final String result = "[Result]";
public static final String data = "[Data]";
}
package com.neotel.smfcore.custom.nexim.order;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.common.utils.*;
import com.neotel.smfcore.core.api.SmfApi;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
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.nexim.bean.OrderReq;
import com.neotel.smfcore.custom.nexim.bean.OrderResp;
import com.neotel.smfcore.custom.nexim.enums.Action;
import com.neotel.smfcore.custom.nexim.enums.ErrorCode;
import com.neotel.smfcore.custom.nexim.enums.NexObject;
import com.neotel.smfcore.custom.nexim.enums.OrderType;
import com.neotel.smfcore.custom.nexim.util.OrderUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import jcifs.smb.SmbFile;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.PostConstruct;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Slf4j
@Component
public class OrderHandler {
private static IStoragePosManager storagePosManager;
@Autowired
public void setStoragePosManager(IStoragePosManager manager) {
storagePosManager = manager;
}
private static IBarcodeManager barcodeManager;
@Autowired
public void setBarcodeManager(IBarcodeManager manager) {
barcodeManager = manager;
}
private static DataCache dataCache;
@Autowired
public void setDataCache(DataCache cache) {
dataCache = cache;
}
private static TaskService taskService;
@Autowired
public void setTaskService(TaskService service) {
taskService = service;
}
private static ILiteOrderManager liteOrderManager;
@Autowired
public void setLiteOrderManager(ILiteOrderManager manager) {
liteOrderManager = manager;
}
private static LiteOrderCache liteOrderCache;
@Autowired
public void setLiteOrderCache(LiteOrderCache cache) {
liteOrderCache = cache;
}
private static OrderCheckOutService checkOutService;
@Autowired
public void setOrderCheckOutService(OrderCheckOutService service) {
checkOutService = service;
}
public static SmfApi smfApi;
@Autowired
public void setSmfApi(SmfApi api) {
smfApi = api;
}
ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
@PostConstruct
public void init() {
scheduledThreadPool.scheduleAtFixedRate(() -> {
try {
if("nexim".equals(smfApi.getApiName())) {
handler();
}
} catch (IOException e) {
e.printStackTrace();
}
}, 10, 5, TimeUnit.SECONDS);
}
public static void handler() throws IOException {
String path = dataCache.getOrderSetting().getOrderDir();
File file = new File(path);
if (file.exists() && file.isDirectory()) {
File[] files = file.listFiles();
List<File> fileList = Arrays.stream(files).sorted(Comparator.comparing(File::lastModified).reversed()).collect(Collectors.toList());
File currentFile = fileList.get(0);
List<String> lineList = OrderUtil.getLines(currentFile.getAbsolutePath(), StandardCharsets.US_ASCII);
String orderName = "";
List<LiteOrderItem> orderItemList = new ArrayList<>();
for (String line : lineList) {
if (line.split("=").length < 2) {
continue;
}
String value = line.split("=")[1];
if (line.startsWith("Name")) {
orderName = value;
}
if (line.startsWith("Item")) {
String[] itemStr = value.split("\\|", -1);
LiteOrderItem item = new LiteOrderItem();
item.setPn(itemStr[0]);
item.setRi(itemStr[1]);
int needNum = 1;
try {
needNum = Integer.valueOf(itemStr[2]);
} catch (NumberFormatException e) {
e.printStackTrace();
}
item.setNeedNum(needNum);
int needReelCount = 1;
try {
needReelCount = Integer.valueOf(itemStr[3]);
} catch (NumberFormatException e) {
e.printStackTrace();
}
item.setNeedReelCount(needReelCount);
orderItemList.add(item);
}
}
LiteOrder liteOrder = liteOrderManager.findByOrderNo(orderName);
if (liteOrder != null) {
return;
}
LiteOrder order = new LiteOrder();
order.setOrderItems(orderItemList);
order.setOrderNo(orderName);
liteOrderManager.createWithItems(order);
liteOrderCache.addOrderToMap(order);
checkOutService.checkOutLiteOrder(orderName, false, false);
}
}
}
package com.neotel.smfcore.custom.nexim.util;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.nexim.bean.Notify;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Date;
@Slf4j
public class NotifyUtil {
public static final String CHARSET_NAME = "ASCII";
public static Notify getNotifyByTask(String action,String obj, DataLog task){
Notify notify = new Notify();
notify.setAction(action);
notify.setObject(obj);
notify.setName(task.getBarcode());
String dateStr = DateUtil.format(new Date(), "yyyyMMdd HH:mm:ss");
String[] date = dateStr.split(" ");
notify.setDate(date[0]);
notify.setTime(date[1]);
if (StringUtils.isNotBlank(task.getSourceId())){
notify.setJobName(task.getSourceName());
} else {
notify.setJobName("");
}
notify.setDepot(task.getStorageName());
notify.setDemand(task.getPosName());
notify.setStock(task.getNum());
return notify;
}
/**
* 出入库通知,获取本地路径
* @param notify
* @return
*/
public static String getLocalFilePathByNotify(Notify notify) {
String localFilePath = notify.getName() + ".ETN";
log.info("本地文件路径为:" + localFilePath);
log.info("内容为:" + JSON.toJSONString(notify));
File file = new File(localFilePath); //创建一个文件
OutputStreamWriter out = null;
try {
out = new OutputStreamWriter(new FileOutputStream(file), CHARSET_NAME); //打开文件输出流
out.write("Action=" + notify.getAction());
out.write('\r');
out.write("Object=" + notify.getObject());
out.write('\r');
out.write("Name=" + notify.getName());
out.write('\r');
out.write("Date=" + notify.getDate());
out.write('\r');
out.write("Time=" + notify.getTime());
out.write('\r');
out.write("JOBNAME=" + notify.getJobName());
out.write('\r');
out.write("Depot=" + notify.getDepot());
out.write('\r');
out.write("Demand=" + notify.getDemand());
out.write('\r');
out.write("Stock=" + notify.getStock());
} catch (IOException e) {
e.printStackTrace();
} finally { //内容总执行
if (out != null) {
try {
out.close(); //关闭输出文件流
} catch (IOException el) {
}
}
}
return localFilePath;
}
}
package com.neotel.smfcore.custom.nexim.util;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.common.utils.FileUtil;
import com.neotel.smfcore.common.utils.SmbUtil;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.custom.nexim.bean.Notify;
import com.neotel.smfcore.custom.nexim.bean.OrderReq;
import com.neotel.smfcore.custom.nexim.bean.OrderResp;
import com.neotel.smfcore.custom.nexim.enums.OrderType;
import jcifs.smb.SmbFile;
import lombok.extern.slf4j.Slf4j;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
public class OrderUtil {
//获取到远程最新的文件
public static SmbFile getLatestFile(String path) {
List<SmbFile> smbFileNameList = SmbUtil.smbFileList(path);
if (smbFileNameList != null && !smbFileNameList.isEmpty()) {
smbFileNameList = smbFileNameList.stream().sorted(Comparator.comparing(SmbFile::getDate).reversed()).collect(Collectors.toList());
return smbFileNameList.get(0);
}
return null;
}
/**
* 获取所有的line信息
* @param filePath
* @param cs
* @return
* @throws IOException
*/
public static List<String> getLines(String filePath, Charset cs) throws IOException {
Path path = Paths.get(filePath);
return Files.readAllLines(path, cs);
}
/**
* 获取本地路径
* @param localPath
* @param name
* @param lineList
* @param cs
* @return
*/
public static String getLocalFilePathByOrder(String localPath,String name,List<String> lineList,Charset cs) {
String localFilePath = "";
OutputStreamWriter out = null;
try {
localFilePath = localPath + name;
log.info("本地文件路径为:" + localFilePath);
File file = new File(localFilePath); //创建一个文件
File fileParent = file.getParentFile();
if (null != fileParent && !fileParent.exists()) {
fileParent.mkdirs();
}
out = new OutputStreamWriter(new FileOutputStream(file), cs); //打开文件输出流
for (int i = 0; i < lineList.size(); i++) {
String line = lineList.get(i);
out.write(line);
if ((i + 1) != lineList.size()) {
out.write('\r');
}
}
} catch (IOException e) {
localFilePath = "";
e.printStackTrace();
} finally { //内容总执行
if (out != null) {
try {
out.close(); //关闭输出文件流
} catch (IOException el) {
}
}
}
return localFilePath;
}
public static void uploadRemoteFilePath(List<String> lineList, String localRespFilePath, String writeRemoteFilePath, OrderResp resp) {
if (lineList != null && !lineList.isEmpty()) {
//开始写入本地文件
String localFilePath = OrderUtil.getLocalFilePathByOrder(localRespFilePath, resp.getName() + ".ANS", lineList, StandardCharsets.US_ASCII);
//同步到远程
if (StringUtils.isNotBlank(localFilePath)) {
SmbUtil.smbPut(writeRemoteFilePath, localFilePath);
//TODO 暂时不删除本地文件
//FileUtil.del(new File(localFilePath));
}
}
}
}
...@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.HttpHelper; import com.neotel.smfcore.common.utils.HttpHelper;
import com.neotel.smfcore.common.utils.JsonUtil; import com.neotel.smfcore.common.utils.JsonUtil;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.api.bean.CodeValidateParam; import com.neotel.smfcore.core.api.bean.CodeValidateParam;
import com.neotel.smfcore.core.api.listener.BaseSmfApiListener; import com.neotel.smfcore.core.api.listener.BaseSmfApiListener;
import com.neotel.smfcore.core.barcode.bean.CodeBean; import com.neotel.smfcore.core.barcode.bean.CodeBean;
...@@ -140,6 +141,8 @@ public class SiemensApi extends BaseSmfApiListener { ...@@ -140,6 +141,8 @@ public class SiemensApi extends BaseSmfApiListener {
if(storage != null){ if(storage != null){
cid = storage.getCid(); cid = storage.getCid();
} }
String resultMsg = "";
for (CodeBean codebean : codeBeans) { for (CodeBean codebean : codeBeans) {
if(codebean.getReelHeight() <=0){ if(codebean.getReelHeight() <=0){
codebean.setReelHeight(1); codebean.setReelHeight(1);
...@@ -187,9 +190,15 @@ public class SiemensApi extends BaseSmfApiListener { ...@@ -187,9 +190,15 @@ public class SiemensApi extends BaseSmfApiListener {
log.info("siemensCheckCode 修改 条码:[" + barcode.getBarcode() + "] pn为 ["+barcode.getPartNumber()+"] "); log.info("siemensCheckCode 修改 条码:[" + barcode.getBarcode() + "] pn为 ["+barcode.getPartNumber()+"] ");
} }
return barcode; return barcode;
} else {
if (StringUtils.isNotBlank(resultMsg)) {
resultMsg = resultMsg + "," + info.getMessage();
} else {
resultMsg = info.getMessage();
}
} }
} }
throw new ValidateException("siemens.barcode.failed","SIEMENS验证条码["+params.getCode()+"]失败"); throw new ValidateException("siemens.barcode.failed","SIEMENS验证条码["+params.getCode()+"]失败:"+resultMsg);
} catch (Exception ex) { } catch (Exception ex) {
log.info("siemensCheckCode 验证条码 [" + params.getCode() + "] 出错:"+ ex.getMessage()); log.info("siemensCheckCode 验证条码 [" + params.getCode() + "] 出错:"+ ex.getMessage());
throw new ValidateException("siemens.barcode.error", ex.getMessage()); throw new ValidateException("siemens.barcode.error", ex.getMessage());
......
...@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUtil; ...@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.neotel.smfcore.common.bean.BetweenData; import com.neotel.smfcore.common.bean.BetweenData;
import com.neotel.smfcore.common.bean.PageData; import com.neotel.smfcore.common.bean.PageData;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants; import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.common.utils.QueryHelp; import com.neotel.smfcore.common.utils.QueryHelp;
...@@ -14,8 +13,8 @@ import com.neotel.smfcore.common.utils.StringUtils; ...@@ -14,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.BoxStatusBean;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.elecKanban.bean.dto.ElecKanbanBoxStatusDto; import com.neotel.smfcore.core.dashboard.bean.dto.first.ElecKanbanBoxStatusDto;
import com.neotel.smfcore.core.elecKanban.bean.dto.InOutDataDto; 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.manager.IInOutDataManager;
import com.neotel.smfcore.core.inout.service.po.InOutData; import com.neotel.smfcore.core.inout.service.po.InOutData;
import com.neotel.smfcore.core.kanban.rest.bean.dto.BoxStatusDto; import com.neotel.smfcore.core.kanban.rest.bean.dto.BoxStatusDto;
...@@ -41,7 +40,6 @@ import io.swagger.annotations.ApiOperation; ...@@ -41,7 +40,6 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
......
...@@ -370,6 +370,13 @@ smfcore.storagePos.weight=\u91CD\u91CF ...@@ -370,6 +370,13 @@ smfcore.storagePos.weight=\u91CD\u91CF
smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F
smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25 smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93 smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6
smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u6267\u884C
\ No newline at end of file \ No newline at end of file
smfcore.humiture.codetemperature=\u5236\u51B7\u6E29\u5EA6
smfcore.humiture.ntemperature=\u51B7\u85CF\u6E29\u5EA6
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u6267\u884C
smfcore.eleckanban=\u7535\u5B50\u770B\u677F
smfcore.agv.already.call=\u5DF2\u7ECF\u547C\u53EB
smfcore.agv.pickup=AGV\u5DF2\u88AB\u53EB\u6765\u53D6\u8D27
smfcore.agv.dispatch=\u8D27\u7269\u5DF2\u7ECF\u53D1\u9001\u5230\u5B58\u50A8\u7CFB\u7EDF
smfcore.agv.awaitingInstruction=\u7B49\u5F85\u6307\u793A
smfcore.agv.operation=AGV\u5728\u8FD0\u884C\u4E2D
smfcore.boxmimokanban=\u4E91\u6599\u4ED3\u770B\u677F
\ No newline at end of file \ No newline at end of file
...@@ -63,8 +63,9 @@ smfcore.lockMaterial=EPM ...@@ -63,8 +63,9 @@ smfcore.lockMaterial=EPM
smfcore.lightGroup=Neo Light Grouping smfcore.lightGroup=Neo Light Grouping
smfcore.order=Material Management smfcore.order=Material Management
smfcore.workOrder=Work Order smfcore.workOrder=Work Order
smfcore.workOrderkanban=WO KANBAN
smfcore.searchOut=Search smfcore.searchOut=Search
smfcore.singleOuput=UID Search smfcore.singleOuput=UID
smfcore.system=System smfcore.system=System
smfcore.bunker=Equipment smfcore.bunker=Equipment
smfcore.storagePos=Storage Location smfcore.storagePos=Storage Location
...@@ -91,7 +92,7 @@ smfcore.sysSetting=System Setting ...@@ -91,7 +92,7 @@ smfcore.sysSetting=System Setting
smfcore.help=Help smfcore.help=Help
smfcore.instruction=Instruction manual smfcore.instruction=Instruction manual
smfcore.about=About smfcore.about=About
smfcore.tacticsOuput=PN Search smfcore.tacticsOuput=Part Number
smfcore.labelOuput=Grouping smfcore.labelOuput=Grouping
smfcore.order.out.executing=Work orders are being executed smfcore.order.out.executing=Work orders are being executed
smfcore.order.out.notFound=Work order not found smfcore.order.out.notFound=Work order not found
...@@ -233,7 +234,7 @@ smfcore.shelfSetting=Rack set ...@@ -233,7 +234,7 @@ smfcore.shelfSetting=Rack set
smfcore.noAccess =No permission smfcore.noAccess =No permission
smfcore.toDebugModel.ok=Already in debug mode smfcore.toDebugModel.ok=Already in debug mode
smfcore.exitDebugModel.ok=Exited debug mode smfcore.exitDebugModel.ok=Exited debug mode
smfcore.pwd.error=Password error smfcore.pwd.error=Incorrect Password
smfcore.messages.enabledPos=Enable Location\uFF1A{0} smfcore.messages.enabledPos=Enable Location\uFF1A{0}
smfcore.messages.disabledPos=Disable Location\uFF1A{0} smfcore.messages.disabledPos=Disable Location\uFF1A{0}
smfcore.shelf.nlm.notFound=No mobile shelf found{0} smfcore.shelf.nlm.notFound=No mobile shelf found{0}
...@@ -361,4 +362,12 @@ smfcore.spbox.backFail=Back to the library verification failure ...@@ -361,4 +362,12 @@ smfcore.spbox.backFail=Back to the library verification failure
smfcore.spbox.expireOut=Expired solder paste out of storage smfcore.spbox.expireOut=Expired solder paste out of storage
smfcore.humiture.codetemperature=Refrigeration zone temperature smfcore.humiture.codetemperature=Refrigeration zone temperature
smfcore.humiture.ntemperature=Return temperature zone temperature smfcore.humiture.ntemperature=Return temperature zone temperature
smfcore.cyclecount.executing=Cycle Count are being executed
\ No newline at end of file \ No newline at end of file
smfcore.cyclecount.executing=Cycle Count are being executed
smfcore.eleckanban=DashBoard
smfcore.agv.already.call=Already called
smfcore.agv.pickup=AGV has been called to pick up goods
smfcore.agv.dispatch=Goods dispatched to storage system
smfcore.agv.awaitingInstruction=Awaiting instruction
smfcore.agv.operation=AGV is in operation
smfcore.boxmimokanban=SMD BOX KANBAN
\ No newline at end of file \ No newline at end of file
...@@ -358,4 +358,12 @@ smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25 ...@@ -358,4 +358,12 @@ smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93 smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6 smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6
smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6 smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6
smfcore.cyclecount.executing=Cycle Count \u5B9F\u884C
\ No newline at end of file \ No newline at end of file
smfcore.cyclecount.executing=Cycle Count \u5B9F\u884C
smfcore.agv.already.call=\u65E2\u306B\u547C\u3093\u3060
smfcore.agv.pickup=AGV\u304C\u5546\u54C1\u3092\u53D7\u3051\u53D6\u308B\u305F\u3081\u306B\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F
smfcore.agv.dispatch=\u4FDD\u7BA1\u30B7\u30B9\u30C6\u30E0\u306B\u767A\u9001\u3055\u308C\u308B\u5546\u54C1
smfcore.agv.awaitingInstruction=\u6307\u793A\u5F85\u3061
smfcore.agv.operation=AGV\u52D5\u4F5C\u4E2D\u3067\u3059
smfcore.boxmimokanban=\u30AF\u30E9\u30A6\u30C9\u5009\u5EAB\u30AB\u30F3\u30D0\u30F3
\ No newline at end of file \ No newline at end of file
...@@ -61,6 +61,7 @@ smfcore.loadMaterialFinished=\u8BBE\u5907\u52A0\u8F7D\u5B8C\u6210: {0} ...@@ -61,6 +61,7 @@ smfcore.loadMaterialFinished=\u8BBE\u5907\u52A0\u8F7D\u5B8C\u6210: {0}
smfcore.lockMaterial=\u8BBE\u5907\u770B\u677F smfcore.lockMaterial=\u8BBE\u5907\u770B\u677F
smfcore.lightGroup=\u6599\u67B6\u5206\u7EC4 smfcore.lightGroup=\u6599\u67B6\u5206\u7EC4
smfcore.order=\u7269\u6599\u7BA1\u7406 smfcore.order=\u7269\u6599\u7BA1\u7406
smfcore.workOrderkanban=\u5DE5\u5355
smfcore.workOrder=\u5DE5\u5355\u51FA\u5E93 smfcore.workOrder=\u5DE5\u5355\u51FA\u5E93
smfcore.searchOut=\u67E5\u627E\u51FA\u5E93 smfcore.searchOut=\u67E5\u627E\u51FA\u5E93
smfcore.singleOuput=UID\u51FA\u5E93 smfcore.singleOuput=UID\u51FA\u5E93
...@@ -358,4 +359,11 @@ smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25 ...@@ -358,4 +359,11 @@ smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93 smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6 smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6
smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6 smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u6267\u884C
\ No newline at end of file \ No newline at end of file
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u6267\u884C
smfcore.agv.already.call=\u5DF2\u7ECF\u547C\u53EB
smfcore.agv.pickup=AGV\u5DF2\u88AB\u53EB\u6765\u53D6\u8D27
smfcore.agv.dispatch=\u8D27\u7269\u5DF2\u7ECF\u53D1\u9001\u5230\u5B58\u50A8\u7CFB\u7EDF
smfcore.agv.awaitingInstruction=\u7B49\u5F85\u6307\u793A
smfcore.agv.operation=AGV\u5728\u8FD0\u884C\u4E2D
smfcore.boxmimokanban=\u4E91\u6599\u4ED3\u770B\u677F
\ No newline at end of file \ No newline at end of file
...@@ -359,4 +359,11 @@ smfcore.spbox.backFail=\u56DE\u5EAB\u9A57\u8B49\u5931\u6557 ...@@ -359,4 +359,11 @@ smfcore.spbox.backFail=\u56DE\u5EAB\u9A57\u8B49\u5931\u6557
smfcore.spbox.expireOut=\u904E\u671F\u7269\u6599\u51FA\u5EAB smfcore.spbox.expireOut=\u904E\u671F\u7269\u6599\u51FA\u5EAB
smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6 smfcore.humiture.codetemperature=\u51B7\u85CF\u533A\u6E29\u5EA6
smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6 smfcore.humiture.ntemperature=\u56DE\u6E29\u533A\u6E29\u5EA6
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u57F7\u884C
\ No newline at end of file \ No newline at end of file
smfcore.cyclecount.executing=Cycle Count \u6B63\u5728\u57F7\u884C
smfcore.agv.already.call=\u5DF2\u7D93\u547C\u7C72
smfcore.agv.pickup=AGV\u5DF2\u88AB\u53EB\u4F86\u53D6\u8CA8
smfcore.agv.dispatch=\u8CA8\u7269\u767C\u9001\u5230\u5B58\u5132\u7CFB\u7D71
smfcore.agv.awaitingInstruction=\u7B49\u5F85\u6307\u793A
smfcore.agv.operation=AGV\u6B63\u5728\u904B\u884C
smfcore.boxmimokanban=\u96F2\u6599\u5009\u770B\u677F
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!