|
@@ -0,0 +1,29 @@
|
|
|
+package com.winhc.bigdata.udf;
|
|
|
+
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.aliyun.odps.udf.UDF;
|
|
|
+import com.aliyun.odps.utils.StringUtils;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author: π
|
|
|
+ * @Description: 案件是否结案
|
|
|
+ */
|
|
|
+public class case_end extends UDF {
|
|
|
+
|
|
|
+ public String evaluate(String result_info) {
|
|
|
+ if (StringUtils.isBlank(result_info)) return "0";
|
|
|
+ if (StrUtil.containsAny(result_info, "撤回", "撤诉", "和解", "终审", "终结本次执行", "执行完毕", "结案")) {
|
|
|
+ return "1";
|
|
|
+ }
|
|
|
+ return "0";
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String result_info = "准予原告象山新丰汽车销售服务有限公司撤回起诉。本案诉讼费71元,减半收取35.50元,由原告象山新丰汽车销售服务有限公司负担。";
|
|
|
+ case_end n = new case_end();
|
|
|
+ System.out.println(n.evaluate(result_info));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|