DuGuYang il y a 2 ans
Parent
commit
6ebb264dba

+ 1 - 1
Areas/Api/Controllers/v1/Main1/MerchantAddInfoController.cs

@@ -215,7 +215,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
             string MatchNo = data["MatchNo"].ToString(); //商户号
             string AliPID = data["AliPID"].ToString(); //支付宝PID
             string WeChatNo = data["WeChatNo"].ToString(); //微信商户号
-            string SubjectType = data["SubjectType"].ToString(); //主体类型(1 个体 2 企业)
+            string SubjectType = data["SubjectType"].ToString(); //主体类型(1 企业 2 个体)
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             Obj = MerchantAddInfoUtil.DirectQueryMerchantTradeInfoDo(MerchantName, Mobile, MakerCode, MatchNo, AliPID, WeChatNo, SubjectType);
             return Obj;

+ 1 - 1
Areas/Api/Controllers/v1/Main2/MerchantAddInfoController.cs

@@ -216,7 +216,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
             string Mobile = data["Mobile"].ToString(); //手机号码
             string MakerCode = data["MakerCode"].ToString(); //所属创客
             string MatchNo = data["MatchNo"].ToString(); //商户号
-            string SubjectType = data["SubjectType"].ToString(); //主体类型(1 个体 2 企业 3 小微)
+            string SubjectType = data["SubjectType"].ToString(); //主体类型(1 企业 2 个体 3 小微)
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             Obj = MerchantAddInfoUtil.DirectQueryMerchantTradeInfoDo(MerchantName, Mobile, MakerCode, MatchNo, SubjectType);
             return Obj;

+ 16 - 5
Util/Main1/MerchantAddInfoUtil.cs

@@ -29,7 +29,7 @@ namespace MySystem.Service.Main1
             Obj.Add("MobilePhone", query.MobilePhone); //联系手机
             Obj.Add("ContactEmail", query.ContactEmail); //联系邮箱
             Obj.Add("SubjectType", query.SubjectType); //主体类型
-                                                       //主体类型名称
+            //主体类型名称
             if (Subjects.ContainsKey(function.CheckNull(query.SubjectType)))
             {
                 Obj.Add("SubjectTypeName", Subjects[function.CheckNull(query.SubjectType)]);
@@ -177,7 +177,7 @@ namespace MySystem.Service.Main1
         /// <param name="MatchNo">商户号</param>
         /// <param name="AliPID">支付宝PID</param>
         /// <param name="WeChatNo">微信商户号</param>
-        /// <param name="SubjectType">主体类型(1 个体 2 企业)</param>
+        /// <param name="SubjectType">主体类型(1 企业 2 个体)</param>
         /// <returns></returns>
         public static Dictionary<string, object> DirectQueryMerchantTradeInfoDo(string MerchantName, string Mobile, string MakerCode, string MatchNo, string AliPID, string WeChatNo, string SubjectType)
         {
@@ -187,10 +187,22 @@ namespace MySystem.Service.Main1
             {
                 condition += " and MerchantName='" + MerchantName + "'";
             }
+            if (!string.IsNullOrEmpty(Mobile))
+            {
+                condition += " and MobilePhone='" + Mobile + "'";
+            }
             if (!string.IsNullOrEmpty(MakerCode))
             {
                 var Ids = MerchantInfoUtil.QueryMerchantIdByMakerCode(MakerCode);
-                condition += " and MerchantId in (" + Ids + ")";
+                condition += " and Id in (" + Ids + ")";
+            }
+            if (!string.IsNullOrEmpty(AliPID))
+            {
+                condition += " and AlipayPid='" + AliPID + "'";
+            }
+            if (!string.IsNullOrEmpty(WeChatNo))
+            {
+                condition += " and SubMchid='" + WeChatNo + "'";
             }
             if (!string.IsNullOrEmpty(SubjectType))
             {
@@ -206,8 +218,7 @@ namespace MySystem.Service.Main1
             var subjectType = 0;
             if (query.SubjectType == "SUBJECT_TYPE_ENTERPRISE") subjectType = 1; //企业公司
             if (query.SubjectType == "SUBJECT_TYPE_INDIVIDUAL") subjectType = 2; //个体工商户
-            if (query.SubjectType == "SUBJECT_TYPE_SMALL") subjectType = 3; //小微
-            Obj.Add("SubjectType", subjectType); //主体类型(1 个体 2 企业 3 小微)
+            Obj.Add("SubjectType", subjectType); //主体类型(1 企业 2 个体)
             Obj.Add("AliPID", query.AlipayPid); //支付宝PID
             Obj.Add("WeChatNo", query.SubMchid); //微信商户号
             Obj.Add("OrderCount", ""); //订单总数

+ 10 - 2
Util/Main2/MerchantAddInfoUtil.cs

@@ -165,7 +165,7 @@ namespace MySystem.Service.Main2
         /// <param name="Mobile">手机号码</param>
         /// <param name="MakerCode">所属创客</param>
         /// <param name="MatchNo">商户号</param>
-        /// <param name="SubjectType">主体类型(1 个体 2 企业 3 小微)</param>
+        /// <param name="SubjectType">主体类型(1 企业 2 个体 3 小微)</param>
         /// <returns></returns>
         public static Dictionary<string, object> DirectQueryMerchantTradeInfoDo(string MerchantName, string Mobile, string MakerCode, string MatchNo, string SubjectType)
         {
@@ -175,11 +175,19 @@ namespace MySystem.Service.Main2
             {
                 condition += " and MerchantName='" + MerchantName + "'";
             }
+            if (!string.IsNullOrEmpty(Mobile))
+            {
+                condition += " and MobilePhone='" + Mobile + "'";
+            }
             if (!string.IsNullOrEmpty(MakerCode))
             {
                 var Ids = MerchantInfoUtil.QueryMerchantIdByMakerCode(MakerCode);
                 condition += " and MerchantId in (" + Ids + ")";
             }
+            if (!string.IsNullOrEmpty(MatchNo))
+            {
+                condition += " and MchtNo='" + MatchNo + "'";
+            }
             if (!string.IsNullOrEmpty(SubjectType))
             {
                 if (SubjectType == "1") SubjectType = "SUBJECT_TYPE_ENTERPRISE"; //企业公司
@@ -195,7 +203,7 @@ namespace MySystem.Service.Main2
             if (query.SubjectType == "SUBJECT_TYPE_ENTERPRISE") subjectType = 1; //企业公司
             if (query.SubjectType == "SUBJECT_TYPE_INDIVIDUAL") subjectType = 2; //个体工商户
             if (query.SubjectType == "SUBJECT_TYPE_SMALL") subjectType = 3; //小微
-            Obj.Add("SubjectType", subjectType); //主体类型(1 个体 2 企业 3 小微)
+            Obj.Add("SubjectType", subjectType); //主体类型(1 企业 2 个体 3 小微)
             Obj.Add("MatchNo", query.MchtNo); //商户号
             Obj.Add("OrderCount", ""); //订单总数
             Obj.Add("TradeAmount", ""); //营业总金额