oem账户管理问题修复 微信食品标签图

This commit is contained in:
wule_5900x committed 2026-07-20 07:38:23 +08:00
1 parent ba502650ab
commit c7ab757152
10 files changed
+663 -478

No files matched your search

@@ -674,6 +674,8 @@ namespace KJD_Web.BLL.BXX
forceIndex.Add("index_from_shop_id");
if (!from_shop_name.IsNullOrEmpty())
forceIndex.Add("index_from_shop_name");
if (!ext_code_in.IsNullOrEmpty() || !search_ext_code.IsNullOrEmpty())
forceIndex.Add("index_ext_code");
//if (!add_user_name.IsNullOrEmpty())
// forceIndex.Add("index_add_user_name");
@@ -88,11 +88,11 @@ namespace KJD_Web.BLL.WXXD
string where = "";
if (!string.IsNullOrEmpty(oem_id))
where += " and p.oem_id in ('" + oem_id.Replace(",", "','") + "')";
where += " and oem_id in ('" + oem_id.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(oem_name))
where += " and p.oem_name in ('" + oem_name.Replace(",", "','") + "')";
where += " and oem_name in ('" + oem_name.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(oem_owner))
where += " and p.oem_owner in ('" + oem_owner.Replace(",", "','") + "')";
where += " and oem_owner in ('" + oem_owner.Replace(",", "','") + "')";
sql += where;
sql += " ORDER BY add_time DESC;";
@@ -1291,5 +1291,86 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXUpdateAbnormalTransitOrder(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var out_order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "out_order_no"))?.Replace("'", "\\'");
var order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_no"))?.Replace("'", "\\'");
var order_sku_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_sku_id"))?.Replace("'", "\\'");
var buyer_account = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "buyer_account"))?.Replace("'", "\\'");
var out_amount = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "out_amount"))?.Replace("'", "\\'");
var purchaser_note = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "purchaser_note"))?.Replace("'", "\\'");
var refund_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "refund_status"))?.Replace("'", "\\'");
var old_out_order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_out_order_no"))?.Replace("'", "\\'");
var old_order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_order_no"))?.Replace("'", "\\'");
var old_order_sku_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_order_sku_id"))?.Replace("'", "\\'");
var old_buyer_account = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_buyer_account"))?.Replace("'", "\\'");
var old_out_amount = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_out_amount"))?.Replace("'", "\\'");
var old_purchaser_note = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_purchaser_note"))?.Replace("'", "\\'");
var old_refund_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "old_refund_status"))?.Replace("'", "\\'");
var order_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_code"))?.Replace("'", "\\'");
if(order_code.IsNullOrEmpty() || old_purchaser_note.IsNullOrEmpty() || old_out_amount.ParseToInt().IsNullOrZero() || old_buyer_account.IsNullOrEmpty() || old_order_no.IsNullOrEmpty() || old_out_order_no.IsNullOrEmpty() ||
purchaser_note.IsNullOrEmpty() || out_amount.ParseToInt().IsNullOrZero() || buyer_account.IsNullOrEmpty() || order_no.IsNullOrEmpty() || out_order_no.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"异常单记录信息不完整\",\"affected_rows\":" + 0 + "}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn, true);
string sql;
sql = "INSERT INTO wxxd.order_abnormal_order_record (out_order_no,order_no,order_sku_id,buyer_account,out_amount,purchaser_note,refund_status,order_code) ";
sql += " VALUES('" + old_out_order_no + "','" + old_order_no + "','" + old_order_sku_id + "','" + old_buyer_account + "'," + old_out_amount + ",'" +
old_purchaser_note + "','" + old_refund_status + "','" + order_code + "')";
var rows = mySql.ExecuteAffectedRows(sql);
if (!mySql.Message.IsNullOrEmpty())
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + rows + "}";
}
if (rows == 0)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"创建异常单记录失败\",\"affected_rows\":" + rows + "}";
}
sql = "UPDATE erp.oms_wei_external_procurement_log SET ";
sql += " out_order_no='" + out_order_no + "',";
sql += " order_no='" + order_no + "',";
sql += " order_sku_id='" + order_sku_id + "',";
sql += " buyer_account='" + buyer_account + "',";
sql += " out_amount=" + out_amount + ",";
sql += " purchaser_note='" + purchaser_note + "',";
sql += " refund_status='" + refund_status + "',";
sql = sql.TrimEnd(',');
sql += " WHERE order_code='" + order_code + "' AND order_no='" + old_order_no + "';";
rows = mySql.ExecuteAffectedRows(sql);
if (!mySql.Message.IsNullOrEmpty())
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + rows + "}";
}
if (rows == 0)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"更新异常单拍单失败\",\"affected_rows\":" + rows + "}";
}
mySql.Commit();
mySql.Close();
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + rows + "}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}
@@ -91,7 +91,7 @@ namespace KJD_Web
[WebMethod]
public void get_refund_list()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
@@ -124,7 +124,7 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
/// <summary>
/// 获取中转仓订单信息
/// </summary>
@@ -222,7 +222,7 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void wx_get_transit_warehouse_aftersale_list()
@@ -235,5 +235,18 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void wx_update_abnormal_transit_order()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXOrderManage().WXUpdateAbnormalTransitOrder(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
}
}