package com.zy.asrs.utils; 
 | 
  
 | 
import com.core.exception.CoolException; 
 | 
import com.zy.asrs.entity.Mat; 
 | 
import lombok.extern.slf4j.Slf4j; 
 | 
  
 | 
/** 
 | 
 * Created by vincent on 2022/4/23 
 | 
 */ 
 | 
@Slf4j 
 | 
public class MatUtils { 
 | 
  
 | 
    // 
 | 
    public static Mat analyseMat(String uuid) { 
 | 
        try { 
 | 
            String[] split = uuid.split("-"); 
 | 
            String matnr = split[0] + "-" + split[1]; 
 | 
            String serial = split[2]; 
 | 
            Mat mat = new Mat(); 
 | 
            mat.setMatnr(matnr); 
 | 
            mat.setBarcode(serial); 
 | 
            mat.setModel(split[0]); 
 | 
            return mat; 
 | 
        } catch (Exception e) { 
 | 
            log.error("", e); 
 | 
            throw new CoolException(uuid + "条码打包上线错误"); 
 | 
        } 
 | 
    } 
 | 
  
 | 
} 
 |