OprnoUtil.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package com.mes.ui;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.util.Map;
  5. public class OprnoUtil {
  6. public static String[] xtoprnos = new String[]{
  7. "OP220"
  8. };
  9. public static String[] xtoprnodes = new String[]{
  10. "总成反面装配2"
  11. };
  12. public static String[] lboprnos = new String[]{
  13. "OP040","OP050","OP060","OP070","OP080","OP090","OP100","OP110",
  14. "OP120","OP130","OP140","OP150","OP160","OP170","OP180","OP190",
  15. "OP200","OP210","OP220"
  16. };
  17. public static String[] lboprnodes = new String[]{
  18. "左右冷板FSW(反面)","左右冷板FSW(正面)","左右冷板正面CNC","左右冷板反面CNC","去毛刺吹铝屑","超声波清洗","冷板FSW堵头反面焊接","冷板FSW堵头正面焊接",
  19. "打磨焊道","水嘴自动激光焊","底护板支撑柱+BDU柱+线束支架焊接","冷板气检","冷板总成正面CNC","冷板总成反面CNC","去毛刺吹铝屑,清洁","高压冲洗",
  20. "M5+M6钢丝牙套安装","冷板汽检","冷板氦检"
  21. };
  22. public static String getGwDes(String lineSn,String oprno){
  23. String des = "";
  24. oprno = formatOprno(oprno);
  25. if(lineSn.equals("XT")){
  26. int i = 0;
  27. for (String gw:xtoprnos){
  28. if(gw.equals(oprno)){
  29. des = xtoprnodes[i];
  30. break;
  31. }
  32. i++;
  33. }
  34. }else if(lineSn.equals("LB")){
  35. int i = 0;
  36. for (String gw:lboprnos){
  37. if(gw.equals(oprno)){
  38. des = lboprnodes[i];
  39. break;
  40. }
  41. i++;
  42. }
  43. }
  44. return des;
  45. }
  46. public static String formatOprno(String oprno){
  47. List<String> lists = new ArrayList<>();
  48. if(oprno.length() == 6){
  49. String ysoprno = oprno.substring(0,5).trim();
  50. if(!lists.contains(ysoprno)){
  51. oprno = ysoprno;
  52. }
  53. }
  54. return oprno;
  55. }
  56. }