|
|
@@ -5,6 +5,8 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
|
import com.yw.bpm.data.model.Data;
|
|
|
@@ -47,6 +49,7 @@ import net.sf.json.JSONObject;
|
|
|
*/
|
|
|
public class BpmClientFlowForm2Action extends RequestAbs {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(BpmClientFlowForm2Action.class);
|
|
|
public final String serviceId = "bpm_20180525getflowform";
|
|
|
|
|
|
private ApplicationContext cxt = null;
|
|
|
@@ -263,7 +266,7 @@ public class BpmClientFlowForm2Action extends RequestAbs {
|
|
|
formElementList = bpmFormDao.getListOfFormElementByConditionsAddBDDZ(conditions);// 根据条件获取表单元素列表(添加表单动作)
|
|
|
|
|
|
HashMap<String, Object> repeatingForm = new HashMap<>();
|
|
|
- repeatingForm.put("elementItem", formElementList);
|
|
|
+
|
|
|
List<Map<String, String>> repeatingFormElementList = new ArrayList<>();
|
|
|
for (int i = 0; i < formElementList.size(); i++) {
|
|
|
FormElement fe = formElementList.get(i);
|
|
|
@@ -280,6 +283,28 @@ public class BpmClientFlowForm2Action extends RequestAbs {
|
|
|
String enumstr = "{}";
|
|
|
fe.setTypeDetail(enumstr);
|
|
|
}
|
|
|
+
|
|
|
+ String l_element_id = fe.getElementId();
|
|
|
+ conditions.put("elementId", l_element_id);
|
|
|
+ String n_can_edit = "1";
|
|
|
+ String n_no_null = "0";
|
|
|
+ if (!StringUtil.isEmptyStr(tmodelId)) {
|
|
|
+ conditions.put("tmodelId", tmodelId);
|
|
|
+ FlowFormElement flowFormElement = bpmFlowModelDao
|
|
|
+ .getFlowFormElementByConditions(conditions);
|
|
|
+ n_no_null = flowFormElement.getNoNull().getValue();
|
|
|
+ int count = bpmFormDao.getCountOfCanEditForElement(conditions);
|
|
|
+ if (count == 0) {
|
|
|
+ n_can_edit = "0";
|
|
|
+ } else {
|
|
|
+ n_can_edit = flowFormElement.getCanEdit().getValue();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ n_can_edit = "0";
|
|
|
+ }
|
|
|
+ fe.setCanEdit(n_can_edit);
|
|
|
+ fe.setNoNull(n_no_null);
|
|
|
+
|
|
|
String v_table_field = fe.getTableField();
|
|
|
StringBuffer sql = new StringBuffer("SELECT l_form_group_id,l_form_group_count,");
|
|
|
sql.append(v_table_field + " from oa_form_group_" + fe.getGroupId());
|
|
|
@@ -297,24 +322,6 @@ public class BpmClientFlowForm2Action extends RequestAbs {
|
|
|
}
|
|
|
String groupuid = (list.get(j).get("l_form_group_id")).toString();
|
|
|
String groupCount = (list.get(j).get("l_form_group_count")).toString();
|
|
|
- String l_element_id = fe.getElementId();
|
|
|
- conditions.put("elementId", l_element_id);
|
|
|
- String n_can_edit = "1";
|
|
|
- String n_no_null = "0";
|
|
|
- if (!StringUtil.isEmptyStr(tmodelId)) {
|
|
|
- conditions.put("tmodelId", tmodelId);
|
|
|
- FlowFormElement flowFormElement = bpmFlowModelDao
|
|
|
- .getFlowFormElementByConditions(conditions);
|
|
|
- n_no_null = flowFormElement.getNoNull().getValue();
|
|
|
- int count = bpmFormDao.getCountOfCanEditForElement(conditions);
|
|
|
- if (count == 0) {
|
|
|
- n_can_edit = "0";
|
|
|
- } else {
|
|
|
- n_can_edit = flowFormElement.getCanEdit().getValue();
|
|
|
- }
|
|
|
- } else {
|
|
|
- n_can_edit = "0";
|
|
|
- }
|
|
|
|
|
|
element.put("defaultValue", defaultValue);
|
|
|
element.put("canEdit", n_can_edit);
|
|
|
@@ -339,6 +346,7 @@ public class BpmClientFlowForm2Action extends RequestAbs {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ repeatingForm.put("elementItem", formElementList);
|
|
|
repeatingForm.put("elements", repeatingFormElementList);
|
|
|
String repeatingFormStr = JSONObject.fromObject(repeatingForm).toString();
|
|
|
|