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); } }
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); } }
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); } }
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); } }
@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(); }
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] = "--"; } }
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] = "--"; } }
@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(); }
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] = "--"; } } }