拆分-多日期回显bug修改
This commit is contained in:
+1
@@ -699,6 +699,7 @@ public class DateUtils extends PropertyEditorSupport {
|
||||
}
|
||||
newStrList.add(newStr);
|
||||
}
|
||||
newStrList.sort((t1, t2) -> t1.compareTo(t2)); // 日期增序
|
||||
return org.apache.commons.lang3.StringUtils.join(newStrList, ",");
|
||||
}
|
||||
}
|
||||
|
||||
+26
-9
@@ -542,6 +542,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if (CollectionUtil.isNotEmpty(sysUserList)) {
|
||||
for (SysUser user : sysUserList) {
|
||||
stringBuilder.append(user.getRealname()).append("(").append(user.getUsername()).append("),");
|
||||
// stringBuilder.append(user.getUsername()).append(",");
|
||||
}
|
||||
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
||||
entry.setValue(value);
|
||||
@@ -814,12 +815,22 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
for (OnlCgformField onlCgformField : formFieldList){
|
||||
String fieldType = onlCgformField.getFieldShowType();
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
// 树形结构
|
||||
if (FieldTypeEnum.TREE.getValue().equals(fieldType)) {
|
||||
if (StringUtils.isNotBlank((String)itemsMap.get(dbFieldName))) {
|
||||
String[] values = itemsMap.get(dbFieldName).toString().split(",");
|
||||
itemsMap.put(dbFieldName, values);
|
||||
}
|
||||
}
|
||||
// 多日期选择
|
||||
if (FieldTypeEnum.DATE_MORE.getValue().equals(fieldType)) {
|
||||
if (StringUtils.isNotBlank((String)itemsMap.get(dbFieldName))) {
|
||||
List<String> valuesList = Arrays.asList(itemsMap.get(dbFieldName).toString().split(","));
|
||||
valuesList.sort((t1, t2) -> t1.compareTo(t2)); // 日期增序
|
||||
itemsMap.put(dbFieldName, valuesList);
|
||||
}
|
||||
}
|
||||
// 人员选择
|
||||
if (FieldTypeEnum.PERSON.getValue().equals(fieldType)) {
|
||||
if (StringUtils.isNotBlank((String)itemsMap.get(dbFieldName))) {
|
||||
List<SysUser> sysUserList = sysUserService.listByIds(Arrays.asList(itemsMap.get(dbFieldName).toString().split(",")));
|
||||
@@ -829,6 +840,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
List<String> names = new ArrayList<>();
|
||||
for(int i=0; i<realNames.size(); i++){
|
||||
String name = realNames.get(i) + "(" + userNames.get(i) + ")";
|
||||
// String name = userNames.get(i);
|
||||
names.add(name);
|
||||
}
|
||||
itemsMap.put(dbFieldName+"_id", itemsMap.get(dbFieldName).toString());
|
||||
@@ -837,6 +849,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
// 标准选择
|
||||
if (FieldTypeEnum.STANDARD.getValue().equals(fieldType)) {
|
||||
if (StringUtils.isNotBlank((String)itemsMap.get(dbFieldName))) {
|
||||
List<Map<String, Object>> documentLibraryEOList = documentLibraryEOService.queryListByIds(itemsMap.get(dbFieldName).toString());
|
||||
@@ -2066,16 +2079,18 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
value = DateUtils.coverDate((String) value);
|
||||
}
|
||||
//判断是否是两个日期点
|
||||
String str = value.replace(",",",");
|
||||
String[] strArr = str.split(",");
|
||||
if (strArr.length != 2) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += fieldName + "必须填写两个日期;";
|
||||
}else{
|
||||
errorMsg += fieldName + " must fill in the two dates;";
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
//判断是否是两个日期点
|
||||
String str = value.replace(",", ",");
|
||||
String[] strArr = str.split(",");
|
||||
if (strArr.length != 2) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "必须填写两个日期;";
|
||||
} else {
|
||||
errorMsg += fieldName + " must fill in the two dates;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
} else if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) {
|
||||
@@ -2201,6 +2216,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
countError++;
|
||||
}else {
|
||||
String uName = userNames[u].substring(userNames[u].indexOf("(") + 1, userNames[u].indexOf(")"));
|
||||
// String uName = userNames[u];
|
||||
SysUser user = sysUserService.getUserByName(uName);
|
||||
if (ObjectUtils.isNotEmpty(user)) {
|
||||
userIdList.add(user.getId());
|
||||
@@ -2210,6 +2226,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
errorMsg += fieldName + " " + userNames[u] + "Not exist;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user