瀏覽代碼

工作台

guarantee-lsq 7 月之前
父節點
當前提交
b78cced5ec

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/custom/CustomFormDataVO.java

@@ -66,5 +66,7 @@ public class CustomFormDataVO extends BaseVO implements Serializable {
 
     private String targetId; // 目标ID
 
+    private String formJsonString;
+
 
 }

+ 8 - 1
platform-service/src/main/java/com/platform/service/workflow/viewStrategy/impl/CustomFormViewStrategy.java

@@ -1,9 +1,12 @@
 package com.platform.service.workflow.viewStrategy.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.platform.common.util.BeanConverterUtil;
 import com.platform.common.util.JsonUtils;
 import com.platform.dao.enums.LinkTypeEnum;
 import com.platform.dao.mapper.custom.CustomFormDataMapper;
+import com.platform.dao.mapper.custom.CustomFormMapper;
+import com.platform.dao.vo.query.custom.CustomFormDataVO;
 import com.platform.service.workflow.viewStrategy.BomViewStrategy;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
@@ -17,6 +20,8 @@ public class CustomFormViewStrategy implements BomViewStrategy {
 
     @Resource
     private CustomFormDataMapper customFormDataMapper;
+    @Resource
+    private CustomFormMapper customFormMapper;
 
     @Override
     public String getType() {
@@ -25,6 +30,8 @@ public class CustomFormViewStrategy implements BomViewStrategy {
 
     @Override
     public JSONObject getVOById(String id) {
-        return JSONObject.parseObject(JsonUtils.objectToJson(customFormDataMapper.selectByPrimaryKey(id)));
+        CustomFormDataVO vo = BeanConverterUtil.copyObjectProperties(customFormDataMapper.selectByPrimaryKey(id), CustomFormDataVO.class);
+        vo.setFormJsonString(customFormMapper.selectByPrimaryKey(vo.getFormId()).getJsonString());
+        return JSONObject.parseObject(JsonUtils.objectToJson(vo));
     }
 }