处理表单标准选择类型
This commit is contained in:
+24
-7
@@ -223,7 +223,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if ("TEXT".equals(valEO.getType())) {
|
if ("TEXT".equals(valEO.getType())) {
|
||||||
valContent = "<p>" + valEO.getItemContent() + "</p>";
|
valContent = "<p>" + valEO.getItemContent() + "</p>";
|
||||||
} else if ("IMG".equals(valEO.getType())) {
|
} else if ("IMG".equals(valEO.getType())) {
|
||||||
if(!valEO.getItemContent().contains("uploadPath")) {
|
if(!valEO.getItemContent().contains("<img")) {
|
||||||
String ossFileId = valEO.getItemContent();
|
String ossFileId = valEO.getItemContent();
|
||||||
OSSFile ossFile = ossFileService.getById(ossFileId);
|
OSSFile ossFile = ossFileService.getById(ossFileId);
|
||||||
String url = ossFile.getUrl();
|
String url = ossFile.getUrl();
|
||||||
@@ -321,12 +321,20 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
// 人员选择类型
|
// 人员选择类型
|
||||||
List<OnlCgformField> onlFieldPersonList = fieldList.stream().filter(e -> FieldTypeEnum.PERSON.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
List<OnlCgformField> onlFieldPersonList = fieldList.stream().filter(e -> FieldTypeEnum.PERSON.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||||
List<String> fieldPersonList = onlFieldPersonList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
List<String> fieldPersonList = onlFieldPersonList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||||
|
// 标准选择类型
|
||||||
|
List<OnlCgformField> onlFieldStanList = fieldList.stream().filter(e -> FieldTypeEnum.STANDARD.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||||
|
List<String> fieldStanList = onlFieldStanList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> fieldPersonIdList = new ArrayList<>();
|
List<String> fieldPersonIdList = new ArrayList<>();
|
||||||
fieldPersonList.forEach(item->{
|
fieldPersonList.forEach(item->{
|
||||||
String fieldPersonId = item + "_id";
|
String fieldPersonId = item + "_id";
|
||||||
fieldPersonIdList.add(fieldPersonId);
|
fieldPersonIdList.add(fieldPersonId);
|
||||||
});
|
});
|
||||||
|
List<String> standardIdList = new ArrayList<>();
|
||||||
|
fieldStanList.forEach(item->{
|
||||||
|
String fieldStanId = item + "_id";
|
||||||
|
standardIdList.add(fieldStanId);
|
||||||
|
});
|
||||||
for (Map.Entry<String, Object> entry : parameter.entrySet()) {
|
for (Map.Entry<String, Object> entry : parameter.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
Object value = entry.getValue();
|
Object value = entry.getValue();
|
||||||
@@ -360,8 +368,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
} else {
|
} else {
|
||||||
valuesBuilder.append("," + "'" + value + "'");
|
valuesBuilder.append("," + "'" + value + "'");
|
||||||
}
|
}
|
||||||
} else if(fieldPersonList.contains(key)){
|
} else if(fieldPersonList.contains(key) || fieldStanList.contains(key)){
|
||||||
// 人员选择类型
|
// 人员选择类型 标准选择类型
|
||||||
if(ObjectUtil.isNotNull(parameter.get(key+"_id"))) {
|
if(ObjectUtil.isNotNull(parameter.get(key+"_id"))) {
|
||||||
value = parameter.get(key + "_id");
|
value = parameter.get(key + "_id");
|
||||||
}
|
}
|
||||||
@@ -668,7 +676,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
for (OnlCgformField onlCgformField : formFieldList){
|
for (OnlCgformField onlCgformField : formFieldList){
|
||||||
String fieldType = onlCgformField.getFieldShowType();
|
String fieldType = onlCgformField.getFieldShowType();
|
||||||
String dbFieldName = onlCgformField.getDbFieldName();
|
String dbFieldName = onlCgformField.getDbFieldName();
|
||||||
if (FieldTypeEnum.FILE.getValue().equals(fieldType)) {
|
if (FieldTypeEnum.TREE.getValue().equals(fieldType)) {
|
||||||
if (StringUtils.isNotBlank(itemsMap.get(dbFieldName).toString())) {
|
if (StringUtils.isNotBlank(itemsMap.get(dbFieldName).toString())) {
|
||||||
String[] values = itemsMap.get(dbFieldName).toString().split(",");
|
String[] values = itemsMap.get(dbFieldName).toString().split(",");
|
||||||
itemsMap.put(dbFieldName, values);
|
itemsMap.put(dbFieldName, values);
|
||||||
@@ -2042,13 +2050,17 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
int count = 3;
|
int count = 3;
|
||||||
if (pullSingleList.size() != 0) {
|
if (pullSingleList.size() != 0) {
|
||||||
//单选
|
//单选
|
||||||
String pullSingle = StringUtils.join(pullSingleList, ",") + "字段是单选属性,必须和系统中的对应字段选项相匹配\n";
|
String pullSingle = StringUtils.join(pullSingleList, ",") + "字段为单选属性,必须和系统中的对应字段选项相匹配\n";
|
||||||
sbTwo.append(count++ + "." + pullSingle);
|
sbTwo.append(count++ + "." + pullSingle);
|
||||||
}
|
}
|
||||||
|
if (textNumberList.size() != 0) {
|
||||||
|
//单选
|
||||||
|
String textNumber = StringUtils.join(textNumberList, ",") + "字段仅能填写数字,负数,小数\n";
|
||||||
|
sbTwo.append(count++ + "." + textNumber);
|
||||||
|
}
|
||||||
if (pullMoreList.size() != 0) {
|
if (pullMoreList.size() != 0) {
|
||||||
//多选
|
//多选
|
||||||
String pullMore = StringUtils.join(pullMoreList, ",") + "字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n";
|
String pullMore = StringUtils.join(pullMoreList, ",") + "字段为多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n";
|
||||||
sbTwo.append(count++ + "." + pullMore);
|
sbTwo.append(count++ + "." + pullMore);
|
||||||
}
|
}
|
||||||
if (dateSingleList.size() != 0) {
|
if (dateSingleList.size() != 0) {
|
||||||
@@ -2056,6 +2068,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
String dateSingle = StringUtils.join(dateSingleList, ",") + "字段为日期,必须精确到日\n";
|
String dateSingle = StringUtils.join(dateSingleList, ",") + "字段为日期,必须精确到日\n";
|
||||||
sbTwo.append(count++ + "." + dateSingle);
|
sbTwo.append(count++ + "." + dateSingle);
|
||||||
}
|
}
|
||||||
|
if (dateMoreList.size() != 0) {
|
||||||
|
//多选日期
|
||||||
|
String dateSingle = StringUtils.join(dateSingleList, ",") + "字段为日期,必须精确到日,可填写多个,填写多个时采用英文或中文逗号分割\n";
|
||||||
|
sbTwo.append(count++ + "." + dateSingle);
|
||||||
|
}
|
||||||
if (textStringList.size() != 0) {
|
if (textStringList.size() != 0) {
|
||||||
//输入框
|
//输入框
|
||||||
String textString = StringUtils.join(textStringList, ",") + "字段为文本,填写文本内容\n";
|
String textString = StringUtils.join(textStringList, ",") + "字段为文本,填写文本内容\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user