|  |  | 
 |  |  |             //找到对应的产品信息 | 
 |  |  |             PltProduct  product = productDao.selectByPrimaryKey(assyPlan.getProId()); | 
 |  |  |             if (product != null) { | 
 |  |  |                 result.setProId(product.getId()); | 
 |  |  |                 result.setProName(product.getName()); | 
 |  |  |                 String devicePrefix = "110" + product.getCode() + assyPlan.getBatchNo(); | 
 |  |  |                 result.setDevicePrefix(devicePrefix); | 
 |  |  | 
 |  |  |         if (product == null) { | 
 |  |  |             throw new RuntimeException("产品信息有误或被其他人员修改,请登录管理系统查看任务关联产品ID为:" + assyPlan.getProId()); | 
 |  |  |         } | 
 |  |  |         result.setProId(product.getId()); | 
 |  |  |         result.setProName(product.getName()); | 
 |  |  |         String devicePrefix = "110" + product.getCode() + assyPlan.getBatchNo(); | 
 |  |  |         result.setDevicePrefix(devicePrefix); | 
 |  |  | 
 |  |  |             }); | 
 |  |  |         });*/ | 
 |  |  |         return planList; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     //workId   assistants 传的是单个的userId  必传参数 | 
 |  |  |     public List<BaUser> updateAssistant(QueryVo vo) { | 
 |  |  |         //找到workId | 
 |  |  |         StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(vo.getWorkId()); | 
 |  |  |         if (workLast == null) { | 
 |  |  |             throw new RuntimeException("系统中没有该条登录信息,请检查或重新登录"); | 
 |  |  |         } | 
 |  |  |         //如果assistants 有101 则删掉 | 
 |  |  |         StringBuilder sb = new StringBuilder(); | 
 |  |  |         String[] assistantArr = vo.getAssistants().split(","); | 
 |  |  |         for (String item : assistantArr) { | 
 |  |  |             if (item.startsWith(USER_PREFIX)) { | 
 |  |  |                 sb.append(item.substring(3)).append(","); | 
 |  |  |             } else { | 
 |  |  |                 sb.append(item).append(","); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         String assistantStr = assistantArr.length > 0 ? sb.deleteCharAt(sb.length() - 1).toString() : ""; | 
 |  |  |         List<BaUser> userInfo = baUserDao.selectByAssistants(vo.getAssistants()); | 
 |  |  |         return userInfo; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int addAssistant(String workId, String assistant) { | 
 |  |  | 
 |  |  |         List<BaUser> assistantList = baUserDao.selectByAssistants(workLast.getAssistants()); | 
 |  |  |         return assistantList; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |