|
@@ -1145,6 +1145,7 @@ namespace Util
|
|
|
{
|
|
|
Dictionary<string, object> loopLog = new();
|
|
|
List<QueryCondition> condiDic = loopCondition(projectId, sub, objId, content);
|
|
|
+ condiDic.AddRange(rootCondiDic);
|
|
|
Function.WriteLog(batchNo + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "-loop-in-1", "接收mq数据日志");
|
|
|
loopLog.Add("查询" + objId + "匹配数据", condiDic);
|
|
|
if(condiDic.Count > 0)
|
|
@@ -1197,6 +1198,7 @@ namespace Util
|
|
|
foreach(string returnField in returnFields)
|
|
|
{
|
|
|
string val = GetQueryTableData(condiDic, returnField);
|
|
|
+ if(val == returnField) val = "0";
|
|
|
expresssion = expresssion.Replace(returnField, val);
|
|
|
|
|
|
string title = GetQueryTableTitle(condiDic, returnField);
|
|
@@ -1216,6 +1218,7 @@ namespace Util
|
|
|
}
|
|
|
|
|
|
logStepDic.Add("标题", checkTitle);
|
|
|
+ logStepDic.Add("分组", condition.groupNo);
|
|
|
logStepDic.Add("匹配条件", getQueryKind(fieldQueryKind));
|
|
|
logStepDic.Add("匹配方式", getQueryModel(fieldQueryModel));
|
|
|
logStepDic.Add("匹配值", fieldQueryValue);
|
|
@@ -1298,6 +1301,7 @@ namespace Util
|
|
|
}
|
|
|
else if(fieldQueryValueType.StartsWith("date"))
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(req[valLeft]) && !string.IsNullOrEmpty(req[valRight]) && DateTime.Parse(checkObj) >= DateTime.Parse(req[valLeft]) && DateTime.Parse(checkObj) <= DateTime.Parse(req[valRight]))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -1356,6 +1360,7 @@ namespace Util
|
|
|
if(valRight == "0") valRight = "";
|
|
|
if(checkObj != "0" && checkObj != "")
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(valLeft) && !string.IsNullOrEmpty(valRight) && DateTime.Parse(checkObj) >= DateTime.Parse(GetExpressionVal(valLeft)) && DateTime.Parse(checkObj) <= DateTime.Parse(GetExpressionVal(valRight)))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -1411,6 +1416,7 @@ namespace Util
|
|
|
if(valRight == "0") valRight = "";
|
|
|
if(checkObj != "0" && checkObj != "")
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(valLeft) && !string.IsNullOrEmpty(valRight) && DateTime.Parse(checkObj) >= DateTime.Parse(GetExpressionVal(valLeft)) && DateTime.Parse(checkObj) <= DateTime.Parse(GetExpressionVal(valRight)))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -1625,6 +1631,7 @@ namespace Util
|
|
|
// if(!sub.recursionFlag)
|
|
|
// {
|
|
|
logStepDic.Add("标题", checkTitle);
|
|
|
+ logStepDic.Add("分组", condition.groupNo);
|
|
|
logStepDic.Add("匹配条件", getQueryKind(fieldQueryKind));
|
|
|
logStepDic.Add("匹配方式", getQueryModel(fieldQueryModel));
|
|
|
logStepDic.Add("匹配值", fieldQueryValue);
|
|
@@ -1708,6 +1715,7 @@ namespace Util
|
|
|
}
|
|
|
else if(fieldQueryValueType.StartsWith("date"))
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(req[valLeft]) && !string.IsNullOrEmpty(req[valRight]) && DateTime.Parse(checkObj) >= DateTime.Parse(req[valLeft]) && DateTime.Parse(checkObj) <= DateTime.Parse(req[valRight]))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -1762,6 +1770,7 @@ namespace Util
|
|
|
if(valRight == "0") valRight = "";
|
|
|
if(checkObj != "0" && checkObj != "")
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(valLeft) && !string.IsNullOrEmpty(valRight) && DateTime.Parse(checkObj.ToString()) >= DateTime.Parse(GetExpressionVal(valLeft)) && DateTime.Parse(checkObj.ToString()) <= DateTime.Parse(GetExpressionVal(valRight)))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -1823,6 +1832,7 @@ namespace Util
|
|
|
if(valRight == "0") valRight = "";
|
|
|
if(checkObj != "0" && checkObj != "")
|
|
|
{
|
|
|
+ checkObj = checkDateTime(checkObj);
|
|
|
if(!string.IsNullOrEmpty(valLeft) && !string.IsNullOrEmpty(valRight) && DateTime.Parse(checkObj.ToString()) >= DateTime.Parse(GetExpressionVal(valLeft)) && DateTime.Parse(checkObj.ToString()) <= DateTime.Parse(GetExpressionVal(valRight)))
|
|
|
{
|
|
|
passCount += 1; passFlag = true;
|
|
@@ -3002,5 +3012,17 @@ namespace Util
|
|
|
if(model == "db_field") return "库内字段";
|
|
|
return model;
|
|
|
}
|
|
|
+
|
|
|
+ //检查时间格式,否则返回默认时间
|
|
|
+ public static string checkDateTime(string date)
|
|
|
+ {
|
|
|
+ DateTime s = DateTime.Now;
|
|
|
+ if(DateTime.TryParse(date, out s))
|
|
|
+ {
|
|
|
+ return date;
|
|
|
+ }
|
|
|
+ return "1900-01-01";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|