示例#1
0
 @Override
 public List<HKJHJG> getHkjhjg(Date d, Company comp) {
   Query q =
       getEntityManager()
           .createQuery("select h from HKJHJG h where h.qybh = :compId and h.ny = :ny");
   q.setParameter("compId", comp.getId());
   q.setParameter("ny", Util.format(d));
   return q.getResultList();
 }
示例#2
0
  private void fillGfhzRow(String[][] data, int index, YDZBBean ydzb) {
    if ((sbdcy.getId() + "").equals(ydzb.getXh())
        || (xnycy.getId() + "").equals(ydzb.getXh())
        || (nycy.getId() + "").equals(ydzb.getXh())
        || (gcl.getId() + "").equals(ydzb.getXh())) {
      accumulate(data, index, 0, ydzb.getNdjh());
      accumulate(data, index, 1, ydzb.getByjh());
      accumulate(data, index, 2, ydzb.getBywc());
      completeRate(data, index, 3, 1, 2);
      accumulate(data, index, 4, ydzb.getJdjh());
      accumulate(data, index, 5, ydzb.getJdlj());
      completeRate(data, index, 6, 4, 5);
      accumulate(data, index, 7, ydzb.getNdlj());
      completeRate(data, index, 8, 0, 7);
      accumulate(data, index, 9, ydzb.getQntq());
      try {
        data[index][10] =
            String.format(
                    "%.2f",
                    Double.valueOf(
                        Util.mult(
                            Util.division(
                                data[index][9], Util.minus(data[index][2], data[index][9])),
                            "100")))
                + "%";
      } catch (Exception e) {
        data[index][10] = "--";
      }

      accumulate(data, index, 11, ydzb.getQntqlj());
      try {
        data[index][12] =
            String.format(
                    "%.2f",
                    Double.valueOf(
                        Util.mult(
                            Util.minus(Util.division(ydzb.getQntqlj(), ydzb.getNdlj()), "1"),
                            "100")))
                + "%";
      } catch (Exception e) {
        data[index][12] = "--";
      }
    }
  }