diff --git a/javascript/youhong.ai/pcn/workflow_code_block.js b/javascript/youhong.ai/pcn/workflow_code_block.js
index 9618e72..a6bb3d9 100644
--- a/javascript/youhong.ai/pcn/workflow_code_block.js
+++ b/javascript/youhong.ai/pcn/workflow_code_block.js
@@ -483,4 +483,56 @@ $(() => {
}
})
})
-/* ******************* 当明细数据未加载完成时 控制流程提交 end ******************* */
\ No newline at end of file
+/* ******************* 当明细数据未加载完成时 控制流程提交 end ******************* */
+
+
+/* ******************* 流程明细字段包含某个字符串时给某个字段赋值为某个东西start ******************* */
+$(() => {
+ let config = [{
+ table: 'detail_1',
+ mapping: [{
+ sourceField: '',
+ targetField: '',
+ sourceIncludes: '',
+ targetSet: ''
+ }]
+ }]
+
+
+ function runJs() {
+ config.forEach(item => {
+ let tableName = item.table
+ let mapping = item.mapping
+ if (tableName === "main") {
+ mapping.forEach(row => {
+ let sourceValue = WfForm.getFieldValue(WfForm.convertFieldNameToId(row.sourceField, tableName));
+ if (sourceValue.indexOf(row.sourceIncludes) !== -1) {
+ WfForm.changeFieldValue(WfForm.convertFieldNameToId(row.targetField, tableName, {
+ value: row.targetSet
+ }))
+ }
+ })
+ } else {
+ let rowIndexArr = WfForm.getDetailAllRowIndexStr(tableName).split(",");
+ rowIndexArr.forEach(rowIndex => {
+ mapping.forEach(row => {
+ let sourceValue = WfForm.getFieldValue(WfForm.convertFieldNameToId(row.sourceField, tableName));
+ if (sourceValue.indexOf(row.sourceIncludes) !== -1) {
+ WfForm.changeFieldValue(WfForm.convertFieldNameToId(row.targetField, tableName) + "_" + rowIndex, {
+ value: row.targetSet
+ })
+ }
+ })
+ })
+ }
+
+ })
+ }
+
+
+ WfForm.registerCheckEvent(WfForm.OPER_SUBMIT, callback => {
+ runJs()
+ callback()
+ })
+})
+/* ******************* 流程明细字段包含某个字符串时给某个字段赋值为某个东西end ******************* */
diff --git a/pom.xml b/pom.xml
index 35aac38..48c519d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,18 @@
junit
4.12
+
+
+
+
+
+
+
+ com.hierynomus
+ smbj
+ 0.10.0
+
@@ -80,12 +91,11 @@
-
- org.apache.rocketmq
- rocketmq-client
- 4.4.0
-
-
+
+ org.apache.rocketmq
+ rocketmq-client
+ 4.4.0
+
diff --git a/src/main/java/aiyh/utils/ThreadPoolConfig.java b/src/main/java/aiyh/utils/ThreadPoolConfig.java
index 1975126..acafd24 100644
--- a/src/main/java/aiyh/utils/ThreadPoolConfig.java
+++ b/src/main/java/aiyh/utils/ThreadPoolConfig.java
@@ -12,23 +12,23 @@ import java.util.concurrent.*;
*/
public class ThreadPoolConfig {
- private static volatile ExecutorService threadPool;
-
- public static ExecutorService createThreadPoolInstance() {
- if (threadPool == null) {
- synchronized (ThreadPoolConfig.class) {
- if (threadPool == null) {
- ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("thread-pool-aiyh-%d").build();
- threadPool = new ThreadPoolExecutor(25,
- 50,
- 60L,
- TimeUnit.SECONDS,
- new ArrayBlockingQueue<>(100),
- threadFactory,
- new ThreadPoolExecutor.AbortPolicy());
- }
- }
- }
- return threadPool;
- }
+ private static volatile ExecutorService threadPool;
+
+ public static ExecutorService createThreadPoolInstance() {
+ if (threadPool == null) {
+ synchronized (ThreadPoolConfig.class) {
+ if (threadPool == null) {
+ ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("thread-pool-aiyh-%d").build();
+ threadPool = new ThreadPoolExecutor(25,
+ 50,
+ 60L,
+ TimeUnit.SECONDS,
+ new ArrayBlockingQueue<>(100),
+ threadFactory,
+ new ThreadPoolExecutor.CallerRunsPolicy());
+ }
+ }
+ }
+ return threadPool;
+ }
}
diff --git a/src/main/java/aiyh/utils/Util.java b/src/main/java/aiyh/utils/Util.java
index 4ab3b95..7bc4337 100644
--- a/src/main/java/aiyh/utils/Util.java
+++ b/src/main/java/aiyh/utils/Util.java
@@ -1151,6 +1151,34 @@ public class Util extends weaver.general.Util {
}
+ public static String getProperties(String fileName, String key) {
+ String propertyPath = GCONST.getPropertyPath();
+ if (StringUtil.isNullOrEmpty(fileName)) {
+ return null;
+ }
+ if (fileName.contains(".properties")) {
+ fileName.replace(".properties", "");
+ }
+ String path = propertyPath + "prop2map" + File.separator + fileName + ".properties";
+ Properties prop = new Properties();
+ InputStream inputStream = null;
+ try {
+ inputStream = new BufferedInputStream(new FileInputStream(path));
+ prop.load(inputStream);
+ return prop.getProperty(key);
+ } catch (IOException e) {
+ throw new RuntimeException("找不到文件:" + path);
+ } finally {
+ try {
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
/**
* 通过文件名获取到对应的配置文件map对象
*
@@ -3687,4 +3715,8 @@ public class Util extends weaver.general.Util {
}
return Util.getValueByKeyStr("main." + fieldInfo.getFieldName(), workflowData);
}
+
+ public static Map createFunctionMap() {
+ return null;
+ }
}
diff --git a/src/main/java/aiyh/utils/annotation/recordset/SqlOracleDbFieldAnn.java b/src/main/java/aiyh/utils/annotation/recordset/SqlOracleDbFieldAnn.java
new file mode 100644
index 0000000..540ba18
--- /dev/null
+++ b/src/main/java/aiyh/utils/annotation/recordset/SqlOracleDbFieldAnn.java
@@ -0,0 +1,19 @@
+package aiyh.utils.annotation.recordset;
+
+import java.lang.annotation.*;
+
+/**
+ * sql字段映射
+ *
+ * create: 2023-02-07 17:31
+ *
+ * @author youHong.ai
+ */
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@Documented
+public @interface SqlOracleDbFieldAnn {
+
+ String value();
+}
diff --git a/src/main/java/aiyh/utils/entity/DocImageInfo.java b/src/main/java/aiyh/utils/entity/DocImageInfo.java
index 9834f9f..49753e0 100644
--- a/src/main/java/aiyh/utils/entity/DocImageInfo.java
+++ b/src/main/java/aiyh/utils/entity/DocImageInfo.java
@@ -10,12 +10,12 @@ import lombok.Data;
*/
@Data
public class DocImageInfo {
-
- private Integer docId;
- private Integer imageFileId;
- private String imageFileName;
- private Integer id;
- private Integer detailId;
- private Integer fileSize;
-
+
+ private Integer docId;
+ private Integer imageFileId;
+ private String imageFileName;
+ private Integer id;
+ private Integer detailId;
+ private Integer fileSize;
+ private Integer docFileType;
}
diff --git a/src/main/java/aiyh/utils/entity/FieldViewInfo.java b/src/main/java/aiyh/utils/entity/FieldViewInfo.java
index e337135..c76e2bb 100644
--- a/src/main/java/aiyh/utils/entity/FieldViewInfo.java
+++ b/src/main/java/aiyh/utils/entity/FieldViewInfo.java
@@ -1,5 +1,6 @@
package aiyh.utils.entity;
+import aiyh.utils.annotation.recordset.SqlOracleDbFieldAnn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@@ -17,20 +18,32 @@ import lombok.ToString;
public class FieldViewInfo {
/** 字段id */
+ @SqlOracleDbFieldAnn("ID")
+
private Integer id;
/** 字段名 */
+ @SqlOracleDbFieldAnn("FIELD_NAME")
+
private String fieldName;
/** 字段表名 */
+ @SqlOracleDbFieldAnn("TABLE_NAME")
+
private String tableName;
/** 表id */
+ @SqlOracleDbFieldAnn("BILL_ID")
+
private Integer billId;
/** 字段类型 */
+ @SqlOracleDbFieldAnn("FIELD_TYPE")
+
private Integer fieldType;
/** 字段类型名称 */
+ @SqlOracleDbFieldAnn("FIELD_HTML_TYPE")
+
private String fieldHtmlType;
}
diff --git a/src/main/java/aiyh/utils/httpUtil/ResponeVo.java b/src/main/java/aiyh/utils/httpUtil/ResponeVo.java
index 3029b96..7605284 100644
--- a/src/main/java/aiyh/utils/httpUtil/ResponeVo.java
+++ b/src/main/java/aiyh/utils/httpUtil/ResponeVo.java
@@ -4,6 +4,7 @@ package aiyh.utils.httpUtil;
import aiyh.utils.Util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -133,7 +134,11 @@ public class ResponeVo implements HttpResponse {
ObjectMapper mapper = new ObjectMapper();
this.entityMap = mapper.readValue(this.getEntityString(), Map.class);
} catch (JsonProcessingException ignored) {
- this.resultList = (List