|
@@ -145,25 +145,31 @@ public class FoldTheValuesServiceImpl extends BaseServiceImpl<FoldTheValues, Str
|
|
DecimalFormat df = new DecimalFormat("0.000");
|
|
DecimalFormat df = new DecimalFormat("0.000");
|
|
FoldTheValues foldTheValue = new FoldTheValues();
|
|
FoldTheValues foldTheValue = new FoldTheValues();
|
|
for (FoldTheValues foldTheValues : dateForMoth) {
|
|
for (FoldTheValues foldTheValues : dateForMoth) {
|
|
- foldTheValue.setId(month+foldTheValues.getMaterialno());
|
|
|
|
- foldTheValue.setClock(clock);
|
|
|
|
- if(foldTheValues.getMaterialsource().equals("三电厂")){
|
|
|
|
- foldTheValue.setDescription("热值");
|
|
|
|
- foldTheValue.setCode(df.format(jse.eval(foldTheValues.getEstimatedvalue()+"/"+days+"*0.03412/100")).toString());
|
|
|
|
- }
|
|
|
|
- if(foldTheValues.getMaterialsource().equals("机焦厂")){
|
|
|
|
- foldTheValue.setDescription("灰分");
|
|
|
|
- foldTheValue.setCode(df.format(jse.eval("(29727+(10-"+foldTheValues.getEstimatedvalue()+"/"+days+")*334)/29307.6")));
|
|
|
|
|
|
+ try{
|
|
|
|
+ foldTheValue.setId(month+foldTheValues.getMaterialno());
|
|
|
|
+ foldTheValue.setClock(clock);
|
|
|
|
+ if(foldTheValues.getMaterialsource().equals("三电厂")){
|
|
|
|
+ foldTheValue.setDescription("热值");
|
|
|
|
+ foldTheValue.setCode(df.format(jse.eval(foldTheValues.getEstimatedvalue()+"/"+days+"*0.03412/100")).toString());
|
|
|
|
+ }
|
|
|
|
+ if(foldTheValues.getMaterialsource().equals("机焦厂")){
|
|
|
|
+ foldTheValue.setDescription("灰分");
|
|
|
|
+ foldTheValue.setCode(df.format(jse.eval("(29727+(10-"+foldTheValues.getEstimatedvalue()+"/"+days+")*334)/29307.6")));
|
|
|
|
+ }
|
|
|
|
+ foldTheValue.setIsavailable("0");
|
|
|
|
+ foldTheValue.setUnitid("032");
|
|
|
|
+ hashMap.put("materialno",foldTheValues.getMaterialno());
|
|
|
|
+ foldTheValue.setBz("取本月热值检测结果平均值("+foldTheValuesMapper.getavgDate(hashMap)+")进行热值换算");
|
|
|
|
+ foldTheValue.setMaterialno(foldTheValues.getMaterialno());
|
|
|
|
+ foldTheValue.setMaterialsource(foldTheValues.getMaterialsource());
|
|
|
|
+ foldTheValue.setTimegranid("MONTH");
|
|
|
|
+ foldTheValue.setEstimatedvalue(df.format(jse.eval(foldTheValues.getEstimatedvalue()+"/"+days)));
|
|
|
|
+ foldTheValuesMapper.insert(foldTheValue);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ logger.info("取本月热值检测结果平均值出错:" + JSONObject.toJSONString(foldTheValue));
|
|
|
|
+ e.printStackTrace();
|
|
}
|
|
}
|
|
- foldTheValue.setIsavailable("0");
|
|
|
|
- foldTheValue.setUnitid("032");
|
|
|
|
- hashMap.put("materialno",foldTheValues.getMaterialno());
|
|
|
|
- foldTheValue.setBz("取本月热值检测结果平均值("+foldTheValuesMapper.getavgDate(hashMap)+")进行热值换算");
|
|
|
|
- foldTheValue.setMaterialno(foldTheValues.getMaterialno());
|
|
|
|
- foldTheValue.setMaterialsource(foldTheValues.getMaterialsource());
|
|
|
|
- foldTheValue.setTimegranid("MONTH");
|
|
|
|
- foldTheValue.setEstimatedvalue(df.format(jse.eval(foldTheValues.getEstimatedvalue()+"/"+days)));
|
|
|
|
- foldTheValuesMapper.insert(foldTheValue);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|