|
|
@@ -2,6 +2,7 @@ package com.uas.mes.pda.service.impl;
|
|
|
|
|
|
import com.uas.mes.common.data.BaseDao;
|
|
|
import com.uas.mes.common.support.SystemSession;
|
|
|
+import com.uas.mes.common.util.BaseUtil;
|
|
|
import com.uas.mes.core.bind.Constant;
|
|
|
import com.uas.mes.core.data.SqlRowList;
|
|
|
import com.uas.mes.core.exception.APIErrorException;
|
|
|
@@ -256,9 +257,23 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
}
|
|
|
}
|
|
|
double ma_qty=0;
|
|
|
- rs = baseDao.queryForRowSet("select ma_qty from make where ma_id=?",map.get("MA_ID"));
|
|
|
+ rs = baseDao.queryForRowSet("select ma_qty,ma_custcode from make where ma_id=?",map.get("MA_ID"));
|
|
|
if(rs.next()){
|
|
|
ma_qty = rs.getDouble("ma_qty");
|
|
|
+ String ma_custcode=rs.getString("ma_custcode");
|
|
|
+ String barcode=bar_code.toString();
|
|
|
+ //如果是联迪B2工单号
|
|
|
+ if(ma_custcode.equals("W00397")||pr_code.length()==barcode.length()){
|
|
|
+ System.out.printf(barcode.substring(barcode.length()-2));
|
|
|
+ if(!barcode.substring(barcode.length()-2).equals("IN")){
|
|
|
+ BaseUtil.showError("该工单不允许采集此条码,请采集IN后缀条码");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(barcode.substring(barcode.length()-2).equals("IN")){
|
|
|
+ if(!ma_custcode.equals("W00397")){
|
|
|
+ BaseUtil.showError("该工单不允许采集IN后缀条码,请采集其他条码");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* @author wuyx
|