拆分-日期校验修改
This commit is contained in:
+30
-4
@@ -539,11 +539,13 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if(fieldPersonList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
|
||||
List<SysUser> sysUserList = sysUserService.listByIds(Arrays.asList(entry.getValue().toString().split(",")));
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for(SysUser user : sysUserList){
|
||||
stringBuilder.append(user.getRealname()).append("(").append(user.getUsername()).append("),");
|
||||
if (CollectionUtil.isNotEmpty(sysUserList)) {
|
||||
for (SysUser user : sysUserList) {
|
||||
stringBuilder.append(user.getRealname()).append("(").append(user.getUsername()).append("),");
|
||||
}
|
||||
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
||||
entry.setValue(value);
|
||||
}
|
||||
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
||||
entry.setValue(value);
|
||||
}
|
||||
// 标准选择
|
||||
if(fieldStanList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
|
||||
@@ -797,6 +799,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInfoById(String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return null;
|
||||
}
|
||||
Map<String, Object> itemsMap = dao.selectByPrimaryKey(id);
|
||||
// 查询条款表单字段
|
||||
List<OnlCgformField> formFieldList = onlCgformFieldService.getFieldList(ModuleEnum.FILE_SPLIT_ITEMS.getValue());
|
||||
@@ -2035,6 +2040,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
errorMsg += fieldName + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
value = DateUtils.coverDate((String) value);
|
||||
}
|
||||
|
||||
} else if (FieldTypeEnum.DATE_MORE.getValue().equals(fieldShowType)) {
|
||||
@@ -2056,6 +2063,19 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
errorMsg += fieldName + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}
|
||||
countError++;
|
||||
} 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;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
} else if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) {
|
||||
@@ -2184,6 +2204,12 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
SysUser user = sysUserService.getUserByName(uName);
|
||||
if (ObjectUtils.isNotEmpty(user)) {
|
||||
userIdList.add(user.getId());
|
||||
} else {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中人员" + userNames[u] + "不存在;";
|
||||
} else {
|
||||
errorMsg += fieldName + " " + userNames[u] + "Not exist;";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user