|
@@ -115,19 +115,20 @@ public class SpecHomeController extends BaseController
|
|
|
.in("plant_code",plantIds)
|
|
|
// .eq(!StringUtils.isBlank((String)params.get("plantName")) , "plant_code" ,params.get("plantName"))
|
|
|
.and(unitIds.size()>0 ,i -> i.in("unit",unitIds).or().in("plant_code",unitIds).or().isNull("unit"))
|
|
|
-
|
|
|
);
|
|
|
double allLength = 0;
|
|
|
for (int i = 0; i < gdList.size(); i++) {
|
|
|
double gdLength = 0;
|
|
|
- if (gdList.get(i).getLength().indexOf("\n") > -1) {
|
|
|
- String[] arr = gdList.get(i).getLength().split("\n");
|
|
|
- logger.info(JSON.toJSONString(arr));
|
|
|
- for (int j = 0; j < arr.length; j++) {
|
|
|
- gdLength += Double.parseDouble(arr[j]);
|
|
|
+ if (!StringUtils.isBlank(gdList.get(i).getLength())) {
|
|
|
+ if (gdList.get(i).getLength().indexOf("\n") > -1) {
|
|
|
+ String[] arr = gdList.get(i).getLength().split("\n");
|
|
|
+ logger.info(JSON.toJSONString(arr));
|
|
|
+ for (int j = 0; j < arr.length; j++) {
|
|
|
+ gdLength += Double.parseDouble(arr[j]);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ gdLength = Double.parseDouble(gdList.get(i).getLength());
|
|
|
}
|
|
|
- }else {
|
|
|
- gdLength = Double.parseDouble(gdList.get(i).getLength());
|
|
|
}
|
|
|
allLength += gdLength;
|
|
|
}
|