/** 设置当前list数据 */ public void setTShopChargeList(List<TShopCharge> tShopChargeList) { this.tShopChargeList = tShopChargeList; TEmployeeService tEmployeeService = BuildSpringApplication.getInstance().getTEmployeeServiceImpl(); for (int i = tShopChargeList.size() - 1; i >= 0; --i) { tShopChargeList .get(i) .setStartTimeStr( DateUtil.format(tShopChargeList.get(i).getStartTime(), DateUtil.TYPE_DATE)); tShopChargeList .get(i) .setEndTimeStr(DateUtil.format(tShopChargeList.get(i).getEndTime(), DateUtil.TYPE_DATE)); tShopChargeList .get(i) .setHappenTimeStr( DateUtil.format(tShopChargeList.get(i).getHappenTime(), DateUtil.TYPE_DATETIME)); TEmployee tEmployee = null; try { tEmployee = tEmployeeService.getNameByIdService(tShopChargeList.get(i).getOperator()); } catch (Exception e) { e.printStackTrace(); } if (tEmployee != null) tShopChargeList.get(i).setOperatorName(tEmployee.getName()); } }
@Override public void run() { try { List<TEmployee> list = tEmployeeService.findService(null); if (list != null && list.size() != 0) { for (int i = 0; i < list.size(); i++) { TEmployee emp = list.get(i); manager.addElement(new IDNameBean(emp.getEmployeeID(), emp.getName())); if (tStore != null) { if (emp.getEmployeeID().equals(tStore.getManager())) { manager.getBox().setSelectedIndex(i + 1); } } } } } catch (Exception e) { e.printStackTrace(); } }