Exemplo n.º 1
0
 protected void setSxfyl(Calendar cal, Company comp, ZBStatus status) {
   if (null != sxfy && null != xssr && Util.isPositive(xssr) && Util.isPositive(sxfy)) {
     injector.inject(GSZB.SXFYL_65.getValue(), sxfy / xssr, cal, comp, status);
   } else {
     injector.remove(GSZB.SXFYL_65.getValue(), cal, comp);
   }
 }
Exemplo n.º 2
0
 protected void setXslrl(Calendar cal, Company comp, ZBStatus status) {
   if (null != lrze && null != xssr && Util.isPositive(xssr) && Util.isPositive(lrze)) {
     injector.inject(GSZB.XSLRL_28.getValue(), lrze / xssr, cal, comp, status);
   } else {
     injector.remove(GSZB.XSLRL_28.getValue(), cal, comp);
   }
 }
Exemplo n.º 3
0
 protected void setRjsr(Calendar cal, Company comp, ZBStatus status) {
   if (null != xssr && null != rs && Util.isPositive(rs) && Util.isPositive(xssr)) {
     injector.inject(GSZB.RJSR63.getValue(), xssr / rs, cal, comp, status);
   } else {
     injector.remove(GSZB.RJSR63.getValue(), cal, comp);
   }
 }
Exemplo n.º 4
0
 protected void setRjlr(Calendar cal, Company comp, ZBStatus status) {
   if (null != lrze && null != rs && Util.isPositive(rs) && Util.isPositive(lrze)) {
     injector.inject(GSZB.RJLR62.getValue(), lrze / rs, cal, comp, status);
   } else {
     injector.remove(GSZB.RJLR62.getValue(), cal, comp);
   }
 }
Exemplo n.º 5
0
 @Override
 public List<HKJHJG> getHkjhjg(Date d, List<Company> comps) {
   Query q =
       getEntityManager()
           .createQuery(
               "select h from HKJHJG h where h.qybh in ("
                   + Util.toString(comps)
                   + ") and h.ny = :ny");
   q.setParameter("ny", Util.format(d));
   return q.getResultList();
 }
Exemplo n.º 6
0
 private String completeRate(String[][] data, int row, int col, int baseCol, int completeCol) {
   try {
     return data[row][col] =
         String.format(
                 "%.2f",
                 Double.valueOf(
                     Util.mult(Util.division(data[row][baseCol], data[row][completeCol]), "100")))
             + "%";
   } catch (Exception e) {
     return data[row][col] = "--";
   }
 }
Exemplo n.º 7
0
 private String accumulate(String[][] data, int row, int col, String val2) {
   try {
     return data[row][col] =
         String.format("%.2f", Double.valueOf(Util.plus(data[row][col], val2)));
   } catch (Exception e) {
     return data[row][col] = "--";
   }
 }
Exemplo n.º 8
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();
 }
Exemplo n.º 9
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] = "--";
      }
    }
  }