|  |  |  | 
|---|
|  |  |  | List<RecordLogModel> result = workorderRecordExtMapper.getRecordLog(pageWrap.getModel()); | 
|---|
|  |  |  | if(result!=null){ | 
|---|
|  |  |  | for(RecordLogModel model : result){ | 
|---|
|  |  |  | model.setUnqualifiedNum(new BigDecimal(0)); | 
|---|
|  |  |  | model.setUnqualifiedRate(new BigDecimal(0)); | 
|---|
|  |  |  | BigDecimal doneNum = Constants.formatBigdecimal(model.getUnqualifiedNum()).add(Constants.formatBigdecimal(model.getQualifiedNum())); | 
|---|
|  |  |  | if(model.getUnqualifiedNum() !=null && doneNum.compareTo(new BigDecimal(0)) != 0){ | 
|---|
|  |  |  | //不良品率 | 
|---|
|  |  |  | 
|---|
|  |  |  | tt.setRate(new BigDecimal(0)); | 
|---|
|  |  |  | if(  Constants.formatBigdecimal(t.getPlanNum()).compareTo(new BigDecimal(0)) >0){ | 
|---|
|  |  |  | //完成率 | 
|---|
|  |  |  | tt.setRate(Constants.formatBigdecimal(t.getDoneNum()).divide(t.getPlanNum(),4).multiply(new BigDecimal(100))); | 
|---|
|  |  |  | tt.setRate(Constants.formatBigdecimal(t.getQualifiedNum()).divide(t.getPlanNum(),4).multiply(new BigDecimal(100))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | tt.setPlanNum(Constants.formatBigdecimal(t.getPlanNum())); | 
|---|
|  |  |  | tt.setDoneNum(Constants.formatBigdecimal(t.getDoneNum())); | 
|---|
|  |  |  | tt.setDoneNum(Constants.formatBigdecimal(t.getQualifiedNum())); | 
|---|
|  |  |  | rList.add(tt); | 
|---|
|  |  |  | //最后一列的良品数/完工数:为当前产品最后一道工序的良品数/完工数 | 
|---|
|  |  |  | model.setNum(t.getPlanNum()); | 
|---|
|  |  |  | model.setQualifiedNum(t.getDoneNum()); | 
|---|
|  |  |  | model.setDoneNum(t.getDoneNum()); | 
|---|
|  |  |  | model.setQualifiedNum(t.getQualifiedNum()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | model.setProcedureList(rList); | 
|---|