|
@@ -1,9 +1,12 @@
|
|
package com.platform.service.workflow.viewStrategy.impl;
|
|
package com.platform.service.workflow.viewStrategy.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.platform.common.util.BeanConverterUtil;
|
|
import com.platform.common.util.JsonUtils;
|
|
import com.platform.common.util.JsonUtils;
|
|
import com.platform.dao.enums.LinkTypeEnum;
|
|
import com.platform.dao.enums.LinkTypeEnum;
|
|
import com.platform.dao.mapper.custom.CustomFormDataMapper;
|
|
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 com.platform.service.workflow.viewStrategy.BomViewStrategy;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -17,6 +20,8 @@ public class CustomFormViewStrategy implements BomViewStrategy {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private CustomFormDataMapper customFormDataMapper;
|
|
private CustomFormDataMapper customFormDataMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private CustomFormMapper customFormMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String getType() {
|
|
public String getType() {
|
|
@@ -25,6 +30,8 @@ public class CustomFormViewStrategy implements BomViewStrategy {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public JSONObject getVOById(String id) {
|
|
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));
|
|
}
|
|
}
|
|
}
|
|
}
|