Commit f6539eae by lcx

人员字典批量添加,正则校验修改

parent ca565237
...@@ -728,7 +728,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request) ...@@ -728,7 +728,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
{ {
if (!string.IsNullOrEmpty(item["AttendanceDay"]) && !string.IsNullOrEmpty(item["ReservedRatio"])) if (!string.IsNullOrEmpty(item["AttendanceDay"]) && !string.IsNullOrEmpty(item["ReservedRatio"]))
{ {
if ((!Regex.IsMatch(item["AttendanceDay"], "^([12][0-9]|31|[1-9])$")) || (!Regex.IsMatch(item["ReservedRatio"], @"\b(0(\.\d{1,2})?)|1\b"))) decimal attendanceDay = ConvertHelper.To<decimal>(item["AttendanceDay"]), reservedRatio = ConvertHelper.To<decimal>(item["ReservedRatio"]);
if ((!Regex.IsMatch(item["AttendanceDay"], "^(?:[0-2]*[0-9]?|30|31)$")) || (!Regex.IsMatch(item["ReservedRatio"], @"^(0.\d{1,2}|0|1)?$")))
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment