|  |  | @ -57,8 +57,8 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } else { |  |  |  |                             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 serialNo = null; |  |  |  |                                 serialNo = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                             } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         }else{ |  |  |  |                         } else { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             if (last.length() >= 10 && last.substring(8, 10).equals("21")){ |  |  |  |                             if (last.length() >= 10 && last.substring(8, 10).equals("21")) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                 serialNo = last.substring(10); |  |  |  |                                 serialNo = last.substring(10); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                             } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
	
		
		
			
				
					|  |  | @ -71,8 +71,8 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } else { |  |  |  |                             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 serialNo = null; |  |  |  |                                 serialNo = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                             } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         }else { |  |  |  |                         } else { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             if (last.length() >= 10 && last.substring(8, 10).equals("21")){ |  |  |  |                             if (last.length() >= 10 && last.substring(8, 10).equals("21")) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                 serialNo = last.substring(10); |  |  |  |                                 serialNo = last.substring(10); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                             } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
	
		
		
			
				
					|  |  | @ -97,7 +97,7 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             batchNo = data.substring(34, data.length()); |  |  |  |                             batchNo = data.substring(34, data.length()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     }else if (data.length() >= 34 && data.substring(32, 34).equals("21")) { |  |  |  |                     } else if (data.length() >= 34 && data.substring(32, 34).equals("21")) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         serialNo = data.substring(34, data.length()); |  |  |  |                         serialNo = data.substring(34, data.length()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } else if (data.length() >= 26 && data.substring(24, 26).equals("10")) { |  |  |  |                 } else if (data.length() >= 26 && data.substring(24, 26).equals("10")) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -177,7 +177,9 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Gs1128Decoder decoder = engine.decoder(); |  |  |  |         Gs1128Decoder decoder = engine.decoder(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<AI, String> result = decoder.decode("]C1" + data); |  |  |  |         Map<AI, String> result = decoder.decode("]C1" + data); | 
			
		
	
		
		
			
				
					
					|  |  |  |         UdiEntity udiEntity = new UdiEntity(); |  |  |  |         UdiEntity udiEntity = new UdiEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         int length = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |         for (Map.Entry<AI, String> entry : result.entrySet()) { |  |  |  |         for (Map.Entry<AI, String> entry : result.entrySet()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             length = length + entry.getValue().length(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (entry.getKey() == AIs.GTIN) { |  |  |  |             if (entry.getKey() == AIs.GTIN) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 udiEntity.setUdi(entry.getValue()); |  |  |  |                 udiEntity.setUdi(entry.getValue()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else if (entry.getKey() == AIs.BATCH_LOT) { |  |  |  |             } else if (entry.getKey() == AIs.BATCH_LOT) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -190,6 +192,10 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 udiEntity.setSerialNo(entry.getValue()); |  |  |  |                 udiEntity.setSerialNo(entry.getValue()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (data.length() - length > 12) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return null; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (StrUtil.isEmpty(udiEntity.getUdi())) { |  |  |  |         if (StrUtil.isEmpty(udiEntity.getUdi())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return null; |  |  |  |             return null; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else |  |  |  |         } else | 
			
		
	
	
		
		
			
				
					|  |  | @ -298,11 +304,13 @@ public class FilterUdiUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return data; |  |  |  |         return data; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public static String transGlxpNoSerStr(WarehouseEntity warehouseEntity) { |  |  |  |     public static String transGlxpNoSerStr(WarehouseEntity warehouseEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String udiCode = "#" + warehouseEntity.getNameCode() + "#" + warehouseEntity.getProduceDate() + "#" + warehouseEntity.getExpireDate() + |  |  |  |         String udiCode = "#" + warehouseEntity.getNameCode() + "#" + warehouseEntity.getProduceDate() + "#" + warehouseEntity.getExpireDate() + | 
			
		
	
		
		
			
				
					
					|  |  |  |                 "#" + warehouseEntity.getBatchNo() + "#" + "#" + "#"; |  |  |  |                 "#" + warehouseEntity.getBatchNo() + "#" + "#" + "#"; | 
			
		
	
		
		
			
				
					
					|  |  |  |         return udiCode; |  |  |  |         return udiCode; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public static String transGlxpNoSerStr(UdiEntity warehouseEntity) { |  |  |  |     public static String transGlxpNoSerStr(UdiEntity warehouseEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String udiCode = "#" + warehouseEntity.getUdi() + "#" + warehouseEntity.getProduceDate() + "#" + warehouseEntity.getExpireDate() + |  |  |  |         String udiCode = "#" + warehouseEntity.getUdi() + "#" + warehouseEntity.getProduceDate() + "#" + warehouseEntity.getExpireDate() + | 
			
		
	
		
		
			
				
					
					|  |  |  |                 "#" + warehouseEntity.getBatchNo() + "#" + "#" + "#"; |  |  |  |                 "#" + warehouseEntity.getBatchNo() + "#" + "#" + "#"; | 
			
		
	
	
		
		
			
				
					|  |  | 
 |