Explorar el Código

限制B2工单必须采集IN后缀的条码

callm hace 2 años
padre
commit
8e5bfe93e7
Se han modificado 1 ficheros con 12 adiciones y 10 borrados
  1. 12 10
      src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

+ 12 - 10
src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

@@ -260,17 +260,19 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 		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")){
-				if(!barcode.substring(barcode.length()-2).equals("IN")||pr_code.length()==barcode.length()){
-					BaseUtil.showError("该工单不允许采集此条码,请采集IN后缀条码");
+			if(baseDao.getFieldDataByCondition("configs","data","caller='MESSetting' and  code='LD'").toString().equals("1")){
+				String ma_custcode=rs.getString("ma_custcode");
+				String barcode=bar_code.toString();
+				//如果是联迪B2工单号
+				if(ma_custcode.equals("W00397")){
+					if(!barcode.substring(barcode.length()-2).equals("IN")||pr_code.length()==barcode.length()){
+						BaseUtil.showError("该工单不允许采集此条码,请采集IN后缀条码");
+					}
 				}
-			}
-			if(barcode.substring(barcode.length()-2).equals("IN")){
-				if(!ma_custcode.equals("W00397")){
-					BaseUtil.showError("该工单不允许采集IN后缀条码,请采集其他条码");
+				if(barcode.substring(barcode.length()-2).equals("IN")){
+					if(!ma_custcode.equals("W00397")){
+						BaseUtil.showError("该工单不允许采集IN后缀条码,请采集其他条码");
+					}
 				}
 			}
 		}