在线寄件尝试 订单过滤功能 订单采购路径功能

This commit is contained in:
wule committed 2026-05-21 22:13:47 +08:00
1 parent ef35522b6a
commit e5910fc100
25 files changed
+5233 -316

No files matched your search

@@ -831,6 +831,97 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXGetRandomAfterSaleList(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var timeCalc = DateTime.Now;
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
}
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
string isDel = RegexUtils.GetStringQuery(ref inputData, "isDel")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "SELECT count(*) FROM `wxxd`.`after_sale` where 1=1";
string where = "";
if (type != null)
where += " and type='" + type + "'";
if (isDel == "true")
where += " and is_del>0";
else
where += " and is_del=0";
sql += where;
sql += ";";
var count = 0;
count = mySql.ExecuteRowCount(sql);
DataTable dt;
if (count == 0)
{
dt = new DataTable();
}
else
{
sql = "SELECT * FROM `wxxd`.`after_sale` where 1=1";
sql += where;
sql += " order by RAND() limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
dt = mySql.ExecuteDataTable(sql);
}
mySql.Close();
if (dt != null)
{
try
{
List<WXAddressInfo> WXAddressInfoLst = new List<WXAddressInfo>();
foreach (DataRow row in dt.Rows)
{
WXAddressInfoLst.Add(new WXAddressInfo()
{
id = row["id"].ParseToInt(),
after_sale_json = row["after_sale_json"].ParseToString(),
coid = row["coid"].ParseToString(),
supplier_name = row["supplier_name"].ParseToString(),
type = row["type"].ParseToString(),
add_time = Convert.ToDateTime(row["add_time"]),
mdy_time = Convert.ToDateTime(row["mdy_time"]),
});
}
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
var data = JsonUtils.SerializeObjectToString(WXAddressInfoLst, jsonSetting);
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
}
catch (Exception ex)
{
return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}";
}
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
/// <summary>
/// 聚水潭等外部平台售后列表
/// </summary>