Commit 9e01f250 孙克
2 个父辈 83a63add 1e024f20
正在显示 33 个修改的文件 包含 1041 行增加42 行删除
......@@ -113,9 +113,14 @@ public class MenuInit {
//AGV看板
//addDefaultFunctionMenu(1,null,"AGV看板","agvkanban", "agv/agvkanban/index","agv");
//Mimo临时看板
addDefaultFunctionMenu(0,null,"SMD BOX MIMO","SMDBOXMIMO", "smdBoxMimo/index","smdMimo");
//电子看板
addDefaultFunctionMenu(1,null,"电子看板","eleckanban", "eleckanban/index","kanban");
//设备看板
addDefaultFunctionMenu(1,null,"设备看板","lockMaterial", "lockMaterial/material/index","kanban",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(1,null,"电子看板","eleckanban", "elecKanban/index","kanban",DEFAULT_SHOW_MENU);
//设备互联
addDefaultFunctionMenu(2,null,"设备互联","equipmentView", "neolight/equipmentView/index","sKanban");
......@@ -182,6 +187,7 @@ public class MenuInit {
addDefaultFunctionMenu(71, pMenuReport, "出入库", "inOutDataCount", "neolight/inOutDataCount/index", "outPut");
addDefaultFunctionMenu(72, pMenuReport,"库存", "inventory", "neolight/inventory/index", "inventory");
addDefaultFunctionMenu(73, pMenuReport,"温湿度", "humiture", "humiture/humitureReport/index", "humiture");
addDefaultFunctionMenu(73, pMenuReport,"温湿度", "spHumiture", "humiture/spHumitureReport/index", "humiture");
//可观测性:物料追踪
Menu guanceMenu = Menu.CreatePMenu("可观测性", 8, "observability", "scanKey",null);
......@@ -217,6 +223,7 @@ public class MenuInit {
addDefaultFunctionMenu(99991, helpAbout, "说明书", "instruction", "system/instruction/index","aboutBook");
addDefaultFunctionMenu(99992, helpAbout, "关于","about", "system/about/index","message",DEFAULT_SHOW_MENU);
addDefaultFunctionMenu(123,null,"LNB残数","LNBResidue", "neolight/lnbResidue/index","kanban");
return allMenuMap;
}
......
......@@ -358,6 +358,46 @@ public class HttpHelper {
}
}
public static String getJson(String url,Map<String,String> headerMap ,Object params) throws ApiException {
// 设置请求参数
if (params != null) {
try {
ObjectMapper mapper = new ObjectMapper();
String requestBody = mapper.writeValueAsString(params);
List<NameValuePair> nameValuePairs = new LinkedList<>();
nameValuePairs.add(new BasicNameValuePair("JSON", requestBody));
String paramStr = EntityUtils.toString(new UrlEncodedFormEntity(nameValuePairs));
url = appendString(url, paramStr);
// url=url+"?JSON="+requestBody;
} catch (Exception e) {
throw new ApiException("getJson append params to [" + url + "] exception:" + e.getMessage());
}
}
try {
HttpGet httpGet = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).build();
httpGet.setConfig(requestConfig);
if (headerMap != null && !headerMap.isEmpty()) {
for (Entry<String, String> entry : headerMap.entrySet()) {
httpGet.addHeader(entry.getKey(), entry.getValue());
}
}
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
response.close();
httpClient.close();
return responseContent;
} catch (Exception e) {
throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
}
}
private static String appendString(String url, String paramStr) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(url);
......
......@@ -123,4 +123,98 @@ public class SmbUtil {
}
return false;
}
/**
* @Title smbGet
* @Param shareUrl 共享目录中的文件路径,如smb://132.20.2.33/CIMPublicTest/eg.txt
* @Param localDirectory 本地目录,如tempStore/smb
*/
public static boolean smbGetByAuth(String smbFile, NtlmPasswordAuthentication auth,String localDirectory){
InputStream in = null;
OutputStream out = null;
try {
Config.registerSmbURLHandler();
SmbFile remoteFile = new SmbFile(smbFile,auth);
if (!remoteFile.exists()) {
log.info("共享文件不存在");
return false;
}
// 有文件的时候再初始化输入输出流
log.info("下载共享目录的文件 "+smbFile+" 到 "+ localDirectory);
String fileName = remoteFile.getName();
File localFile = new File(localDirectory + File.separator + fileName);
File fileParent = localFile.getParentFile();
if (null != fileParent && !fileParent.exists()) {
fileParent.mkdirs();
}
in = new BufferedInputStream(new SmbFileInputStream(remoteFile));
out = new BufferedOutputStream(new FileOutputStream(localFile));
byte[] buffer = new byte[1024];
while (in.read(buffer) != -1) {
out.write(buffer);
buffer = new byte[1024];
}
out.flush(); //刷新缓冲区输出流
return true;
} catch (Exception e) {
log.error("获取 SMB 文件出错",e);
} finally {
close(in,out);
}
return false;
}
/**
* 列出SMB服务器文件夹中的所有文件,如果目录不存在或者访问出错返回null
*/
public static List<SmbFile> smbFileList(String smbDir) {
try {
SmbFile remoteFile = new SmbFile(smbDir);
if (remoteFile.exists() && remoteFile.isDirectory()) {
return Lists.newArrayList(remoteFile.listFiles());
} else {
log.info("SMB目录[" + smbDir + "]不存在");
}
} catch (Exception e) {
log.error("访问SMB目录[" + smbDir + "]出错", e);
}
return null;
}
/**
* @Title smbGet
* @Param shareUrl 共享目录中的文件路径,如smb://132.20.2.33/CIMPublicTest/eg.txt
* @Param localDirectory 本地目录,如tempStore/smb
*/
public static boolean smbGet(SmbFile smbFile, String localDirectory) {
InputStream in = null;
OutputStream out = null;
try {
// 有文件的时候再初始化输入输出流
log.info("下载共享目录的文件 " + smbFile + " 到 " + localDirectory);
String fileName = smbFile.getName();
File localFile = new File(localDirectory + File.separator + fileName);
File fileParent = localFile.getParentFile();
if (null != fileParent && !fileParent.exists()) {
fileParent.mkdirs();
}
in = new BufferedInputStream(new SmbFileInputStream(smbFile));
out = new BufferedOutputStream(new FileOutputStream(localFile));
byte[] buffer = new byte[1024];
while (in.read(buffer) != -1) {
out.write(buffer);
buffer = new byte[1024];
}
out.flush(); //刷新缓冲区输出流
return true;
} catch (Exception e) {
log.error("获取 SMB 文件出错", e);
} finally {
close(in, out);
}
return false;
}
}
......@@ -7,6 +7,7 @@ import com.neotel.smfcore.common.csv.CsvReader;
import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.FileUtil;
import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.core.barcode.bean.BarcodeRule;
import com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto;
import com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeRuleDto;
import com.neotel.smfcore.core.barcode.rest.bean.mapstruct.BarcodeMapper;
......@@ -179,6 +180,15 @@ public class BarcodeController {
return ResultBean.newOkResult(resultMsg);
}
/*@ApiOperation("根据条码信息获取条码规则")
@PostMapping(value = "getBarcodeRule")
public ResultBean getBarcodeRule(@RequestBody Map<String, String> paramMap) {
String ruleStr = BarcodeRule.toCodeRule(paramMap.get("codeStr"), paramMap);
return ResultBean.newOkResult(ruleStr);
}*/
protected String handleBarcode(String fileURL) throws Exception {
log.info("开始读取文件:" + fileURL);
CsvReader csvRead =CsvReader.newReader(fileURL,"条码","RI");
......
......@@ -165,6 +165,10 @@ public class ComponentManagerImpl implements IComponentManager {
logName = "修改元器件";
c.and("id").ne(resources.getId());
}
if (StringUtils.isNotBlank(resources.getProvider())){
c.and("provider").is(resources.getProvider());
}
Component com = componentDao.findOne(new Query(c));
if (com != null) {
throw new ValidateException("smfcore.valueAlreadyExist","{0}[{1}]已存在",new String[]{"partNumber",resources.getPartNumber()});
......
......@@ -626,12 +626,24 @@ public class BaseDeviceHandler implements IDeviceHandler {
updateInOutDateExecuteTime(task.getPosName(),executeTime);
}
log.info(task.getBarcode() + "出仓位[" + task.getPosName() + "]完成,执行时间[" + executeTime + "]秒");
DataLog cancelTask = taskService.findFinishedOutTask(cid, task.getPosName(),task.getBarcode());
List<DataLog> taskList = taskService.findFinishedTaskList(cid, task.getPosName(), task.getBarcode(), false);
if (taskList != null && !taskList.isEmpty()){
for (DataLog dataLog : taskList) {
if (dataLog.isCancel()){
//将相同库位已经取消的任务从完成队列里删除
taskService.removeFinishedTask(dataLog);
log.info("从已完成的任务列表中删除之前取消的任务:" + dataLog.getPosName() + " ReelId:" + dataLog.getBarcode());
}
}
}
/* DataLog cancelTask = taskService.findFinishedOutTask(cid, task.getPosName(),task.getBarcode());
if (cancelTask != null && cancelTask.isCancel()) {
//将相同库位已经取消的任务从完成队列里删除
taskService.removeFinishedTask(cancelTask);
log.info("从已完成的任务列表中删除之前取消的任务:" + cancelTask.getPosName() + " ReelId:" + cancelTask.getBarcode());
}
}*/
updateCheckoutData(task,outBoxStatus);
} else {
//log.error(operationKey + "触发仓位完成时,操作队列中不存在");
......
......@@ -5,6 +5,7 @@ import com.google.common.base.Strings;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.api.bean.CodeValidateParam;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.StatusBean;
......@@ -228,11 +229,18 @@ public class NLPShelfHandler extends BaseDeviceHandler {
dataLogList.add(queueTask);
outMap.put(queueTask.getSourceId(), dataLogList);
} else {
color = ORDER_COLOR.BLUE;
if (StringUtils.isNotBlank(rgb)){
log.info(queueTask.getPosName() + "库位亮灯:" + "#" + rgb);
statusBean.addData("open", queueTask.getPosName() + "=#" + rgb);
} else {
color = ORDER_COLOR.BLUE;
}
}
}
statusBean.addData("open", queueTask.getPosName() + "=" + color.name());
log.info("库位[" + queueTask.getPosName() + "]+亮灯:" + color.name());
if (color != null){
statusBean.addData("open", queueTask.getPosName() + "=" + color.name());
log.info("库位[" + queueTask.getPosName() + "]+亮灯:" + color.name());
}
}
}
......@@ -306,7 +314,8 @@ public class NLPShelfHandler extends BaseDeviceHandler {
List<String> newList=new ArrayList<>();
for (String posName : hasReelPosList) {
if(disabledPosNameSet.contains(posName)){
//log.info(cid + "sensorChange hasReelPosList [" + posName + "]库位被禁用,忽略");
log.info(cid + "sensorChange hasReelPosList [" + posName + "]库位被禁用,忽略");
inOkList.add(posName);
continue;
}else if(usedPosList.contains(posName)){
log.info(cid + "sensorChange hasReelPosList [" + posName + "]库位已有物料,加入到ok列表");
......@@ -495,10 +504,17 @@ public class NLPShelfHandler extends BaseDeviceHandler {
String rgb = task.getLightColor();
ORDER_COLOR color = ORDER_COLOR.fromRgb(rgb);
if (color == null) {
color = ORDER_COLOR.BLUE;
if (StringUtils.isNotBlank(rgb)){
String outTaskPos = task.getPosName() + "=#" + rgb;
outTaskPosList.add(outTaskPos);
} else {
color = ORDER_COLOR.BLUE;
}
}
if (color != null) {
String outTaskPos = task.getPosName() + "=" + color.name();
outTaskPosList.add(outTaskPos);
}
String outTaskPos = task.getPosName() + "=" + color.name();
outTaskPosList.add(outTaskPos);
}
}
......
......@@ -283,6 +283,13 @@ public class NLShelfHandler extends BaseDeviceHandler {
}
}
if (pos != null) {
//判断当前库位是否有任务
Collection<String> excludePosIds = taskService.excludePosIds();
if(excludePosIds.contains(pos.getId())){
throw new ValidateException("smfcore.shelf.nextPos.hasTask", "库位[{0}]已有任务,请重新扫描库位码",new String[]{pos.getPosName()});
}
//扫描的为库位条码,先关掉上一个库位灯, 当前库位中没有物料的话点亮库位灯
closeLastPos(token);
//判断库位是否是对应设备或者租
......
......@@ -8,6 +8,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.barcode.service.po.Component;
......@@ -35,6 +36,7 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.query.Criteria;
......@@ -44,6 +46,7 @@ import org.springframework.stereotype.Repository;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;
/**
* 缓存
......@@ -942,4 +945,15 @@ public class DataCache {
return inOutData;
}
public List getCacheList(String keyStr) {
List<Object> list = new ArrayList<>();
for (Map.Entry<String, Object> entry : cacheMap.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (key.startsWith(keyStr)) {
list.add(value);
}
}
return list;
}
}
......@@ -10,6 +10,7 @@ import com.neotel.smfcore.core.humiture.rest.bean.query.HumitureQueryCriteria;
import com.neotel.smfcore.core.language.util.MessageUtils;
import com.neotel.smfcore.core.msd.bean.MSDSettiings;
import com.neotel.smfcore.core.solder.bean.SpSettings;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.system.service.manager.IHumitureManager;
import com.neotel.smfcore.core.system.service.po.Humiture;
import io.swagger.annotations.Api;
......@@ -44,22 +45,22 @@ public class HumitureController {
@GetMapping("api/humiture/list")
public HumitureDto info(HumitureQueryCriteria criteria, Pageable pageable) {
MSDSettiings msdSettiings = dataCache.getCache(Constants.CACHE_msdSetting);
if (msdSettiings == null){
if (msdSettiings == null) {
msdSettiings = new MSDSettiings();
}
Float maxTemperature = msdSettiings.getMaxTemperature();
Float maxHumidity = msdSettiings.getMaxHumidity();
Float minTemperature=msdSettiings.getMinTemperature();
Float minHumidity=msdSettiings.getMinHumidity();
Float minTemperature = msdSettiings.getMinTemperature();
Float minHumidity = msdSettiings.getMinHumidity();
List<String> cids = criteria.getCids();
if (cids == null || cids.isEmpty()){
if (cids == null || cids.isEmpty()) {
criteria.setCids(SecurityUtils.getUserGroupCid());
}
Query query = QueryHelp.getQuery(criteria);
query.with(Sort.by(Sort.Direction.ASC, "createDate"));
query.addCriteria(Criteria.where("temperature").ne("0"));
PageData<Humiture> humitureList = humitureManager.findByPage(query,pageable);
PageData<Humiture> humitureList = humitureManager.findByPage(query, pageable);
HumitureDto restultDto = new HumitureDto();
restultDto.setMaxHumidity(maxHumidity);
restultDto.setMinHumidity(minHumidity);
......@@ -69,7 +70,7 @@ public class HumitureController {
//获取锡膏料仓冷藏区温度设置
SpSettings spSettings = dataCache.getCache(Constants.CACHE_spSettings);
if(spSettings==null) {
if (spSettings == null) {
spSettings = new SpSettings();
}
restultDto.setMinColdAreaTemp(spSettings.getMinColdAreaTemp());
......@@ -77,6 +78,7 @@ public class HumitureController {
return restultDto;
}
public static boolean isSpStorage = false;
@ApiOperation("导出温湿度列表")
@GetMapping(value = "api/humiture/list/download")
......@@ -88,22 +90,42 @@ public class HumitureController {
Float maxTemperature = msdSettiings.getMaxTemperature();
Float maxHumidity = msdSettiings.getMaxHumidity();
List<String> cids = criteria.getCids();
if (cids == null || cids.isEmpty()){
if (cids == null || cids.isEmpty()) {
criteria.setCids(SecurityUtils.getUserGroupCid());
}
Query query = QueryHelp.getQuery(criteria);
query.with(Sort.by(Sort.Direction.ASC, "createDate"));
query.addCriteria(Criteria.where("temperature").ne("0"));
//如果有一个锡膏料仓,就添加冷藏区
Map<String, Storage> allStorages = dataCache.getAllStorage();
boolean isSp = false;
for (Storage s :
allStorages.values()) {
if (s.isSolderPaste()) {
isSp = true;
}
}
isSpStorage = isSp;
FileUtil.downloadExcel(query, pageable, response, new IExcelDownLoad() {
@Override
public List<List<String>> getHeader() {
List<List<String>> header = new ArrayList<>();
Locale locale = request.getLocale();
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.cid", locale, "CID")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.temperature", locale, "温度")));
if (isSpStorage) {
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.ntemperature", locale, "回温区温度")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.codetemperature", locale, "冷藏区温度")));
}else{
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.temperature", locale, "温度")));
}
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.humiture", locale, "湿度")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.createDate", locale, "创建时间")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.updateDate", locale, "更新时间")));
header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.createDate", locale, "时间")));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.humiture.updateDate", locale, "更新时间")));
return header;
}
......@@ -121,9 +143,12 @@ public class HumitureController {
List<Object> data = new ArrayList<>();
data.add(humiture.getCid());
data.add(humiture.getTemperature());
if (isSpStorage) {
data.add(humiture.getCodeAirTemp());
}
data.add(humiture.getHumidity());
data.add(createDate);
data.add(updateDate);
// data.add(updateDate);
dataList.add(data);
}
return dataList;
......
......@@ -137,24 +137,50 @@ public class LanguageMsgController {
@ApiOperation("查询列表")
@GetMapping
@PreAuthorize("@el.check('translation')")
public PageData<LanguageMsgDto> query(LanguageMsgCriteria criteria, Pageable pageable){
public PageData<LanguageMsgDto> query(LanguageMsgCriteria criteria, Pageable pageable) {
List<String> typeList=languageMsgManager.findTypeList();
List<String> typeList = languageMsgManager.findTypeList();
int languageSize=messageService.getAllLanList().size();
Query query= QueryHelp.getQuery(criteria);
int languageSize = messageService.getAllLanList().size();
Query query = QueryHelp.getQuery(criteria);
if (criteria.getTranslationState() != null) {
if (criteria.getTranslationState() == 1) {
query.addCriteria(Criteria.where("contentList").size(languageSize));
} else if (criteria.getTranslationState() == 2) {
// db.getCollection('languageMsg').find({ "contentList.3" : { "$exists" : 0 } })
String proName="contentList."+(languageSize-1);
String proName = "contentList." + (languageSize - 1);
query.addCriteria(Criteria.where(proName).exists(false));
}
}
PageData<LanguageMsg> barcodes=languageMsgManager.findByPage(query,pageable);
List<LanguageMsgDto> barcodeDtos=languageMsgMapper.toDto(barcodes.getContent());
return new PageData(barcodeDtos,barcodes.getTotalElements());
PageData<LanguageMsg> barcodes = languageMsgManager.findByPage(query, pageable);
List<LanguageMsg> languageMsgList = barcodes.getContent();
if (languageMsgList != null && !languageMsgList.isEmpty()) {
for (LanguageMsg languageMsg : languageMsgList) {
List<Content> contentList = languageMsg.getContentList();
if (contentList == null) {
contentList = new ArrayList<>();
}
List<String> allLantypeList = messageService.getAllLanList();
for (String type : allLantypeList) {
boolean hasType = false;
for (Content content : contentList) {
if (type.equals(content.getLanCode())) {
hasType = true;
break;
}
}
if (!hasType) {
languageMsg.setContent(type, "");
}
}
}
}
List<LanguageMsgDto> barcodeDtos = languageMsgMapper.toDto(languageMsgList);
return new PageData(barcodeDtos, barcodes.getTotalElements());
}
@ApiOperation("新增资源")
@PostMapping
......
......@@ -331,8 +331,14 @@ public class LanguageMsgService {
newLanguageList.add(msg);
} else {
boolean isUpdate = false;
if(!oldMsg.getEdited()){
isNeedUpdate=true;
boolean needUpdate = false;
if (!oldMsg.getEdited()) {
needUpdate = true;
}
if (isNeedUpdate){
needUpdate = true;
}
//只新增不修改
List<String> allLanList = getAllLanList();
......@@ -340,7 +346,7 @@ public class LanguageMsgService {
String oldValue = oldMsg.getContent(lanType);
String newValue = msg.getContent(lanType);
if (ObjectUtil.isNotEmpty(newValue)) {
if (ObjectUtil.isEmpty(oldValue)||(isNeedUpdate &&(!newValue.equals(oldValue))) ) {
if (ObjectUtil.isEmpty(oldValue)||(needUpdate &&(!newValue.equals(oldValue))) ) {
oldMsg.setContent(lanType, newValue);
isUpdate = true;
//内容默认更改为中文
......
......@@ -367,6 +367,40 @@ public class TaskService {
return null;
}
/**
* 根据料仓编号和库位获取已完成/取消的任务
*
* @param cid
* @param posName
* @return
*/
public List<DataLog> findFinishedTaskList(String cid, String posName, String barcode, boolean putInTask) {
List<DataLog> dataLogList = new ArrayList<>();
Collection<DataLog> areaFinishedTasks = theFinishedTaskMap.values();
for (DataLog task : areaFinishedTasks) {
boolean isSameTask = false;
if (ObjectUtil.isNotEmpty(posName) && task.getPosName().equals(posName) && task.getCid().equals(cid)) {
isSameTask = true;
} else if (ObjectUtil.isNotEmpty(barcode) && task.getBarcode().equals(barcode) && task.getCid().equals(cid)) {
isSameTask = true;
}
if (isSameTask) {
if (putInTask) {
if (task.isPutInTask()) {
dataLogList.add(task);
}
} else {
if (task.isCheckOutTask()) {
dataLogList.add(task);
}
}
}
}
return dataLogList;
}
/**
* 根据cid 和 posName ,barcode 查找正在执行的任务,不存在时返回 null
*/
......@@ -549,6 +583,10 @@ public class TaskService {
public synchronized String checkout(StoragePos pos, boolean forceOut, String subSourceId, boolean isSingleOut) {
return checkout(pos,forceOut,subSourceId,isSingleOut,"");
}
public synchronized String checkout(StoragePos pos, boolean forceOut, String subSourceId, boolean isSingleOut,String rgbCode) {
Barcode barcode = pos.getBarcode();
if (barcode != null) {
......@@ -589,6 +627,12 @@ public class TaskService {
task.setType(OP.CHECKOUT);
task.setStatus(OP_STATUS.WAIT.name());
task.setSingleOut(isSingleOut);
//判断颜色是否为空
if (StringUtils.isNotBlank(rgbCode)){
task.setLightColor(rgbCode);
}
//工单出库任务
if (!Strings.isNullOrEmpty(subSourceId)) {
// LiteOrderItem liteOrderItem = liteOrderItemDao.findOneById(subSourceId);
......
package com.neotel.smfcore.custom.hicks20714;
import com.neotel.smfcore.common.init.MenuInit;
import com.neotel.smfcore.core.api.SmfApi;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
public class HicksMenu {
@Autowired
MenuInit menuInit;
@Autowired
SmfApi smfApi;
@PostConstruct
public void init() {
String[] menus = new String[]{
"LNBResidue"
};
menuInit.labelMenu("hicks", menus);
String apiName = smfApi.getApiName();
if (Strings.isNotBlank(apiName) && apiName.equals("hicks")) {
menuInit.showMenu(apiName);
}
}
}
package com.neotel.smfcore.custom.hicks20714.bean;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.ToString;
/**
* LNB残数信息
*/
@Data
@ToString
public class LNBResidueInfo {
@ExcelProperty(value = "Splicing remaining time")
private String splicingRemainingTime;
@ExcelProperty(value = "Machine No.")
private String machineNo;
@ExcelProperty(value = "Table No.")
private String tableNo;
@ExcelProperty(value = "Table")
private String table;
@ExcelProperty(value = "Feeder")
private String feeder;
@ExcelProperty(value = "Part name")
private String partName;
@ExcelProperty(value = "Remaining reel")
private String remainingReel;
@ExcelProperty(value = "Remaining chips")
private String remainingChips;
@ExcelProperty(value = "Remaining PCBs")
private String remainingPCBs;
@ExcelProperty(value = "Z")
private String z;
@ExcelProperty(value = "Exchange Frequency")
private String exchangeFrequency;
@ExcelProperty(value = "Parts empty remaining time")
private String partsEmptyRemainingTime;
@ExcelProperty(value = "Feeder serial")
private String feederSerial;
@ExcelProperty(value = "Machine name")
private String machineName;
@ExcelProperty(value = "Address")
private String address;
@ExcelProperty(value = "Sub")
private String sub;
@ExcelProperty(value = "Current LotName")
private String currentLotName;
@ExcelProperty(value = "Splice LotName")
private String spliceLotName;
@ExcelProperty(value = "Warning Status")
private String warningStatus;
/**
* 默认没有出库
*/
private boolean isOut = false;
private boolean isLight = false;
}
package com.neotel.smfcore.custom.hicks20714.bean.dto;
import com.neotel.smfcore.custom.hicks20714.bean.LNBResidueInfo;
import lombok.Data;
import java.util.List;
@Data
public class LNBResidueInfoDto {
// 0不展示亮灯, 1展示亮灯
boolean isLight = false;
//解析的详细信息
List<LNBResidueInfo> residueInfoList;
}
package com.neotel.smfcore.custom.hicks20714.rest;
import com.google.common.base.Strings;
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.storage.enums.CHECKOUT_TYPE;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
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.hicks20714.bean.LNBResidueInfo;
import com.neotel.smfcore.custom.hicks20714.bean.dto.LNBResidueInfoDto;
import com.neotel.smfcore.custom.hicks20714.util.HicksUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
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.RestController;
import java.util.*;
@Slf4j
@RestController
@RequestMapping("/hicks")
public class HicksController {
@Autowired
private DataCache dataCache;
/**
* 是否刷新页面
*
* @return
*/
@RequestMapping("/isRefreshIndex")
@AnonymousAccess
public ResultBean isRefreshIndex() {
boolean isRefresh = HicksUtil.isIsRefresh();
if (isRefresh) {
HicksUtil.setIsRefresh(false);
}
return ResultBean.newOkResult(isRefresh);
}
/**
* 获取LNB残数详情
*
* @return
*/
@RequestMapping("/getLNBResidueInfo")
@AnonymousAccess
public ResultBean getLNBResidueInfo() {
LNBResidueInfoDto dto = new LNBResidueInfoDto();
List<LNBResidueInfo> infoList = HicksUtil.getInfo();
for (LNBResidueInfo lnbResidueInfo : infoList) {
lnbResidueInfo.setLight(HicksUtil.idNeedLight(Arrays.asList(lnbResidueInfo)));
}
dto.setResidueInfoList(infoList);
return ResultBean.newOkResult(dto);
}
/**
* 亮灯出库
*
* @return
*/
@RequestMapping("/lightOut")
@AnonymousAccess
public ResultBean lightOut(String machineNo,String tableNo,String table,String feeder) {
List<LNBResidueInfo> infoList = HicksUtil.getInfo();
String id = machineNo +"_"+tableNo+"_"+table+"_"+feeder;
LNBResidueInfo info = null;
for (LNBResidueInfo lnbResidueInfo : infoList) {
String lnbResidueInfoId = lnbResidueInfo.getMachineNo() + "_" + lnbResidueInfo.getTableNo() + "_" + lnbResidueInfo.getTable() + "_" + lnbResidueInfo.getFeeder();
if (lnbResidueInfoId.equals(id)){
info = lnbResidueInfo;
break;
}
}
int count = 0;
if (info != null){
count = HicksUtil.lightOut(Arrays.asList(info));
}
if (count == 0){
return ResultBean.newErrorResult(-1,"smfcore.label.noReel","未找到可出库的物料");
}
return ResultBean.newOkResult("");
}
//是否自动亮灯
@RequestMapping("/isAutoLight")
@AnonymousAccess
public ResultBean isAutoLight(String isAutoLight) {
Boolean auto = Boolean.valueOf(isAutoLight);
dataCache.updateCache(HicksUtil.HICKS_AUTO_LIGHT, Boolean.valueOf(auto));
if(auto) {
HicksUtil.setIsRefresh(true);
List<LNBResidueInfo> infoList = HicksUtil.getInfo();
int count = HicksUtil.lightOut(infoList);
if (count == 0){
return ResultBean.newErrorResult(-1,"smfcore.label.noReel","未找到可出库的物料");
}
}
return ResultBean.newOkResult("");
}
//亮灯时间设置
@RequestMapping("/timeSetting")
@AnonymousAccess
public ResultBean timeSetting(String time) {
try {
dataCache.updateCache(HicksUtil.HICKS_TIME_SETTING, time);
HicksUtil.setIsRefresh(true);
} catch (Exception e) {
e.printStackTrace();
return ResultBean.newErrorResult(-1, "", "设置失败,请确认格式是否为数字");
}
return ResultBean.newOkResult("");
}
//获取设置
@RequestMapping("/getSetting")
@AnonymousAccess
public ResultBean getSetting(){
boolean isAutoLight = dataCache.getCache(HicksUtil.HICKS_AUTO_LIGHT) == null ? false : dataCache.getCache(HicksUtil.HICKS_AUTO_LIGHT);
String time = dataCache.getCache(HicksUtil.HICKS_TIME_SETTING) == null ? 20+"" : dataCache.getCache(HicksUtil.HICKS_TIME_SETTING);
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("isAutoLight",isAutoLight);
resultMap.put("time",time);
return ResultBean.newOkResult(resultMap);
}
}
\ No newline at end of file
package com.neotel.smfcore.custom.hicks20714.util;
import com.google.common.collect.Lists;
import jcifs.smb.NtlmPasswordAuthentication;
import jcifs.smb.SmbFile;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.io.File;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.stream.Collectors;
@Slf4j
@Component
public class FileUtil {
/**
* 读取远程最新的文件
*
* @param path
* @return
*/
public static SmbFile getSmbFile(String path, String userName, String password) {
List<SmbFile> fileList = smbFileList(path, userName, password);
if (fileList != null && !fileList.isEmpty()) {
fileList = fileList.stream().sorted(Comparator.comparing(SmbFile::getDate).reversed()).collect(Collectors.toList());
return fileList.get(0);
}
return null;
}
/**
* 列出SMB服务器文件夹中的所有文件名称,如果目录不存在或者访问出错返回null
*/
public static List<SmbFile> smbFileList(String smbDir, String userName, String password) {
try {
//String domain = "admin";
NtlmPasswordAuthentication nt = new NtlmPasswordAuthentication(null,userName,password);
SmbFile remoteFile = new SmbFile(smbDir, nt);
//SmbFile remoteFile = new SmbFile(smbDir);
if (remoteFile.exists() && remoteFile.isDirectory()) {
SmbFile[] smbFiles = remoteFile.listFiles();
return Lists.newArrayList(smbFiles);
} else {
log.info("SMB目录[" + smbDir + "]不存在");
}
} catch (Exception e) {
log.error("访问SMB目录[" + smbDir + "]出错", e);
}
return null;
}
/**
* 删除文件
*
* @param file
* @return
*/
public static boolean deleteFile(File file) {
//判断文件不为null或文件目录存在
if (file == null || !file.exists()) {
return false;
}
//取得这个目录下的所有子文件对象
File[] files = file.listFiles();
if (files == null) {
file.delete();
return true;
}
//遍历该目录下的文件对象
for (File f : files) {
//判断子目录是否存在子目录,如果是文件则删除
if (f.isDirectory()) {
deleteFile(f);
} else {
f.delete();
}
}
return true;
}
}
package com.neotel.smfcore.custom.iriichi1081;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.neotel.smfcore.common.exception.ApiException;
import com.neotel.smfcore.common.utils.HttpHelper;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.api.listener.BaseSmfApiListener;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
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.custom.iriichi1081.config.IriichiConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.IgnoredErrorType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class IriichiApi extends BaseSmfApiListener {
@Autowired
private ILiteOrderManager liteOrderManager;
@Autowired
private LiteOrderCache liteOrderCache;
@Override
public boolean isForThisApi(String apiName) {
return apiName != null && apiName.equalsIgnoreCase("iriichi");
}
@Override
public LiteOrder fetchOrder(String fetchOrderUrl, String orderNumber, String username) {
String token = getToken();
if (StringUtils.isBlank(token)) {
log.info(orderNumber + "获取token信息失败");
return null;
}
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", token);
headerMap.put("Accept", IriichiConfig.accept);
/* Map<String, Object> paramMap = new HashMap<>();
paramMap.put("customloadmethod", "IR_GetJobMaterialPickListSp");
paramMap.put("customloadmethodparms", orderNumber);
paramMap.put("loadtype", "NEXT");
paramMap.put("readonly", "TRUE");*/
try {
String result = HttpHelper.getJson(fetchOrderUrl +
"?customloadmethod=IR_GetJobMaterialPickListSp" +
"&readonly=true" +
"&loadtype=NEXT" +
"&customloadmethodparms=" + orderNumber, headerMap, null);
return getOrderByResult(orderNumber, result);
} catch (ApiException e) {
e.printStackTrace();
}
return null;
}
public void cycleCount(Barcode barcode) {
String token = getToken();
if (StringUtils.isBlank(token)) {
log.info(barcode.getBarcode() + "获取token信息失败");
return;
}
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", token);
headerMap.put("Accept", IriichiConfig.accept);
String parms = barcode.getPartNumber()
+ ","
+ barcode.getMemo()
+ ","
+ barcode.getPosName()
+ ","
+ barcode.getBatch()
+ ","
+ barcode.getAmount()
+ ","
+ barcode.getPutInDateStr()
+ ","
+ "NULL"
+ ","
+ "NULL";
log.info(barcode.getBarcode() + "cycleCount入参为:" + parms);
try {
String result = HttpHelper.getJson(IriichiConfig.cycleCount_url + "?parms=" + parms, headerMap, null);
} catch (ApiException e) {
e.printStackTrace();
}
}
public String getToken() {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("UserId", IriichiConfig.userId);
headerMap.put("Password", IriichiConfig.passWord);
headerMap.put("Accept", IriichiConfig.accept);
try {
String result = HttpHelper.getJson(IriichiConfig.token_url, headerMap, null);
JSONObject jsonObject = JSONObject.parseObject(result);
if ("Success".equals(jsonObject.getString("Message"))) {
return jsonObject.getString("Token");
}
} catch (ApiException e) {
e.printStackTrace();
}
return "";
}
private LiteOrder getOrderByResult(String orderNo, String result) {
JSONObject resultObj = JSONObject.parseObject(result);
List<List<Map<String, String>>> itemArr = resultObj.getObject("Items", List.class);
List<LiteOrderItem> itemList = new ArrayList<>();
for (List<Map<String, String>> mapList : itemArr) {
LiteOrderItem orderItem = new LiteOrderItem();
for (Map<String, String> map : mapList) {
if ("item_code".equals(map.get("Name"))) {
orderItem.setPn(map.get("Value"));
} else if ("qty_to_pick".equals(map.get("Name"))) {
try {
orderItem.setNeedReelCount(NumberUtil.parseInt(map.get("Value")));
} catch (Exception e) {
e.printStackTrace();
}
}
}
itemList.add(orderItem);
}
if (itemList != null && !itemList.isEmpty()) {
LiteOrder order = new LiteOrder();
order.setOrderItems(itemList);
liteOrderManager.createWithItems(order);
liteOrderCache.addOrderToMap(order);
return order;
}
return null;
}
}
package com.neotel.smfcore.custom.iriichi1081;
import com.neotel.smfcore.common.init.MenuInit;
import com.neotel.smfcore.core.api.SmfApi;
import com.neotel.smfcore.security.service.po.Menu;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
public class IriichiMenu {
@Autowired
MenuInit menuInit;
@Autowired
SmfApi smfApi;
@PostConstruct
public void init(){
String menuLabel = "iriichi";
MenuInit.addMenu(menuLabel,null,124, "Cycle Count","cycleCount", "neolight/cycleCount/index","");
String apiName = smfApi.getApiName();
if(Strings.isNotBlank(apiName) && apiName.equals(menuLabel)){
menuInit.showMenu(apiName);
}
}
}
package com.neotel.smfcore.custom.iriichi1081.config;
public class IriichiConfig {
//config name
public static final String iriichi_config_name = "app_neotel";
public static final String iriichi_crp_config_name = "Neotel@478*";
// token url
public static final String token_url = "http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/token/IRIICHI_CRP";
// 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";
//Cycle Count url
public static final String cycleCount_url = "http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/method/IR_SLAPIs/IR_InsertCycleCountSp";
// userId
public static final String userId = "app_neotel";
//password
public static final String passWord = "Neotel@478*";
//请求类型
public static final String accept = "application/json";
}
package com.neotel.smfcore.custom.iriichi1081.controller;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.custom.iriichi1081.IriichiApi;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@RestController
@RequestMapping("/cycleCount")
public class CycleCountController {
@Autowired
private IriichiApi iriichiApi;
@Autowired
private IStoragePosManager storagePosManager;
private boolean cycleCount = false;
/**
* 发送库存信息
*
* @return
*/
@RequestMapping("/cycle")
//@AnonymousAccess
public ResultBean CycleCount() {
//10分钟内 不允许重复点击
if (cycleCount) {
return ResultBean.newErrorResult(-1, "smfcore.cyclecount.executing", "Cycle Count正在执行中");
}
cycleCount = true;
List<StoragePos> storagePosList = storagePosManager.findNotEmpty();
for (StoragePos storagePos : storagePosList) {
try {
iriichiApi.cycleCount(storagePos.getBarcode());
} catch (Exception e) {
e.printStackTrace();
}
}
cycleCount = false;
return ResultBean.newOkResult("");
}
}
package com.neotel.smfcore.custom.neotel;
import cn.hutool.core.util.NumberUtil;
import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.common.utils.HttpHelper;
......@@ -178,7 +179,7 @@ public class NeotelApi extends BaseSmfApiListener {
String qtyStr = getData(dataMap, "qty");
if (Strings.isNotBlank(qtyStr)) {
int qty = Integer.valueOf(qtyStr);
int qty = NumberUtil.parseInt(qtyStr);
if (qty > 0) {
barcode.setAmount(qty);
}
......@@ -199,6 +200,16 @@ public class NeotelApi extends BaseSmfApiListener {
log.error("日期转换出错", e);
}
try {
String expireDateStr = getData(dataMap, "expireDate");
if (Strings.isNotBlank(expireDateStr)) {
Date expireDate = DateUtil.toDate(expireDateStr, "yyyy-MM-dd HH:mm:ss");
barcode.setExpireDate(expireDate);
}
} catch (Exception e) {
log.error("日期转换出错", e);
}
resolveComponent(barcode);
barcode = barcodeManager.saveBarcode(barcode);
return barcode;
......@@ -250,7 +261,7 @@ public class NeotelApi extends BaseSmfApiListener {
String qtyStr = getData(dataMap, "qty");
if (Strings.isNotBlank(qtyStr)) {
int qty = Integer.valueOf(qtyStr);
int qty = NumberUtil.parseInt(qtyStr);
if (qty > 0) {
barcode.setAmount(qty);
}
......@@ -271,7 +282,17 @@ public class NeotelApi extends BaseSmfApiListener {
log.error("日期转换出错", e);
}
barcode = barcodeManager.saveBarcode(barcode);
try {
String expireDateStr = getData(dataMap, "expireDate");
if (Strings.isNotBlank(expireDateStr)) {
Date expireDate = DateUtil.toDate(expireDateStr, "yyyy-MM-dd HH:mm:ss");
barcode.setExpireDate(expireDate);
}
} catch (Exception e) {
log.error("日期转换出错", e);
}
barcode = barcodeManager.save(barcode);
return barcode;
} else {
return null;
......
......@@ -30,6 +30,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.util.Integers;
......@@ -38,6 +39,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
......@@ -69,6 +71,31 @@ public class MesApiController {
@Autowired
protected CodeResolve codeResolve;
private Map<String,String> colorMap = Maps.newConcurrentMap();
@PostConstruct
private void initColor() {
colorMap.put("FF0000", "Red");
colorMap.put("FFC0CB", "Pink");
colorMap.put("C71585", "Medium Violet Red");
colorMap.put("FF8C00", "Dark Orange");
colorMap.put("FFFF00", "Yellow");
colorMap.put("BDB76B", "Dark Khaki");
colorMap.put("E6E6FA", "Lavender");
colorMap.put("9370DB", "Medium Purple");
colorMap.put("800080", "Purple");
colorMap.put("ADFF2F", "Green Yellow");
colorMap.put("98FB98", "Pale Green");
colorMap.put("008000", "Green");
colorMap.put("808000", "Olive");
colorMap.put("00FFFF", "Aqua");
colorMap.put("7FFFD4", "Aquamarine");
colorMap.put("B0C4DE", "Light Steel Blue");
colorMap.put("0000FF", "Blue");
colorMap.put("FFE4C4", "Bisque");
colorMap.put("f4A460", "Sandy Brown");
}
//http://localhost/myproject/rest/api/v2/mes/inventory?LOC=1
@ApiOperation("查询有料仓位")
@RequestMapping(value = "/inventory")
......@@ -217,11 +244,18 @@ public class MesApiController {
try {
String[] REEL_IDS = request.getParameterValues("RIS");
String rgbCode = request.getParameter("rgbCode"); //亮灯颜色
if(REEL_IDS == null || REEL_IDS.length == 0){
return "Error: RI 为必须项";
}
//判断亮灯颜色是否在这20种内
if (StringUtils.isBlank(colorMap.get(rgbCode)) || StringUtils.isBlank(rgbCode)){
return "Error :rgbCode不在指定范围内";
//return "Error: rgbCode 不在颜色范围内";
}
ArrayList<StoragePos> poses = Lists.newArrayList();
for (String REEL_ID : REEL_IDS) {
StoragePos pos = storagePosManager.getByBarcode(REEL_ID);
......@@ -232,7 +266,7 @@ public class MesApiController {
}
for (StoragePos pos : poses) {
log.info("出库位置仓位【"+pos.getPosName()+"】");
taskService.checkout(pos,false,null,false);
taskService.checkout(pos,false,null,false,rgbCode);
}
}catch (Exception e){
......
......@@ -48,3 +48,7 @@ menu:
show:
hide:
smd:
filePath:
userName:
password:
\ No newline at end of file
......@@ -309,7 +309,7 @@ smfcore.storagePos.batch=\u6279\u6B21
smfcore.humiture.cid=CID
smfcore.humiture.temperature=\u6E29\u5EA6
smfcore.humiture.humiture=\u6E7F\u5EA6
smfcore.humiture.createDate=\u521B\u5EFA\u65F6\u95F4
smfcore.humiture.createDate=\u65F6\u95F4
smfcore.humiture.updateDate=\u66F4\u65B0\u65F6\u95F4
smfcore.order.ri=RI
smfcore.order.pn=PN
......@@ -369,4 +369,7 @@ smfcore.mesApi.codeResolveUrl.paramNull={0}\u4E0D\u80FD\u4E3A\u7A7A
smfcore.storagePos.weight=\u91CD\u91CF
smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F
smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
\ No newline at end of file
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
......@@ -358,4 +358,7 @@ smfcore.mesApi.codeResolveUrl.paramNull={0} canot null
smfcore.storagePos.weight=Weight
smfcore.expireSolderPaste=Expired Solder Paste
smfcore.spbox.backFail=Back to the library verification failure
smfcore.spbox.expireOut=Expired solder paste out of storage
\ No newline at end of file
smfcore.spbox.expireOut=Expired solder paste out of storage
smfcore.humiture.codetemperature=Refrigeration zone temperature
smfcore.humiture.ntemperature=Return temperature zone temperature
smfcore.cyclecount.executing=Cycle Count are being executed
\ No newline at end of file
......@@ -355,4 +355,7 @@ smfcore.mesApi.codeResolveUrl.paramNull={0}\u4E0D\u80FD\u4E3A\u7A7A
smfcore.storagePos.weight=\u91CD\u91CF
smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F
smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
\ No newline at end of file
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 \u5B9F\u884C
\ No newline at end of file
......@@ -355,4 +355,7 @@ smfcore.mesApi.codeResolveUrl.paramNull={0}\u4E0D\u80FD\u4E3A\u7A7A
smfcore.storagePos.weight=\u91CD\u91CF
smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F
smfcore.spbox.backFail=\u56DE\u5E93\u9A8C\u8BC1\u5931\u8D25
smfcore.spbox.expireOut=\u8FC7\u671F\u7269\u6599\u51FA\u5E93
\ No newline at end of file
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
......@@ -356,4 +356,7 @@ smfcore.mesApi.codeResolveUrl.paramNull={0}\u4E0D\u80FD\u4E3A\u7A7A
smfcore.storagePos.weight=\u91CD\u91CF
smfcore.expireSolderPaste=\u8FC7\u671F\u9521\u818F
smfcore.spbox.backFail=\u56DE\u5EAB\u9A57\u8B49\u5931\u6557
smfcore.spbox.expireOut=\u904E\u671F\u7269\u6599\u51FA\u5EAB
\ No newline at end of file
smfcore.spbox.expireOut=\u904E\u671F\u7269\u6599\u51FA\u5EAB
smfcore.humiture.codetemperature=\u51B7\u85CF\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
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!