コード例 #1
0
 public PolicyItem(CompanyOrders order, String buyInsurance) {
   this.id = order.getId();
   this.policyNumber = order.getPolicyNumber();
   this.policyFrom = buyInsurance;
   this.policyTo = order.getDriverName();
   this.policyName = Constant.getPolicyNameByType(order.getPolicyCompany());
   this.policyMoney = order.getPolicyMoney();
   this.goodsName = order.getGoodsName();
   this.start = order.getStart();
   this.end = order.getEnd();
   this.goodsWeight = order.getGoodsWeight();
   this.goodsCapacity = order.getGoodsCapacity();
   try {
     this.policyDate = TimeUtils.dateToString(new Date(order.getPolicyTime()));
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
コード例 #2
0
 public StatItem(Salesman salesman) {
   super();
   this.userName = salesman.getName();
   long now = System.currentTimeMillis();
   int day = TimeUtils.getFormatedDate(now);
   int month = TimeUtils.getFormatedMonth(now);
   int lastMonth = TimeUtils.getFormatedLastMonth(now);
   this.city = salesman.getCity();
   if (salesman.getRole() == Constant.SALES_LEVEL_SUPER_TEAM) {
     this.teamId = Long.valueOf(salesman.getSuperTeamId());
   } else if (salesman.getRole() == Constant.SALES_LEVEL_AREA_TEAM) {
     this.teamId = Long.valueOf(salesman.getAreaTeamId());
   } else if (salesman.getRole() == Constant.SALES_LEVEL_TEAM) {
     this.teamId = Long.valueOf(salesman.getTeamId());
   } else {
     this.teamId = 0L;
   }
   this.roleName = Constant.getRoleName(salesman.getRole());
   if (salesman.getThisMonthTime() == month) {
     this.thisMonthCount = salesman.getThisMonthCount();
     this.thisMonthIntroCount = salesman.getThisMonthIntroCount();
     this.thisMonthTime = salesman.getThisMonthTime();
     if (salesman.getLastMonthTime() == lastMonth) {
       this.lastMonthCount = salesman.getLastMonthCount();
       this.lastMonthIntroCount = salesman.getLastMonthIntroCount();
       this.lastMonthTime = salesman.getLastMonthTime();
     }
   } else if (salesman.getThisMonthTime() == lastMonth) {
     this.lastMonthCount = salesman.getLastMonthCount();
     this.lastMonthIntroCount = salesman.getLastMonthIntroCount();
     this.lastMonthTime = salesman.getLastMonthTime();
   }
   if (day == salesman.getTodayTime()) {
     this.todayInstallCount = salesman.getTodayInstallCount();
     this.todayTime = salesman.getTodayTime();
   }
 }