Commit 544dd334 sunke

锡膏料仓Bug修复

1 个父辈 2e9db25e
正在显示 21 个修改的文件 包含 328 行增加287 行删除
...@@ -78,10 +78,6 @@ public class Barcode extends BaseMongoBean { ...@@ -78,10 +78,6 @@ public class Barcode extends BaseMongoBean {
*/ */
private Date expireDate; private Date expireDate;
private boolean used = false; private boolean used = false;
//夹具PartNumber
private String fixtureNumber;
// 所在夹具 ReelId
private String inFixture;
//备注信息 //备注信息
private String memo; private String memo;
...@@ -426,22 +422,6 @@ public class Barcode extends BaseMongoBean { ...@@ -426,22 +422,6 @@ public class Barcode extends BaseMongoBean {
return 0; return 0;
} }
public String getInFixture() {
return inFixture;
}
public void setInFixture(String inFixture) {
this.inFixture = inFixture;
}
public String getFixtureNumber() {
return fixtureNumber;
}
public void setFixtureNumber(String fixtureNumber) {
this.fixtureNumber = fixtureNumber;
}
public String getOtherField2() { public String getOtherField2() {
return otherField2; return otherField2;
} }
......
...@@ -69,7 +69,6 @@ public class BarcodeManagerImpl implements IBarcodeManager { ...@@ -69,7 +69,6 @@ public class BarcodeManagerImpl implements IBarcodeManager {
barcode.setWarmTime(component.getWarmTime()); barcode.setWarmTime(component.getWarmTime());
barcode.setMixTime(component.getMixTime()); barcode.setMixTime(component.getMixTime());
barcode.setOtherField1(component.getProductionType()); barcode.setOtherField1(component.getProductionType());
barcode.setFixtureNumber(component.getFixtureNumber());
if(barcode.getPlateSize() <= 0){ if(barcode.getPlateSize() <= 0){
log.info("设置置["+barcode.getBarcode()+"]的尺寸信息"); log.info("设置置["+barcode.getBarcode()+"]的尺寸信息");
barcode.setPlateSize(component.getPlateSize()); barcode.setPlateSize(component.getPlateSize());
......
...@@ -104,12 +104,12 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -104,12 +104,12 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override @Override
public StoragePos getEmptyPosByStorage(Storage storage, Barcode barcode, Collection<String> excludePosIds) throws ValidateException { public StoragePos getEmptyPosByStorage(Storage storage, Barcode barcode, Collection<String> excludePosIds) throws ValidateException {
if(barcode.getUsedCount() > 0){ // if(barcode.getUsedCount() > 0){
//二次入库获取可用的回温库位 // //二次入库获取可用的回温库位
return getEmptyPos(storage,barcode, excludePosIds,true); // return getEmptyPos(storage,barcode, excludePosIds,true);
}else{ // }else{
return getEmptyPos(storage,barcode, excludePosIds,false); return getEmptyPos(storage,barcode, excludePosIds,false);
} // }
} }
@Override @Override
......
...@@ -26,12 +26,6 @@ import java.util.Date; ...@@ -26,12 +26,6 @@ import java.util.Date;
* *
* *
* *
*
*
*
*
*
*
*条码规则,可用字段有: *条码规则,可用字段有:
* PN为物料编号即 PartNumber * PN为物料编号即 PartNumber
* RI 为唯一码即ReelId,[RI]为所有字符串作为一个唯一码 * RI 为唯一码即ReelId,[RI]为所有字符串作为一个唯一码
...@@ -47,12 +41,12 @@ import java.util.Date; ...@@ -47,12 +41,12 @@ import java.util.Date;
* 中间一位数字0表示为变长,正值表示从前面截取,负值表示从后面开始截取,前缀和后缀及长度都有效时,需要验证字串总长度 * 中间一位数字0表示为变长,正值表示从前面截取,负值表示从后面开始截取,前缀和后缀及长度都有效时,需要验证字串总长度
* 后面一位数字大于0表示去除后面第n位, -1表示不去除,并且对字段长数不做限制, 等于0表示不去除,但对字段长度做限制 * 后面一位数字大于0表示去除后面第n位, -1表示不去除,并且对字段长数不做限制, 等于0表示不去除,但对字段长度做限制
* *
* 例一: QTY[-1,5,-1]取前5位作为数量 * 例一: QTY[-1:5:-1]取前5位作为数量
* 例二: QTY[-1,-5,-1]取后5位作为数量 * 例二: QTY[-1:-5:-1]取后5位作为数量
* 例三: QTY[1,5,-1]去除前面第1位后,取前5位作为数量 * 例三: QTY[1:5:-1]去除前面第1位后,取前5位作为数量
* 例四: QTY[-1,-5,1]去除后面第1位后,取后5位作为数量 * 例四: QTY[-1:-5:1]去除后面第1位后,取后5位作为数量
* 例五: QTY[1,0,-1]去除前面1位后,剩余的作为数量 * 例五: QTY[1:0:-1]去除前面1位后,剩余的作为数量
* 例六: QTY[0,5,3]去除前面0位和后面3位,剩余的5位作为数量,也就是说只能为8位 * 例六: QTY[0:5:3]去除前面0位和后面3位,剩余的5位作为数量,也就是说只能为8位
* *
* 示例: * 示例:
* 规则为: [RI]_PN_PRODATEyyMMdd_QTY[0:5:4] * 规则为: [RI]_PN_PRODATEyyMMdd_QTY[0:5:4]
...@@ -102,7 +96,9 @@ public class BarcodeRule { ...@@ -102,7 +96,9 @@ public class BarcodeRule {
if(!Strings.isNullOrEmpty(ruleStr)){ if(!Strings.isNullOrEmpty(ruleStr)){
//先去除[prefix,length,suffix]这样的配置字段 //先去除[prefix,length,suffix]这样的配置字段
String canSplitStr = ruleStr.replaceAll("\\[[^\\]]*?\\]",""); String canSplitStr =ruleStr.replaceAll("DATE.*?\\]","");
canSplitStr = canSplitStr.replaceAll("\\[[^\\]]*?\\]","");
//先找分割符,分割出来数组数量最多的放第一个 //先找分割符,分割出来数组数量最多的放第一个
String trySeparator = ""; String trySeparator = "";
//找最多的字符 //找最多的字符
...@@ -233,9 +229,9 @@ public class BarcodeRule { ...@@ -233,9 +229,9 @@ public class BarcodeRule {
private RuleItem quantity_item = new RuleItem("QTY"); private RuleItem quantity_item = new RuleItem("QTY");
private RuleItem produceDate_item = new RuleItem("PRODATE"); private RuleItem produceDate_item = new RuleItem("PRODATE");
private RuleItem expireDate_item = new RuleItem("EXPDATE"); private RuleItem expireDate_item = new RuleItem("EXPDATE");
private RuleItem expireYear_item = new RuleItem("EXPY"); private RuleItem expireYear_item = new RuleItem("EXPYEAR");
private RuleItem expireMonth_item = new RuleItem("EXPM"); private RuleItem expireMonth_item = new RuleItem("EXPMONTH");
private RuleItem expireDay_item = new RuleItem("EXPD"); private RuleItem expireDay_item = new RuleItem("EXPDAY");
private RuleItem supplier_item = new RuleItem("SP"); private RuleItem supplier_item = new RuleItem("SP");
private RuleItem batch_item = new RuleItem("BATCH"); private RuleItem batch_item = new RuleItem("BATCH");
private RuleItem msl_item = new RuleItem("MSL"); private RuleItem msl_item = new RuleItem("MSL");
...@@ -626,9 +622,20 @@ public class BarcodeRule { ...@@ -626,9 +622,20 @@ public class BarcodeRule {
//rule = "1;2;PN;BATCH[2:0:-1];5;6;EXPDATEyyyy/MM/dd[2:0:8];QTY[2:0:-1];8;9;10;RI[2:0:-1]"; //rule = "1;2;PN;BATCH[2:0:-1];5;6;EXPDATEyyyy/MM/dd[2:0:8];QTY[2:0:-1];8;9;10;RI[2:0:-1]";
//codeStr = "锘緿M;IN13浠跺\uE69C缁勮灪涓濇壒09913涓栬揪;BM;PH11A-ZZG02;DDDDMO180525;GG624-71;SX2019/8/25 0:00:00;SL2;HG;DL;ZP;QT90CECB112D1448DA91F485D0AA984B08"; //codeStr = "锘緿M;IN13浠跺\uE69C缁勮灪涓濇壒09913涓栬揪;BM;PH11A-ZZG02;DDDDMO180525;GG624-71;SX2019/8/25 0:00:00;SL2;HG;DL;ZP;QT90CECB112D1448DA91F485D0AA984B08";
codeStr = "??M8431CZ8133ZHMJQ21EJ3545-2016;IN?????BM6005K01;PH20012005;SC;CJ;LH;DDMO20072200041;CB;SX2023-2-27 0:00:00;SL1;JL;KG;HG;DL;ZP;QT;XT1001AS10000000517DT2;";
rule = "1;2;PN[-1:0:-1];BATCH[-1:0:-1];5;6;7;8;9;EXPDATEyyyy-MM-dd[2:0:8];QTY[2:0:-1];12;13;14;15;16;17;RI[-1:0:-1]";
//rule = "1>PN[-1:0:6]>3>RI[-1:0:6]"; //rule = "1>PN[-1:0:6]>3>RI[-1:0:6]";
//codeStr = "<ckdh>CC200612000194</ckdh><jybh>ADK20-\n" +"JY19060012~/jybh>"; //codeStr = "<ckdh>CC200612000194</ckdh><jybh>ADK20-\n" +"JY19060012~/jybh>";
//rule = "1;2;PN[-1:0:-1];BATCH[-1:0:-1];5;6;7;8;9;EXPDATEyyyy-MM-dd[2:0:8];QTY[2:0:-1];12;13;14;15;16;17;RI[-1:0:-1]";
//codeStr = "DM8431CZ8133ZHMJQ21EJ3545-2016;IN;BM6005K01;PH20012005;SC;CJ;LH;DDMO20072200041;CB;SX2023-2-27 00:10:00;SL1;JL;KG;HG;DL;ZP;QT;XT1001AS10000000517DT2;";
//803
//rule = "PN[6:0:-1],EXPDATEyyyy-MM-dd[-1:0:-1],BATCH,RI";
//codeStr = "ALPHA OL107E,2021-11-11,00714026Z,002";
codeStr = "LOCTITE3609,20200930,001";
rule = "PN,EXPDATEyyyyMMdd,RI";
BarcodeRule br = BarcodeRule.newRule(rule); BarcodeRule br = BarcodeRule.newRule(rule);
Barcode b = br.toCodeBean(codeStr).getBarcode(); Barcode b = br.toCodeBean(codeStr).getBarcode();
if(b != null){ if(b != null){
......
package com.myproject.webapp.controller.barcode; package com.myproject.webapp.controller.barcode;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.myproject.bean.update.Settings; import com.myproject.bean.update.Settings;
import com.myproject.exception.ValidateException; import com.myproject.exception.ValidateException;
import com.myproject.util.BarcodeRule; import com.myproject.util.BarcodeRule;
...@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
@Controller @Controller
...@@ -37,6 +39,11 @@ public class BarcodeSettingsController extends SettingsController { ...@@ -37,6 +39,11 @@ public class BarcodeSettingsController extends SettingsController {
return updateView(); return updateView();
} else { } else {
try { try {
String[] codeRuleList = request.getParameterValues("codeRuleList");
if(codeRuleList != null){
settings.setCodeRuleList(Lists.newArrayList(codeRuleList));
}
for(String codeRule : settings.getCodeRuleList()){ for(String codeRule : settings.getCodeRuleList()){
if(!Strings.isNullOrEmpty(codeRule)){ if(!Strings.isNullOrEmpty(codeRule)){
BarcodeRule barcodeRule = BarcodeRule.newRule(codeRule); BarcodeRule barcodeRule = BarcodeRule.newRule(codeRule);
...@@ -54,7 +61,7 @@ public class BarcodeSettingsController extends SettingsController { ...@@ -54,7 +61,7 @@ public class BarcodeSettingsController extends SettingsController {
oldSettings.setCodeRuleList(settings.getCodeRuleList()); oldSettings.setCodeRuleList(settings.getCodeRuleList());
dataCache.updateSettings(oldSettings); dataCache.updateSettings(oldSettings);
saveMessage(request, getText("storage.saveSuccess", request.getLocale())); saveMessage(request, getText("storage.saveSuccess", request.getLocale()));
return "redirect:/barcode/barcodeSettings.html"; return "redirect:barcodeSettings.html";
} catch (ValidateException e) { } catch (ValidateException e) {
handValidateException(e, request); handValidateException(e, request);
} }
......
...@@ -289,17 +289,17 @@ public class VerticalBoxController extends BaseController{ ...@@ -289,17 +289,17 @@ public class VerticalBoxController extends BaseController{
public VerticalBoxOperateBean currentTask(HttpServletRequest request) { public VerticalBoxOperateBean currentTask(HttpServletRequest request) {
String cid = request.getParameter("cid"); String cid = request.getParameter("cid");
DataLog currentTask = verticalBoxHandler.getCurrentTask(cid); DataLog currentTask = verticalBoxHandler.getCurrentTask(cid);
// if(currentTask == null){ if(currentTask == null){
// //测试使用 //测试使用
// Collection<DataLog> queueTasks = taskService.getQueueTasks(cid); Collection<DataLog> queueTasks = taskService.getQueueTasks(cid);
// for (DataLog queueTask : queueTasks) { for (DataLog queueTask : queueTasks) {
// queueTask.setStatus(StorageConstants.OP_STATUS.EXECUTING.name()); queueTask.setStatus(StorageConstants.OP_STATUS.EXECUTING.name());
// taskService.updateQueueTask(queueTask); taskService.updateQueueTask(queueTask);
// verticalBoxHandler.updateCurrentTask(queueTask.getCid(), queueTask); verticalBoxHandler.updateCurrentTask(queueTask.getCid(), queueTask);
// break; break;
// } }
// currentTask = verticalBoxHandler.getCurrentTask(cid); currentTask = verticalBoxHandler.getCurrentTask(cid);
// } }
if(currentTask != null){ if(currentTask != null){
VerticalBoxOperateBean operateBean = new VerticalBoxOperateBean(); VerticalBoxOperateBean operateBean = new VerticalBoxOperateBean();
operateBean.setCurrentTask(currentTask); operateBean.setCurrentTask(currentTask);
......
...@@ -45,6 +45,11 @@ public class DataCache{ ...@@ -45,6 +45,11 @@ public class DataCache{
* 松下 * 松下
*/ */
public static String PANACIM = "Pana"; public static String PANACIM = "Pana";
/**
* 闵行航天803研究所
*/
public static String H803 = "803";
} }
/** /**
......
...@@ -336,7 +336,7 @@ public class StorageDataController extends BaseController { ...@@ -336,7 +336,7 @@ public class StorageDataController extends BaseController {
boolean needReFind = false;//是否需要重新查找 boolean needReFind = false;//是否需要重新查找
//检查锡膏夹具上面是否有未达到回温时间锡膏,有的话是不能出库的 //检查锡膏夹具上面是否有未达到回温时间锡膏,有的话是不能出库的
Barcode barcode = pos.getBarcode(); Barcode barcode = pos.getBarcode();
if(barcode != null && StorageConstants.PACKAGE_TYPE.SOLDER_FIXTURE.getCode().equals(barcode.getFixtureNumber())){ if(barcode != null && barcode.isSolder()){
List<StoragePos> solderPoses = storagePosManager.findByLabel(pos.getStorageId(), pos.getLabelStr()); List<StoragePos> solderPoses = storagePosManager.findByLabel(pos.getStorageId(), pos.getLabelStr());
for (StoragePos solderPos : solderPoses) { for (StoragePos solderPos : solderPoses) {
Barcode posBarcode = solderPos.getBarcode(); Barcode posBarcode = solderPos.getBarcode();
......
...@@ -308,55 +308,19 @@ public class TaskService implements ITaskService { ...@@ -308,55 +308,19 @@ public class TaskService implements ITaskService {
return statusBean; return statusBean;
} }
private Barcode findFixtureCode(Collection<CodeBean> codeBeans) throws ValidateException { private Barcode resolveBarcode(String barcodeStr)throws ValidateException {
Collection<CodeBean> codeBeans = dataCache.resolveCodeStr(barcodeStr);
if(codeBeans.isEmpty()){ if(codeBeans.isEmpty()){
log.info("未扫描到条码"); log.info("未扫描到条码");
throw new ValidateException("error.barcode.empty","未扫描到条码"); throw new ValidateException("error.barcode.empty","未扫描到条码");
} }
Barcode fixtureCode = null;
for (CodeBean codeBean : codeBeans) {
Barcode barcode = codeBean.getBarcode();
if(codeBean.isFixtureCode()){
if (fixtureCode == null) {
fixtureCode = barcode;
log.info("找到夹具编码:"+ fixtureCode.getBarcode());
}else{
log.info("出现两个夹具编码["+fixtureCode.getBarcode()+"]和["+barcode.getBarcode()+"]");
throw new ValidateException("error.barcode.many",new String[]{fixtureCode.getBarcode(), barcode.getBarcode()});
}
}else{
if(barcode == null){
log.info("条码为空,Error:"+ codeBean.getError());
}else{
log.info(barcode.getBarcode() + "不是夹具" + "codeBean Error:" + codeBean.getError() + " type:"+ barcode.getType());
}
}
}
return fixtureCode;
}
private Barcode resolveBarcode(String barcodeStr)throws ValidateException {
Collection<CodeBean> codeBeans = dataCache.resolveCodeStr(barcodeStr);
Barcode fixtureCode = findFixtureCode(codeBeans);
List<Barcode> allBarcode = Lists.newArrayList(); List<Barcode> allBarcode = Lists.newArrayList();
for (CodeBean codeBean : codeBeans) { for (CodeBean codeBean : codeBeans) {
if(!codeBean.isFixtureCode()){
if(codeBean.getError() == null){ if(codeBean.getError() == null){
Barcode barcode = codeBean.getBarcode(); Barcode barcode = codeBean.getBarcode();
if(barcode != null){ if(barcode != null){
if(fixtureCode != null){//有夹具条码,判断夹具与编码是否一致
//物料对应无夹具,或夹具与此夹具不一致,不可放入
if(Strings.isNullOrEmpty(barcode.getFixtureNumber()) || !fixtureCode.getPartNumber().equals(barcode.getFixtureNumber())){
throw new ValidateException(barcode.getPartNumber() + "不能放入夹具"+fixtureCode.getPartNumber()+"中");
}
fixtureCode.addRelationCode(barcode.getBarcode());
}else{
//条码中无夹具,但物料需要放入夹具
if(!Strings.isNullOrEmpty(barcode.getFixtureNumber())){
throw new ValidateException(barcode.getPartNumber() + "需要放入对应夹具中才可入库");
}
}
allBarcode.add(barcode); allBarcode.add(barcode);
} }
}else{ }else{
...@@ -365,16 +329,9 @@ public class TaskService implements ITaskService { ...@@ -365,16 +329,9 @@ public class TaskService implements ITaskService {
} }
}
//有夹具条码,可以直接返回
if(fixtureCode != null){
return fixtureCode;
}
int codeSize = allBarcode.size(); int codeSize = allBarcode.size();
if(codeSize == 0){ if(codeSize == 0){
throw new ValidateException("error.barcode.invalid",barcodeStr + "不是有效的条码"); throw new ValidateException("error.barcode.invalid",new String[]{barcodeStr},barcodeStr + "不是有效的条码");
}else if(codeSize > 1){ }else if(codeSize > 1){
throw new ValidateException("error.barcode.many","找到多个有效条码,无法入库"); throw new ValidateException("error.barcode.many","找到多个有效条码,无法入库");
} }
...@@ -1010,6 +967,7 @@ public class TaskService implements ITaskService { ...@@ -1010,6 +967,7 @@ public class TaskService implements ITaskService {
synchronized (storage){ synchronized (storage){
//log.info("reqseq:"+statusBean.getSeq()); //log.info("reqseq:"+statusBean.getSeq());
StatusBean resultStatus = saveStatus(statusBean); StatusBean resultStatus = saveStatus(statusBean);
if(storage.isVerticalBox()){ if(storage.isVerticalBox()){
//垂直货柜 //垂直货柜
return verticalBoxHandler.handleClientStatusBean(statusBean); return verticalBoxHandler.handleClientStatusBean(statusBean);
...@@ -1018,12 +976,49 @@ public class TaskService implements ITaskService { ...@@ -1018,12 +976,49 @@ public class TaskService implements ITaskService {
statusBean = handleClientStatusBean(statusBean); statusBean = handleClientStatusBean(statusBean);
if(storage.isSolderPaste()){ if(statusBean.getOp() == StorageConstants.OP.ALARM_DATA){
return handleSolderPaste(cid, statusBean); log.info("获取温湿度报警值");
statusBean.setTemperature(dataCache.getSettings().getMaxTemperature());
statusBean.setHumidity(dataCache.getSettings().getMaxHumidity());
resultStatus = statusBean;
return resultStatus;
}else if(dataCache.needUpdateHumidiy(cid)){
log.info("发送温湿度报警值");
statusBean.setTemperature(dataCache.getSettings().getMaxTemperature());
statusBean.setHumidity(dataCache.getSettings().getMaxHumidity());
resultStatus = statusBean;
return resultStatus;
} }
//料柜
if(storage.isCabinet() || storage.isShelf() || storage.isAccShelf() || storage.isCodeShelf()){ if(storage.isCabinet() || storage.isShelf() || storage.isAccShelf() || storage.isCodeShelf()){
//料柜和料架
return handleShelfAndCabinet(storage, statusBean);
}
if(storage.isSolderPaste()){
StatusBean result = handleSolderPaste(cid, statusBean);
if(result != null){
return result;
}
}
if(statusBean.getOp() == StorageConstants.OP.PUT_IN){
log.debug("入库:"+mapper.writeValueAsString(statusBean));
resultStatus = putInLine(storage, statusBean);
}else {
//查看是否有要出库的操作
resultStatus = checkOut(storage, resultStatus);
}
//log.info(mapper.writeValueAsString(resultStatus));
return resultStatus;
}
} catch (Exception e) {
log.error("", e);
}
return null;
}
private StatusBean handleShelfAndCabinet(Storage storage, StatusBean statusBean){
String cardResult = statusBean.getFromData("cardResult"); String cardResult = statusBean.getFromData("cardResult");
if(!Strings.isNullOrEmpty(cardResult)){ if(!Strings.isNullOrEmpty(cardResult)){
//写入卡片完成,后续再加密解密,暂就先使用用户名=授权码 //写入卡片完成,后续再加密解密,暂就先使用用户名=授权码
...@@ -1043,7 +1038,7 @@ public class TaskService implements ITaskService { ...@@ -1043,7 +1038,7 @@ public class TaskService implements ITaskService {
//出库任务开灯或者开门 //出库任务开灯或者开门
Collection<DataLog> areaWaitTasks = taskMap.values(); Collection<DataLog> areaWaitTasks = taskMap.values();
for (DataLog task : areaWaitTasks) { for (DataLog task : areaWaitTasks) {
if(cid.equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){ if(storage.getCid().equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){
//加入到正在执行的列表中 //加入到正在执行的列表中
statusBean.addData("open", task.getPosName()); statusBean.addData("open", task.getPosName());
//从等待列表中删除,加入到执行列表中 //从等待列表中删除,加入到执行列表中
...@@ -1055,35 +1050,6 @@ public class TaskService implements ITaskService { ...@@ -1055,35 +1050,6 @@ public class TaskService implements ITaskService {
return statusBean; return statusBean;
} }
if(statusBean.getOp() == StorageConstants.OP.ALARM_DATA){
log.info("获取温湿度报警值");
statusBean.setTemperature(dataCache.getSettings().getMaxTemperature());
statusBean.setHumidity(dataCache.getSettings().getMaxHumidity());
resultStatus = statusBean;
} else if(statusBean.getOp() == StorageConstants.OP.PUT_IN){
log.debug("入库:"+mapper.writeValueAsString(statusBean));
resultStatus = putInLine(storage, statusBean);
}else {
if(dataCache.needUpdateHumidiy(cid)){
log.info("发送温湿度报警值");
statusBean.setTemperature(dataCache.getSettings().getMaxTemperature());
statusBean.setHumidity(dataCache.getSettings().getMaxHumidity());
resultStatus = statusBean;
}else{
//查看是否有要出库的操作
resultStatus = checkOut(storage, resultStatus);
}
}
//log.info(mapper.writeValueAsString(resultStatus));
return resultStatus;
}
} catch (Exception e) {
log.error("", e);
}
return null;
}
/** /**
* 处理锡膏料仓相关信息 * 处理锡膏料仓相关信息
*/ */
...@@ -1092,7 +1058,7 @@ public class TaskService implements ITaskService { ...@@ -1092,7 +1058,7 @@ public class TaskService implements ITaskService {
//锡膏料仓空闲 //锡膏料仓空闲
Collection<DataLog> areaWaitTasks = taskMap.values(); Collection<DataLog> areaWaitTasks = taskMap.values();
for (DataLog task : areaWaitTasks) { for (DataLog task : areaWaitTasks) {
if(cid.equals(task.getCid())&& task.isWait()){ if(cid.equals(task.getCid()) && task.isWait()){
if(task.isRewarmTakingTask()){ if(task.isRewarmTakingTask()){
//回温取料任务 //回温取料任务
statusBean.setOp(StorageConstants.OP.REWARM_TAKING); statusBean.setOp(StorageConstants.OP.REWARM_TAKING);
...@@ -1121,14 +1087,14 @@ public class TaskService implements ITaskService { ...@@ -1121,14 +1087,14 @@ public class TaskService implements ITaskService {
statusBean.addData("mixTime", task.getMixTime() + ""); statusBean.addData("mixTime", task.getMixTime() + "");
task.setStatus(StorageConstants.OP_STATUS.EXECUTING.name()); task.setStatus(StorageConstants.OP_STATUS.EXECUTING.name());
taskMap.put(task.getId(), task);
dataLogDao.save(task); dataLogDao.save(task);
taskMap.put(task.getId(), task);
return statusBean; return statusBean;
} }
} }
} }
} }
return statusBean; return null;
} }
/** /**
...@@ -1352,6 +1318,10 @@ public class TaskService implements ITaskService { ...@@ -1352,6 +1318,10 @@ public class TaskService implements ITaskService {
private void changeSolderStatus(String posId, int solderStatus) throws ValidateException { private void changeSolderStatus(String posId, int solderStatus) throws ValidateException {
StoragePos storagePos = storagePosManager.get(posId); StoragePos storagePos = storagePosManager.get(posId);
if(storagePos == null){
log.error("更改状态为["+solderStatus+"]时,未找到库位["+posId+"]");
return;
}
Barcode barcode = storagePos.getBarcode(); Barcode barcode = storagePos.getBarcode();
if(barcode != null && barcode.getSolderStatus() != solderStatus){ if(barcode != null && barcode.getSolderStatus() != solderStatus){
barcode.setSolderStatus(solderStatus); barcode.setSolderStatus(solderStatus);
...@@ -1693,7 +1663,6 @@ public class TaskService implements ITaskService { ...@@ -1693,7 +1663,6 @@ public class TaskService implements ITaskService {
dataLog.setStorageName(storage.getName()); dataLog.setStorageName(storage.getName());
dataLog.setBarcode(barcode.getBarcode()); dataLog.setBarcode(barcode.getBarcode());
dataLog.setMemo(barcode.getMemo()); dataLog.setMemo(barcode.getMemo());
dataLog.setRelationCodes(barcode.getRelationCodes());
dataLog.setType(StorageConstants.OP.PUT_IN); dataLog.setType(StorageConstants.OP.PUT_IN);
dataLog.setNum(barcode.getAmount()); dataLog.setNum(barcode.getAmount());
...@@ -1742,10 +1711,12 @@ public class TaskService implements ITaskService { ...@@ -1742,10 +1711,12 @@ public class TaskService implements ITaskService {
} }
barcode.setNeedOutDate(null); barcode.setNeedOutDate(null);
} }
if(Strings.isNullOrEmpty(barcode.getProviderNumber())){//补上供应商编号 // if(Strings.isNullOrEmpty(barcode.getProviderNumber())){//补上供应商编号
Component component = componentManager.findByPartNumber(barcode.getPartNumber()); // Component component = componentManager.findByPartNumber(barcode.getPartNumber());
barcode.setProviderNumber(component.getProviderNumber()); // if(component != null){
} // barcode.setProviderNumber(component.getProviderNumber());
// }
// }
barcodeManager.save(barcode); barcodeManager.save(barcode);
......
package com.myproject.webapp.controller.webService.boxHandler;
import com.google.common.base.Strings;
import com.myproject.bean.update.DataLog;
import com.myproject.bean.update.StoragePos;
import com.myproject.bean.utils.BoxStatusBean;
import com.myproject.bean.utils.StatusBean;
import com.myproject.dao.mongo.IDataLogDao;
import com.myproject.manager.IStoragePosManager;
import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.webService.TaskService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by sunke on 2020/8/5.
* 夹具出入库处理
*/
@Service
public class FixtureHandler {
protected final transient Logger log = LogManager.getLogger(getClass());
@Autowired
protected TaskService taskService;
@Autowired
private IStoragePosManager storagePosManager;
@Autowired
private IDataLogDao dataLogDao;
/**
* 当前出入库操作的库位(key为cid, value为当前执行的任务)
*/
private Map<String,DataLog> operateTaskMap = new ConcurrentHashMap<>();
/**
* 获取当前正在执行的任务
*/
public DataLog getCurrentTask(String cid){
return operateTaskMap.get(cid);
}
/**
* 更新或清理(task为null)当前正在执行的任务
*/
public void updateCurrentTask(String cid, DataLog task){
if(task == null){
operateTaskMap.remove(cid);
}else{
operateTaskMap.put(cid, task);
}
}
public StatusBean handleClientStatusBean(StatusBean statusBean){
String cid = statusBean.getCid();
Collection<DataLog> queueTasks = taskService.getQueueTasks(cid);
if(queueTasks.isEmpty()){
return statusBean;
}
if(statusBean.getStatus() == StorageConstants.STATUS.READY){
for (DataLog task : queueTasks) {
if (cid.equals(task.getCid()) && task.isWait()) {
if(task.isPutInTask()){
statusBean.setOp(StorageConstants.OP.PUT_IN);
}else if(task.isCheckOutTask()){
statusBean.setOp(StorageConstants.OP.CHECKOUT);
}
StoragePos pos = storagePosManager.getByPosName(task.getPosName());
if(pos.isExpandPos()){
pos = storagePosManager.get(pos.getHostPosId());
}
statusBean.addPosInfo("",pos.getPosName(),pos.getW(),pos.getH(),false);
log.info("发送到["+task.getType()+"]任务["+pos.getPosName()+"]到客户端");
task.setStatus(StorageConstants.OP_STATUS.EXECUTING.name());
taskService.updateQueueTask(task);
updateCurrentTask(task.getCid(),task);
dataLogDao.save(task);
return statusBean;
}
}
}
Map<Integer, BoxStatusBean> statusOfBoxes = statusBean.getBoxStatus();
if (statusOfBoxes != null) {
for (BoxStatusBean boxStatus : statusOfBoxes.values()) {
try {
//出库入库动作完成处理
int status = boxStatus.getStatus();
String posName = boxStatus.getPosId();
if(!Strings.isNullOrEmpty(posName)){//客户端发一次完成之后,会发空的 posName,不需要处理
boolean needShow = false;
if (StorageConstants.BOX_STATUS.IN_FINISHED == status) {//入仓完成
needShow = true;
//弹出入库框
} else if (StorageConstants.BOX_STATUS.OUT_FINISHED == status) {//出仓完成
//弹出出库框
needShow = true;
}
if(needShow){
DataLog currentTask = null;
for (DataLog queueTask : queueTasks) {
if(queueTask.isExecuting() && queueTask.getPosName().equals(posName)){
currentTask = queueTask;
break;
}
}
DataLog cacheTask = operateTaskMap.get(cid);
if(currentTask != null){
if(cacheTask == null || !cacheTask.getId().equals(currentTask.getId())){
updateCurrentTask(currentTask.getCid(),currentTask);
}
}
}
}
} catch (Exception e) {
log.error("垂直货柜到位时出错",e);
}
}
}
return statusBean;
}
}
...@@ -309,6 +309,9 @@ cabinet.error.noOp=No operation during door opening period ...@@ -309,6 +309,9 @@ cabinet.error.noOp=No operation during door opening period
op.1=Material Receiving op.1=Material Receiving
op.2=Material Retrieval op.2=Material Retrieval
op.6=Rewarm Taking
op.7=Rewarm Putting
op.8=Mix
op.status.none= op.status.none=
op.status.wait=In Process op.status.wait=In Process
op.status.executing=In Operation op.status.executing=In Operation
...@@ -404,11 +407,11 @@ error.barcode.executing=The task of barcode [{0}] is executing. ...@@ -404,11 +407,11 @@ error.barcode.executing=The task of barcode [{0}] is executing.
error.pos.notExist=The location [{0}] in the storage is not exist. error.pos.notExist=The location [{0}] in the storage is not exist.
error.pos.hasReel=There is already one reel in the location [{0}]. error.pos.hasReel=There is already one reel in the location [{0}].
error.pos.wrong=The location [{0}] does not match the storage [{1}] error.pos.wrong=The location [{0}] does not match the storage [{1}]
error.pos.sizeNotMatch=The size[{0}] of the reel is not matching the size [{2}]of the location {1} error.pos.sizeNotMatch=The size[{0}] is not matching the size [{2}]of the location {1}
error.barcode.invalid=The barcode [{0}] is invalid. error.barcode.invalid=The barcode [{0}] is invalid.
error.barcode.expired=The reel is expired. error.barcode.expired=The reel is expired.
error.barcode.wrongQty=The quantity [{1}] of the reel[{0}] is invalid. error.barcode.wrongQty=The quantity [{1}] of the reel[{0}] is invalid.
error.barcode.inStorage=The reel [{0}] is already in the location [2] of the stroage [1] error.barcode.inStorage=The reel [{0}] is already in the location [{2}] of the stroage [1]
error.barcode.noRule=There is no rule of the barcode is setted. error.barcode.noRule=There is no rule of the barcode is setted.
error.barcode.wrongLength=The code string [{0}] has wrong length. error.barcode.wrongLength=The code string [{0}] has wrong length.
error.barcode.noField=There is no {0} field in the code string. error.barcode.noField=There is no {0} field in the code string.
......
...@@ -379,11 +379,11 @@ error.barcode.executing=The task of barcode [{0}] is executing. ...@@ -379,11 +379,11 @@ error.barcode.executing=The task of barcode [{0}] is executing.
error.pos.notExist=The location [{0}] in the storage is not exist. error.pos.notExist=The location [{0}] in the storage is not exist.
error.pos.hasReel=There is already one reel in the location [{0}]. error.pos.hasReel=There is already one reel in the location [{0}].
error.pos.wrong=The location [{0}] does not match the storage [{1}] error.pos.wrong=The location [{0}] does not match the storage [{1}]
error.pos.sizeNotMatch=The size[{0}] of the reel is not matching the size [{2}]of the location {1} error.pos.sizeNotMatch=The size[{0}] is not matching the size [{2}]of the location {1}
error.barcode.invalid=The barcode [{0}] is invalid. error.barcode.invalid=The barcode [{0}] is invalid.
error.barcode.expired=The reel is expired. error.barcode.expired=The reel is expired.
error.barcode.wrongQty=The quantity [{1}] of the reel[{0}] is invalid. error.barcode.wrongQty=The quantity [{1}] of the reel[{0}] is invalid.
error.barcode.inStorage=The reel [{0}] is already in the location [2] of the stroage [1] error.barcode.inStorage=The reel [{0}] is already in the location [{2}] of the stroage [1]
error.barcode.noRule=There is no rule of the barcode is setted. error.barcode.noRule=There is no rule of the barcode is setted.
error.barcode.wrongLength=The code string [{0}] has wrong length. error.barcode.wrongLength=The code string [{0}] has wrong length.
error.barcode.noField=There is no {0} field in the code string. error.barcode.noField=There is no {0} field in the code string.
...@@ -424,3 +424,6 @@ solder.status.4=Strring ...@@ -424,3 +424,6 @@ solder.status.4=Strring
solder.status.5=Waiting shipment solder.status.5=Waiting shipment
solder.status.6=Outting solder.status.6=Outting
solder.status.7=Retreat storage solder.status.7=Retreat storage
op.6=Rewarm Taking
op.7=Rewarm Putting
op.8=Mix
...@@ -375,11 +375,11 @@ error.barcode.executing=\u6761\u7801[{0}]\u7684\u4EFB\u52A1\u6B63\u5728\u6267\u8 ...@@ -375,11 +375,11 @@ error.barcode.executing=\u6761\u7801[{0}]\u7684\u4EFB\u52A1\u6B63\u5728\u6267\u8
error.pos.notExist=\u5E93\u4F4D\u3010{0}\u3011\u4E0D\u5B58\u5728,\u65E0\u6CD5\u5165\u5E93 error.pos.notExist=\u5E93\u4F4D\u3010{0}\u3011\u4E0D\u5B58\u5728,\u65E0\u6CD5\u5165\u5E93
error.pos.hasReel=\u5E93\u4F4D\u3010{0}\u3011\u4E2D\u5DF2\u6709\u7269\u6599,\u65E0\u6CD5\u5165\u5E93 error.pos.hasReel=\u5E93\u4F4D\u3010{0}\u3011\u4E2D\u5DF2\u6709\u7269\u6599,\u65E0\u6CD5\u5165\u5E93
error.pos.wrong=\u5E93\u4F4D\u3010{0}\u3011\u4E0E\u6599\u4ED3[{1}]\u4E0D\u5339\u914D,\u65E0\u6CD5\u5165\u5E93 error.pos.wrong=\u5E93\u4F4D\u3010{0}\u3011\u4E0E\u6599\u4ED3[{1}]\u4E0D\u5339\u914D,\u65E0\u6CD5\u5165\u5E93
error.pos.sizeNotMatch=\u6599\u76D8\u5C3A\u5BF8[{0}]\u4E0E\u5E93\u4F4D{1}\u5C3A\u5BF8[{2}]\u4E0D\u7B26,\u65E0\u6CD5\u5165\u5E93 error.pos.sizeNotMatch=\u5C3A\u5BF8[{0}]\u4E0E\u5E93\u4F4D{1}\u5C3A\u5BF8[{2}]\u4E0D\u7B26,\u65E0\u6CD5\u5165\u5E93
error.barcode.invalid={0} \u4E0D\u662F\u6709\u6548\u7684\u6761\u7801 error.barcode.invalid={0} \u4E0D\u662F\u6709\u6548\u7684\u6761\u7801
error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93. error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93.
error.barcode.wrongQty=\u6599\u76D8[{0}]\u6570\u91CF[{1}]\u9519\u8BEF. error.barcode.wrongQty=\u7269\u6599[{0}]\u6570\u91CF[{1}]\u9519\u8BEF.
error.barcode.inStorage=\u6599\u76D8[0]\u5DF2\u5728\u6599\u4ED3[1]\u7684\u5E93\u4F4D[2]\u4E2D error.barcode.inStorage=\u7269\u6599[{0}]\u5DF2\u5728\u6599\u4ED3[{1}]\u7684\u5E93\u4F4D[{2}]\u4E2D
error.barcode.noRule=\u6761\u7801\u89E3\u6790\u89C4\u5219\u672A\u5B9A\u4E49 error.barcode.noRule=\u6761\u7801\u89E3\u6790\u89C4\u5219\u672A\u5B9A\u4E49
error.barcode.wrongLength=\u6761\u7801[{0}]\u957F\u5EA6\u9519\u8BEF error.barcode.wrongLength=\u6761\u7801[{0}]\u957F\u5EA6\u9519\u8BEF
error.barcode.noField=\u6761\u7801\u89E3\u6790\u5931\u8D25,\u672A\u627E\u5230{0}\u5B57\u6BB5 error.barcode.noField=\u6761\u7801\u89E3\u6790\u5931\u8D25,\u672A\u627E\u5230{0}\u5B57\u6BB5
...@@ -420,3 +420,7 @@ solder.status.4=\u9032\u884C\u4E2D\u306E\u30DF\u30AD\u30B7\u30F3\u30B0 ...@@ -420,3 +420,7 @@ solder.status.4=\u9032\u884C\u4E2D\u306E\u30DF\u30AD\u30B7\u30F3\u30B0
solder.status.5=\u5165\u8377\u5F85\u3061 solder.status.5=\u5165\u8377\u5F85\u3061
solder.status.6=\u4FDD\u7BA1\u5834\u6240\u306E\u5916 solder.status.6=\u4FDD\u7BA1\u5834\u6240\u306E\u5916
solder.status.7=\u30EA\u30C8\u30EA\u30FC\u30C8\u53CE\u7D0D solder.status.7=\u30EA\u30C8\u30EA\u30FC\u30C8\u53CE\u7D0D
op.6=\u56DE\u6E29\u53D6\u6599
op.7=\u56DE\u6E29\u653E\u6599
op.8=\u6405\u62CC
delete.confirm=\u786E\u5B9A\u8981\u5220\u9664\u5417?
\ No newline at end of file \ No newline at end of file
...@@ -375,11 +375,11 @@ error.barcode.executing=\u6761\u7801[{0}]\u7684\u4EFB\u52A1\u6B63\u5728\u6267\u8 ...@@ -375,11 +375,11 @@ error.barcode.executing=\u6761\u7801[{0}]\u7684\u4EFB\u52A1\u6B63\u5728\u6267\u8
error.pos.notExist=\u5E93\u4F4D\u3010{0}\u3011\u4E0D\u5B58\u5728,\u65E0\u6CD5\u5165\u5E93 error.pos.notExist=\u5E93\u4F4D\u3010{0}\u3011\u4E0D\u5B58\u5728,\u65E0\u6CD5\u5165\u5E93
error.pos.hasReel=\u5E93\u4F4D\u3010{0}\u3011\u4E2D\u5DF2\u6709\u7269\u6599,\u65E0\u6CD5\u5165\u5E93 error.pos.hasReel=\u5E93\u4F4D\u3010{0}\u3011\u4E2D\u5DF2\u6709\u7269\u6599,\u65E0\u6CD5\u5165\u5E93
error.pos.wrong=\u5E93\u4F4D\u3010{0}\u3011\u4E0E\u6599\u4ED3[{1}]\u4E0D\u5339\u914D,\u65E0\u6CD5\u5165\u5E93 error.pos.wrong=\u5E93\u4F4D\u3010{0}\u3011\u4E0E\u6599\u4ED3[{1}]\u4E0D\u5339\u914D,\u65E0\u6CD5\u5165\u5E93
error.pos.sizeNotMatch=\u6599\u76D8\u5C3A\u5BF8[{0}]\u4E0E\u5E93\u4F4D{1}\u5C3A\u5BF8[{2}]\u4E0D\u7B26,\u65E0\u6CD5\u5165\u5E93 error.pos.sizeNotMatch=\u5C3A\u5BF8[{0}]\u4E0E\u5E93\u4F4D{1}\u5C3A\u5BF8[{2}]\u4E0D\u7B26,\u65E0\u6CD5\u5165\u5E93
error.barcode.invalid={0} \u4E0D\u662F\u6709\u6548\u7684\u6761\u7801 error.barcode.invalid={0} \u4E0D\u662F\u6709\u6548\u7684\u6761\u7801
error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93. error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93.
error.barcode.wrongQty=\u6599\u76D8[{0}]\u6570\u91CF[{1}]\u9519\u8BEF. error.barcode.wrongQty=\u7269\u6599[{0}]\u6570\u91CF[{1}]\u9519\u8BEF.
error.barcode.inStorage=\u6599\u76D8[0]\u5DF2\u5728\u6599\u4ED3[1]\u7684\u5E93\u4F4D[2]\u4E2D error.barcode.inStorage=\u7269\u6599[{0}]\u5DF2\u5728\u6599\u4ED3[{1}]\u7684\u5E93\u4F4D[{2}]\u4E2D
error.barcode.noRule=\u6761\u7801\u89E3\u6790\u89C4\u5219\u672A\u5B9A\u4E49 error.barcode.noRule=\u6761\u7801\u89E3\u6790\u89C4\u5219\u672A\u5B9A\u4E49
error.barcode.wrongLength=\u6761\u7801[{0}]\u957F\u5EA6\u9519\u8BEF error.barcode.wrongLength=\u6761\u7801[{0}]\u957F\u5EA6\u9519\u8BEF
error.barcode.noField=\u6761\u7801\u89E3\u6790\u5931\u8D25,\u672A\u627E\u5230{0}\u5B57\u6BB5 error.barcode.noField=\u6761\u7801\u89E3\u6790\u5931\u8D25,\u672A\u627E\u5230{0}\u5B57\u6BB5
...@@ -420,3 +420,7 @@ solder.status.4=\u6405\u62CC\u4E2D ...@@ -420,3 +420,7 @@ solder.status.4=\u6405\u62CC\u4E2D
solder.status.5=\u5F85\u51FA\u5E93 solder.status.5=\u5F85\u51FA\u5E93
solder.status.6=\u51FA\u5E93\u4E2D solder.status.6=\u51FA\u5E93\u4E2D
solder.status.7=\u9000\u5E93\u5B58\u50A8 solder.status.7=\u9000\u5E93\u5B58\u50A8
op.6=\u56DE\u6E29\u53D6\u6599
op.7=\u56DE\u6E29\u653E\u6599
op.8=\u6405\u62CC
delete.confirm=\u786E\u5B9A\u8981\u5220\u9664\u5417?
\ No newline at end of file \ No newline at end of file
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<%@include file="/common/success.jsp"%>
<%@include file="/common/error.jsp"%>
<form:form commandName="settings" class="form-horizontal form-bordered" id="settings" action="barcodeSettings.html"> <form:form commandName="settings" class="form-horizontal form-bordered" id="settings" action="barcodeSettings.html">
<form:hidden path="id"/> <form:hidden path="id"/>
<!-- BEGIN CHART PORTLET--> <!-- BEGIN CHART PORTLET-->
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
<%@include file="/common/success.jsp"%> <%@include file="/common/success.jsp"%>
<%@include file="/common/error.jsp"%> <%@include file="/common/error.jsp"%>
<c:if test='<%=!DataCache.isProductionFor("ChengDuKaiTian") %>'>
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-2"><fmt:message key="barcode.barcode"/></label> <label class="control-label col-md-2"><fmt:message key="barcode.barcode"/></label>
<div class="col-md-4"> <div class="col-md-4">
...@@ -104,113 +103,6 @@ ...@@ -104,113 +103,6 @@
</div> </div>
</div> </div>
</c:if>
<c:if test='<%=DataCache.isProductionFor("ChengDuKaiTian") %>'>
<div class="form-group">
<label class="control-label col-md-2"><fmt:message key="component.auto.scancode"/></label>
<div class="col-md-8">
<div style="text-align:left">
<input type="text" id="scan-code" class="form-control" autofocus placeholder="产品型号@组件型号@配套单号@元器件型号@上级库位置号@检验编号@数量"/>
<span id="code-errors" style="color: red"></span>
</div>
</div>
</div>
<form:hidden id="partNumber" path="partNumber"/>
<div class="form-group">
<label class="control-label col-md-2"><fmt:message key="barcode.barcode"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" id="barcodeStr" path="barcode" class="form-control"/>
<span class="input-group-addon">
<a onclick="printFun();"><fmt:message key="barcode.print"/> </a>
</span>
<form:errors path="barcode" cssStyle="color: red"/>
</div>
</div>
<label class="control-label col-md-2"><fmt:message key="产品型号"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" path="otherField2" class="form-control" id="otherField2"/>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2"><fmt:message key="组件型号"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" path="otherField3" class="form-control" id="otherField3"/>
</div>
</div>
<label class="control-label col-md-2"><fmt:message key="配套单号"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" path="otherField1" class="form-control" id="otherField1"/>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2"><fmt:message key="元器件型号"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" path="otherField4" class="form-control" id="otherField4"/>
</div>
</div>
<label class="control-label col-md-2"><fmt:message key="检验编号"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" path="otherField5" class="form-control" id="otherField5"/>
</div>
</div>
</div>
<div class="form-group extraInfo">
<label class="control-label col-md-2"><fmt:message key="barcode.amount"/></label>
<div class="col-md-4">
<div style="text-align:left" class="input-group">
<form:input type="text" id="amount" path="amount" class="form-control"/>
</div>
</div>
<form:hidden id="plateSize" path="plateSize"/>
<form:hidden id="height" path="height"/>
<label class="control-label col-md-2"><fmt:message key="barcode.plateSize"/></label>
<div class="col-md-4">
<select class="form-control input-small" id="size">
<option value="7x8">7 x 8</option>
<option value="7x12">7 x 12</option>
<option value="7x16">7 x 16</option>
<option value="8x20"selected="true">散料夹具</option>
<option value="8.0x20" >格料夹具</option>
</select>
</div>
</div>
<div class="form-group extraInfo">
<%--备注--%>
<label class="control-label col-md-2"><fmt:message key="备注"/></label>
<div class="col-md-6">
<form:textarea id="description" path="otherField6" class="form-control"/>
</div>
</div>
</c:if>
<div class="form-actions"> <div class="form-actions">
<div class="row"> <div class="row">
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<c:set var="limitCheckOut" value="${pos.locked || (pos.barcode.maxStorageTime != 0 && pos.inStoreHour * 60 + pos.inStoreMiniute <= pos.barcode.warmTime * 60)}"/> <c:set var="limitCheckOut" value="${pos.locked || (pos.barcode.maxStorageTime != 0 && pos.inStoreHour * 60 + pos.inStoreMiniute <= pos.barcode.warmTime * 60)}"/>
<display:column title="<input type='checkbox' id='allCheck'/>" media="html"> <display:column title="<input type='checkbox' id='allCheck'/>" media="html">
<c:if test="${!limitCheckOut}"> <c:if test="${!limitCheckOut}">
<input type="checkbox" name="posIds" value="${pos.id}" id="check${pos.id}" class="limit${pos.barcode.inFixture}"/> <input type="checkbox" name="posIds" value="${pos.id}" id="check${pos.id}" class="limit"/>
</c:if> </c:if>
</display:column> </display:column>
...@@ -217,13 +217,13 @@ ...@@ -217,13 +217,13 @@
<display:column property="barcode.memo" titleKey="barcode.memo"/> <display:column property="barcode.memo" titleKey="barcode.memo"/>
<display:column titleKey="checkOut.operate" media="html"> <display:column titleKey="checkOut.operate" media="html">
<c:if test="${!limitCheckOut}"> <c:if test="${!limitCheckOut}">
<button class="btn yellow limit${pos.barcode.inFixture}" id="btn${pos.id}" <button class="btn yellow limit" id="btn${pos.id}"
onclick="checkoutStorage('${pos.id}')"> onclick="checkoutStorage('${pos.id}')">
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button> <i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>
</c:if> </c:if>
</display:column> </display:column>
<c:if test="${limitCheckOut}"> <c:if test="${limitCheckOut}">
<c:set var="limitCodes" value="${pos.barcode.inFixture},${limitCodes}"/> <c:set var="limitCodes" value="${limitCodes}"/>
</c:if> </c:if>
</display:table> </display:table>
</div> </div>
......
...@@ -430,6 +430,12 @@ ...@@ -430,6 +430,12 @@
<fmt:message key="inOutList.out" var="out_label"/> <fmt:message key="inOutList.out" var="out_label"/>
<fmt:message key="dataLog.orderSource" var="source_label"/> <fmt:message key="dataLog.orderSource" var="source_label"/>
<fmt:message key="op.1" var="op_1"/>
<fmt:message key="op.2" var="op_2"/>
<fmt:message key="op.6" var="op_6"/>
<fmt:message key="op.7" var="op_7"/>
<fmt:message key="op.8" var="op_8"/>
<fmt:message key="alarm.inaction.title" var="inactionAlarmTitle"/> <fmt:message key="alarm.inaction.title" var="inactionAlarmTitle"/>
<fmt:message key="alarm.expire.title" var="expireAlarmTitle"/> <fmt:message key="alarm.expire.title" var="expireAlarmTitle"/>
<fmt:message key="alarm.store.title" var="storeAlarmTitle"/> <fmt:message key="alarm.store.title" var="storeAlarmTitle"/>
...@@ -666,6 +672,14 @@ ...@@ -666,6 +672,14 @@
}); });
}); });
var opLabelMap={
"op1":"${op_1}",
"op1":"${op_2}",
"op1":"${op_6}",
"op1":"${op_7}",
"op1":"${op_8}"
}
var allTasks = {}; var allTasks = {};
function updateTasks(){ function updateTasks(){
//任务列表 //任务列表
...@@ -686,8 +700,10 @@ ...@@ -686,8 +700,10 @@
var options = {}; var options = {};
//入库 //入库
var showStr = partNumber + " ["+barcode+"] ${in_label}" + posStr; //var showStr = partNumber + " ["+barcode+"] ${in_label}" + posStr;
var opLabel = opLabelMap["op_"+data[item].type]
var showStr = posStr+ opLabel + partNumber + "["+barcode+"]";
var status = data[item].status.toLowerCase(); var status = data[item].status.toLowerCase();
options['status'] = status; options['status'] = status;
...@@ -699,7 +715,7 @@ ...@@ -699,7 +715,7 @@
options['icon']='fa fa-download'; options['icon']='fa fa-download';
if(data[item].type == 2){//出库 if(data[item].type == 2){//出库
options['icon']='fa fa-upload'; options['icon']='fa fa-upload';
showStr = partNumber + "["+barcode+"]${out_label}" + posStr; //showStr = partNumber + "["+barcode+"]${out_label}" + posStr;
}else{ }else{
options['onClick']= modifyClick; options['onClick']= modifyClick;
} }
......
<%@ page import="com.myproject.util.StorageConstants" %> <%@ page import="com.myproject.util.StorageConstants" %>
<%@ page import="com.myproject.webapp.controller.webService.DataCache" %>
<%@ include file="/common/taglibs.jsp" %> <%@ include file="/common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %> <%@ page language="java" pageEncoding="UTF-8" %>
...@@ -118,13 +119,18 @@ ...@@ -118,13 +119,18 @@
<tr role="row"> <tr role="row">
<th></th> <th></th>
<th><fmt:message key="barcode.barcode"/></th> <th><fmt:message key="barcode.barcode"/></th>
<%--803研究所--%>
<c:if test="<%= DataCache.isProductionFor(DataCache.CUSTOMER.H803)%>">
<th><fmt:message key="规格型号"/></th>
</c:if>
<c:if test="<%= !DataCache.isProductionFor(DataCache.CUSTOMER.H803)%>">
<th><fmt:message key="barcode.partNumber"/></th> <th><fmt:message key="barcode.partNumber"/></th>
</c:if>
<th><fmt:message key="barcode.expireDate"/></th> <th><fmt:message key="barcode.expireDate"/></th>
<th><fmt:message key="checkOut.pos"/></th> <th><fmt:message key="checkOut.pos"/></th>
<th><fmt:message key="dataLog.status"/></th> <th><fmt:message key="dataLog.status"/></th>
<th><fmt:message key="solderBox.task.outTime"/></th> <th><fmt:message key="solderBox.task.outTime"/></th>
<%--<th><fmt:message key="状态"/></th>--%>
<%--<th><fmt:message key="dataLog.date"/></th>--%>
</tr> </tr>
</thead> </thead>
<tbody class="dataTable"> <tbody class="dataTable">
...@@ -181,6 +187,13 @@ ...@@ -181,6 +187,13 @@
<fmt:message key="allBoxView.boxStatus" var="boxStatus_label"/> <fmt:message key="allBoxView.boxStatus" var="boxStatus_label"/>
<fmt:message key="inOutList.in" var="in_label"/> <fmt:message key="inOutList.in" var="in_label"/>
<fmt:message key="inOutList.out" var="out_label"/> <fmt:message key="inOutList.out" var="out_label"/>
<fmt:message key="op.1" var="op_1"/>
<fmt:message key="op.2" var="op_2"/>
<fmt:message key="op.6" var="op_6"/>
<fmt:message key="op.7" var="op_7"/>
<fmt:message key="op.8" var="op_8"/>
<fmt:message key="dataLog.orderSource" var="source_label"/> <fmt:message key="dataLog.orderSource" var="source_label"/>
<fmt:message key="boxView.taskCancel" var="taskCancel_label"/> <fmt:message key="boxView.taskCancel" var="taskCancel_label"/>
...@@ -250,6 +263,14 @@ ...@@ -250,6 +263,14 @@
"7":"${solder_status_7}" "7":"${solder_status_7}"
}; };
var opLabelMap={
"op1":"${op_1}",
"op1":"${op_2}",
"op1":"${op_6}",
"op1":"${op_7}",
"op1":"${op_8}"
}
listNotEmpty = function(){ listNotEmpty = function(){
var str= ""; var str= "";
$("[name=posIds]").each(function(){ $("[name=posIds]").each(function(){
...@@ -386,7 +407,8 @@ ...@@ -386,7 +407,8 @@
newTasks.push(taskId); newTasks.push(taskId);
var options = {}; var options = {};
//入库 //入库
var showStr = posStr+"${in_label}"+ partNumber + "["+barcode+"]"; var opLabel = opLabelMap["op_"+data[item].type]
var showStr = posStr+ opLabel + partNumber + "["+barcode+"]";
var status = data[item].status.toLowerCase(); var status = data[item].status.toLowerCase();
...@@ -399,14 +421,14 @@ ...@@ -399,14 +421,14 @@
options['icon']='fa fa-database'; options['icon']='fa fa-database';
if(data[item].type == 2){//出库 if(data[item].type == 2){//出库
options['icon']='fa fa-sign-out'; options['icon']='fa fa-sign-out';
showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 6){//回温取料 }else if(data[item].type == 6){//回温取料
options['icon']='fa fa-sign-out'; options['icon']='fa fa-sign-out';
showStr = posStr+"${status_14}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_14}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 7){//出库 }else if(data[item].type == 7){//回温放料
showStr = posStr+"${status_16}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_16}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 8){//出库 }else if(data[item].type == 8){//搅拌
showStr = posStr+"${status_20}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_20}"+ partNumber + "["+barcode+"]";
}else{ }else{
//options['onClick']= modifyClick; //options['onClick']= modifyClick;
} }
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
defaultsort="1" class="table table-striped table-bordered table-hover" export="false"> defaultsort="1" class="table table-striped table-bordered table-hover" export="false">
<display:column property="name" escapeXml="true" titleKey="storage.name"/> <display:column property="name" escapeXml="true" titleKey="storage.name"/>
<display:column titleKey="storage.boxCount" property="boxCount"/> <display:column titleKey="storage.type" property="type"/>
<display:column titleKey="storage.slotAmount"> <display:column titleKey="storage.slotAmount">
${storage.totalSlots - storage.emptySlots} / ${storage.totalSlots} ${storage.totalSlots - storage.emptySlots} / ${storage.totalSlots}
</display:column> </display:column>
......
...@@ -416,15 +416,6 @@ ...@@ -416,15 +416,6 @@
if(data[item].type == 2){//出库 if(data[item].type == 2){//出库
options['icon']='fa fa-sign-out'; options['icon']='fa fa-sign-out';
showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]"; showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 6){//回温取料
options['icon']='fa fa-sign-out';
showStr = posStr+"回温取料"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 7){//出库
showStr = posStr+"回温放料"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 8){//出库
showStr = posStr+"搅拌"+ partNumber + "["+barcode+"]";
}else{
//options['onClick']= modifyClick;
} }
...@@ -608,7 +599,7 @@ ...@@ -608,7 +599,7 @@
$(this).attr("disabled", true); $(this).attr("disabled", true);
$("#scan-code").removeAttr("disabled"); $("#scan-code").removeAttr("disabled");
} }
showOperateWindow(); //showOperateWindow();
}); });
$("#scan-code").change(function () { $("#scan-code").change(function () {
...@@ -620,7 +611,7 @@ ...@@ -620,7 +611,7 @@
$("#scan-code").val(""); $("#scan-code").val("");
}); });
} }
showOperateWindow(); //showOperateWindow();
}); });
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!