|
|
@@ -1092,8 +1092,6 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// <returns></returns>
|
|
|
public JsonResult FirstPosIndexData(string PosSn, int page = 1, int limit = 30)
|
|
|
{
|
|
|
- // string condition = " and Id=0";
|
|
|
- // 机具sn、商户姓名、商户手机号、商户身份证号、绑定时间、激活时间、是否为首台机具、是否已变更、变更时间
|
|
|
string conn = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
|
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
|
if (!string.IsNullOrEmpty(PosSn))
|
|
|
@@ -1102,7 +1100,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (pos.BindMerchantId > 0)
|
|
|
{
|
|
|
var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
|
|
|
- if (mer.Id > 0)
|
|
|
+ if (mer.Id > 0 && !string.IsNullOrEmpty(mer.MerIdcardNo))
|
|
|
{
|
|
|
string MerchantName = Regex.Replace(mer.MerchantName, @"\d|\W|[A-Za-z]", "");
|
|
|
var posMerchants = db.PosMerchantInfo.Where(m => m.MerIdcardNo.ToUpper().StartsWith(mer.MerIdcardNo.ToUpper().Substring(0, 6)) && m.MerIdcardNo.ToUpper().EndsWith(mer.MerIdcardNo.ToUpper().Substring(mer.MerIdcardNo.Length - 4, 4)) && m.MerchantName.Contains(MerchantName)).ToList();
|