|
@@ -595,10 +595,9 @@ public class CustomFunction {
|
|
|
* @Author yangyj
|
|
|
* @Date 2022.12.21 14:33
|
|
|
**/
|
|
|
- public static Object unit(Object rate, Object level) {
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(rate, level)) {
|
|
|
- return StringUtils.obj2Double(rate.toString()) > 50 && "优良".equals(level.toString()) ? "优良" : "合格";
|
|
|
+ public static Object unit(List<Object> rate, List<Object> level) {
|
|
|
+ if (ListUtils.isNotEmpty(rate)&&ListUtils.isNotEmpty(level)) {
|
|
|
+ return StringUtils.obj2Double(StringUtils.handleNull(rate.get(0)).trim()) > 50 && "优良".equals(StringUtils.handleNull(level.get(0)).trim()) ? "优良" : "合格";
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
@@ -652,7 +651,18 @@ public class CustomFunction {
|
|
|
return StringPool.EMPTY;
|
|
|
}
|
|
|
|
|
|
- ;
|
|
|
+ public static String passRateDisplay(List<Object> rate){
|
|
|
+ if(Func.isNotEmpty(rate)){
|
|
|
+ Optional<Object> op= rate.stream().filter(BaseUtils::isNumber).findAny();
|
|
|
+ if(op.isPresent()){
|
|
|
+ return StringUtils.number2String(op.get(),1)+"%";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "/";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
public String checkItems(List<String> items, List<Object> l1, List<Object> l2, List<Object> l3, List<Object> l4, List<Object> l5, List<Object> l6, List<Object> l7, List<Object> l8, List<Object> l9, List<Object> l10, List<Object> l11, List<Object> l12) {
|