diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj
index 74735dc..747b2a4 100644
--- a/AllBase/AllBase.csproj
+++ b/AllBase/AllBase.csproj
@@ -220,8 +220,8 @@
-
-
+
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 83752a9..95d1c89 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 1190;
+ public static int VersionCount = 1191;
public static string MainPath = "29wx";
//public static string MainPath = "29wx";
//public static string MainPath = "29pdd";
diff --git a/AllBase/Model/Result/PDDResult/PDDProductInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductInfo.cs
index 9400596..805e954 100644
--- a/AllBase/Model/Result/PDDResult/PDDProductInfo.cs
+++ b/AllBase/Model/Result/PDDResult/PDDProductInfo.cs
@@ -1,4 +1,5 @@
-using System;
+using NaiBa.Util.Extension;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,6 +9,7 @@ namespace AllBase.Model.Result.PDDResult
{
public class PDDProductInfo
{
+ public bool no_source_json { get { return string.IsNullOrEmpty(source_json.ParseToString()); } set { } }
public PDDProductDetailInfo detail { get; set; }
public PDDSizeSpecInfo size { get; set; }
public PDDProductDecorationInfo decoration { get; set; }
diff --git a/AllBase/Model/Result/PDDResult/PddBuyerAfterSaleInfoLite.cs b/AllBase/Model/Result/PDDResult/PddBuyerAfterSaleLiteInfo.cs
similarity index 98%
rename from AllBase/Model/Result/PDDResult/PddBuyerAfterSaleInfoLite.cs
rename to AllBase/Model/Result/PDDResult/PddBuyerAfterSaleLiteInfo.cs
index 1afae63..89e733f 100644
--- a/AllBase/Model/Result/PDDResult/PddBuyerAfterSaleInfoLite.cs
+++ b/AllBase/Model/Result/PDDResult/PddBuyerAfterSaleLiteInfo.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace AllBase.Model.Result.PDDResult
{
- public class PddBuyerAfterSaleInfoLite
+ public class PddBuyerAfterSaleLiteInfo
{
public string buyerId { get; set; } // 买手Id
public string buyerName { get; set; } // 买手名称
diff --git a/AllBase/Model/Result/PDDResult/PddBuyerOrderInfoLite.cs b/AllBase/Model/Result/PDDResult/PddBuyerOrderLiteInfo.cs
similarity index 99%
rename from AllBase/Model/Result/PDDResult/PddBuyerOrderInfoLite.cs
rename to AllBase/Model/Result/PDDResult/PddBuyerOrderLiteInfo.cs
index 2e026ba..88e6323 100644
--- a/AllBase/Model/Result/PDDResult/PddBuyerOrderInfoLite.cs
+++ b/AllBase/Model/Result/PDDResult/PddBuyerOrderLiteInfo.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace AllBase.Model.Result.PDDResult
{
- public class PddBuyerOrderInfoLite
+ public class PddBuyerOrderLiteInfo
{
//平台快递编码 微信快递名称 PDD
//EMS EMS 邮政快递包裹
@@ -128,6 +128,7 @@ namespace AllBase.Model.Result.PDDResult
{
public order_hint order_hint { get; set; }
}
+
public class order_hint
{
public string type { get; set; } // "express_info",
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index 26acc9e..1f1677c 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -958,6 +958,25 @@ namespace KJD_Web.BLL.BXX
mySql.Close();
}
}
+ if (prod.product_json.Contains("\"source_json\"") && !prod.product_json.Contains("\"source_json\":null"))
+ {
+ mySql = new MysqlUtils(conn);
+ try
+ {
+ JObject jObj = JsonUtils.JObjectParse(prod.product_json);
+ jObj["source_json"] = null;
+ var newProdJson = JsonUtils.SerializeObject(jObj);
+ sql = "update bxx.product set product_json=@product_json where spu_id='" + prod.spu_id + "'";
+ paramLst = new List();
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_json", Value = newProdJson, });
+ mySql.ExecuteNonQuery(sql, paramLst.ToArray());
+ prod.product_json = newProdJson;
+ }
+ catch
+ {
+ }
+ mySql.Close();
+ }
}
if (!string.IsNullOrEmpty(get_select_count))
{
diff --git a/KJDService/KJD_WebService/BLL/KJD/UpdateManage.cs b/KJDService/KJD_WebService/BLL/KJD/UpdateManage.cs
index 7161248..dc29b16 100644
--- a/KJDService/KJD_WebService/BLL/KJD/UpdateManage.cs
+++ b/KJDService/KJD_WebService/BLL/KJD/UpdateManage.cs
@@ -140,5 +140,78 @@ namespace KJD_Web.BLL
}
return "{\"code\":19999,\"msg\":\"未知错误\"}";
}
+
+
+ public string GetWxFindOrderUpdate(string inputData)
+ {
+ //string time1 = Encryption(time);
+ //return "time=" + time + "&code=" + time1 + "&NbCodeVersion=1" + "&version=" + BaseClass.VersionCount
+
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = 0;
+ int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ var path = RegexUtils.GetStringQuery(ref inputData, "path");
+
+ var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
+ var serverVersion = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateVersion"].ConnectionString;
+ var UpdateFileNewUrl = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateWxFindOrderUrl"].ConnectionString;
+ var UpdateExe = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExe"].ConnectionString;
+ var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
+ var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["WxFindOrderLowVersion"].ConnectionString;
+
+ if (version > LowVersion.ParseToInt())
+ {
+ //if (path != null)
+ {
+ try
+ {
+ var fileDir = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateWxFindOrderFileDir"].ConnectionString;
+ //if (path == "29wx")
+ {
+ var file = Directory.GetFiles(fileDir);
+ var versionTmp = 0;
+ foreach (var f in file)
+ {
+ var v = Path.GetFileName(f).Replace("WxFindOrderUpdate", "").Replace(".zip", "").ParseToInt();
+ if (v > versionTmp && v <= serverVersion.ParseToInt())
+ {
+ versionTmp = v;
+ }
+ }
+ if (versionTmp > 0)
+ {
+ serverVersion = versionTmp.ToString();
+ return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
+ "\",\"exe_address\":\"" + UpdateExe + "\",\"file_address\":\"" + UpdateFileNewUrl + "WxFindOrderUpdate" + serverVersion + ".zip\"}";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ //return "{\"code\":500,\"msg\":\"升级文件查询失败\"}";
+ }
+ }
+
+ if (serverVersion.ParseToInt() > 1159)
+ serverVersion = 1159.ToString();
+ return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
+ "\",\"exe_address\":\"" + UpdateExe + "\",\"file_address\":\"" + UpdateFileNewUrl + "WxFindOrderUpdate" + serverVersion + ".zip\"}";
+ }
+ else if (version > 0)
+ {
+ return "{\"code\":501,\"msg\":\"版本过低已无法直接升级,请联系管理员获取最新安装包\"}";
+ }
+ else
+ {
+ return "{\"code\":502,\"msg\":\"get update version failed\"}";
+ }
+ }
+ return "{\"code\":19999,\"msg\":\"未知错误\"}";
+ }
}
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXOrderManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXOrderManage.cs
index 95f1e0d..ccc47b2 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXOrderManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXOrderManage.cs
@@ -1,5 +1,6 @@
using KJD_Web.Model.WxModel;
using KJD_Web.Utils;
+using MySql.Data.MySqlClient;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
using System;
@@ -425,5 +426,360 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
+
+
+
+
+ ///
+ /// 微信添加修改采购映射商品(含sku映射和)
+ ///
+ ///
+ ///
+ public string WXAddMdyBuyProdMap(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ if (!WXUserManage.GetSign(inputData))
+ return "{\"code\":999,\"msg\":\"校验失败\"}";
+
+ // 软件用户名
+ string spu_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "spu_code"))?.Replace("'", "\\'");
+ string sku_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_code"))?.Replace("'", "\\'");
+ string user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_user_name"))?.Replace("'", "\\'");
+ string map_url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "map_url"))?.Replace("'", "\\'");
+ string map_goods_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "map_goods_name"))?.Replace("'", "\\'");
+ string map_spec_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "map_spec_name"))?.Replace("'", "\\'");
+ string map_goods_id = RegexUtils.GetStringQuery(ref inputData, "map_goods_id")?.Replace("'", "\\'");
+ string map_sku_id = RegexUtils.GetStringQuery(ref inputData, "map_sku_id")?.Replace("'", "\\'");
+ string map_send_address = RegexUtils.GetStringQuery(ref inputData, "map_send_address")?.Replace("'", "\\'");
+ string transit_warehouse_id = RegexUtils.GetStringQuery(ref inputData, "transit_warehouse_id")?.Replace("'", "\\'");
+
+ if (string.IsNullOrEmpty(spu_code) || string.IsNullOrEmpty(sku_code))
+ return "{\"code\":500,\"msg\":\"缺少系统商品或SKU编号\"}";
+ if (string.IsNullOrEmpty(user_name))
+ return "{\"code\":500,\"msg\":\"缺少用户名\"}";
+ if (string.IsNullOrEmpty(map_url) && (string.IsNullOrEmpty(map_goods_id) || string.IsNullOrEmpty(map_sku_id)))
+ return "{\"code\":500,\"msg\":\"缺少采购商品信息\"}";
+ if (string.IsNullOrEmpty(transit_warehouse_id))
+ return "{\"code\":500,\"msg\":\"缺少中转仓信息\"}";
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "SELECT 1 FROM `bxx`.`product_buy_map` where user_name='" + user_name + "' AND spu_code='" + spu_code + "' AND sku_code='" + sku_code + "'";
+ string where = "";
+ sql += where;
+ var exist = mySql.ExecuteFirstInt(sql);
+ if (!mySql.Message.IsNullOrEmpty())
+ {
+ mySql.Close();
+ return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
+ }
+
+ if (exist == 0)
+ {
+ sql = " INSERT INTO `bxx`.`product_buy_map` (user_name,spu_code,sku_code,map_url,map_goods_name,map_spec_name,map_goods_id,map_sku_id,map_send_address,transit_warehouse_id)" +
+ " VALUES (@user_name,@spu_code,@sku_code,@map_url,@map_goods_name,@map_spec_name,@map_goods_id,@map_sku_id,@map_send_address,@transit_warehouse_id);";
+ }
+ else
+ {
+ sql = "UPDATE `bxx`.`product_buy_map` SET ";
+ if (map_url != null)
+ sql += " map_url=@map_url,";
+ if (map_goods_name != null)
+ sql += " map_goods_name=@map_goods_name,";
+ if (map_spec_name != null)
+ sql += " map_spec_name=@map_spec_name,";
+ if (map_goods_id != null)
+ sql += " map_goods_id=@map_goods_id,";
+ if (map_sku_id != null)
+ sql += " map_sku_id=@map_sku_id,";
+ if (map_send_address != null)
+ sql += " map_send_address=@map_send_address,";
+ if (transit_warehouse_id != null)
+ sql += " transit_warehouse_id=@transit_warehouse_id,";
+ sql = sql.TrimEnd(',');
+ sql += " WHERE user_name=@user_name and spu_code=@spu_code and sku_code=@sku_code;";
+ }
+
+ List paramLst = new List();
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = user_name, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "spu_code", Value = spu_code, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "sku_code", Value = sku_code, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_url", Value = map_url, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_goods_name", Value = map_goods_name, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_spec_name", Value = map_spec_name, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_goods_id", Value = map_goods_id, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_sku_id", Value = map_sku_id, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "map_send_address", Value = map_send_address, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "transit_warehouse_id", Value = transit_warehouse_id, });
+ mySql.ExecuteNonQuery(sql, paramLst.ToArray());
+ mySql.Close();
+ if (string.IsNullOrEmpty(mySql.Message))
+ {
+ return "{\"code\":200,\"msg\":\"success\",\"data\":\"\"}";
+ }
+ else
+ {
+ return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
+ }
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
+
+ ///
+ /// 微信获取采购映射商品
+ ///
+ ///
+ ///
+ public string WXGetBuyPordMap(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ if (!WXUserManage.GetSign(inputData))
+ return "{\"code\":999,\"msg\":\"校验失败\"}";
+ var timeCalc = DateTime.Now;
+
+ int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
+ string spu_codes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "spu_codes"))?.Replace("'", "\\'");
+ string sku_codes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_codes"))?.Replace("'", "\\'");
+ string user_name = RegexUtils.GetStringQuery(ref inputData, "main_user_name")?.Replace("'", "\\'");
+ string not_count = RegexUtils.GetStringQuery(ref inputData, "not_count")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(spu_codes))
+ return "{\"code\":500,\"msg\":\"商品编码不能为空\"}";
+ if (string.IsNullOrEmpty(user_name))
+ return "{\"code\":500,\"msg\":\"用户名不能为空\"}";
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "";
+ var count = -1;
+
+ sql = "SELECT COUNT(*) FROM `bxx`.`product_buy_map` WHERE 1=1";
+ string where = "";
+ if (spu_codes != null)
+ where += " and spu_code IN ('" + spu_codes.Replace(",", "','") + "')";
+ if (sku_codes != null)
+ where += " and sku_code IN ('" + sku_codes.Replace(",", "','") + "')";
+ if (user_name != null)
+ where += " and user_name='" + user_name + "'";
+ sql += where;
+ sql += ";";
+
+ if (not_count == "false")
+ count = mySql.ExecuteRowCount(sql);
+
+ DataTable dt;
+ if (count == 0)
+ {
+ dt = new DataTable();
+ }
+ else
+ {
+ sql = "SELECT * FROM `bxx`.`product_buy_map` WHERE 1=1";
+ sql += where;
+ sql += " order by id desc limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
+ dt = mySql.ExecuteDataTable(sql);
+ }
+ mySql.Close();
+
+ if (dt != null)
+ {
+ try
+ {
+ List WXBuyMapInfoLst = new List();
+ foreach (DataRow row in dt.Rows)
+ {
+ WXBuyMapInfoLst.Add(new WXBuyMapInfo()
+ {
+ id = row["id"].ParseToInt(),
+ user_name = row["user_name"].ParseToString(),
+ spu_code = row["spu_code"].ParseToString(),
+ sku_code = row["sku_code"].ParseToString(),
+ map_url = row["map_url"].ParseToString(),
+ map_goods_name = row["map_goods_name"].ParseToString(),
+ map_spec_name = row["map_spec_name"].ParseToString(),
+ map_goods_id = row["map_goods_id"].ParseToString(),
+ map_sku_id = row["map_sku_id"].ParseToString(),
+ map_send_address = row["map_send_address"].ParseToString(),
+ transit_warehouse_id = row["transit_warehouse_id"].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(WXBuyMapInfoLst, 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\":\"输入为空\"}";
+ }
+
+ ///
+ /// 获取中转仓订单信息
+ ///
+ ///
+ ///
+ public string WXGetTransitOrder(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ if (!WXUserManage.GetSign(inputData))
+ return "{\"code\":999,\"msg\":\"校验失败\"}";
+ var timeCalc = DateTime.Now;
+
+ int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
+ string order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_no"))?.Replace("'", "\\'");
+ string order_sku_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_sku_id"))?.Replace("'", "\\'");
+ string out_order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "out_order_no"))?.Replace("'", "\\'");
+ string not_count = RegexUtils.GetStringQuery(ref inputData, "not_count")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(order_no) && string.IsNullOrEmpty(out_order_no) && string.IsNullOrEmpty(order_sku_id))
+ return "{\"code\":500,\"msg\":\"商品查询信息不能为空\"}";
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "";
+ var count = -1;
+
+ sql = "SELECT COUNT(*) FROM `erp`.`oms_wei_external_procurement_log` WHERE 1=1";
+ string where = "";
+ if (order_no != null)
+ where += " and order_no IN ('" + order_no.Replace(",", "','") + "')";
+ if (order_sku_id != null)
+ where += " and order_sku_id IN ('" + order_sku_id.Replace(",", "','") + "')";
+ if (out_order_no != null)
+ where += " and out_order_no IN ('" + out_order_no.Replace(",", "','") + "')";
+ sql += where;
+ sql += ";";
+
+ if (not_count == "false")
+ count = mySql.ExecuteRowCount(sql);
+
+ DataTable dt;
+ if (count == 0)
+ {
+ dt = new DataTable();
+ }
+ else
+ {
+ sql = "SELECT * FROM `erp`.`oms_wei_external_procurement_log` WHERE 1=1";
+ sql += where;
+ sql += " order by id desc limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
+ dt = mySql.ExecuteDataTable(sql);
+ }
+ mySql.Close();
+
+ if (dt != null)
+ {
+ try
+ {
+ List oms_wei_external_procurement_log_list = new List();
+ foreach (DataRow row in dt.Rows)
+ {
+ oms_wei_external_procurement_log_list.Add(new oms_wei_external_procurement_log()
+ {
+ id = row["id"].ParseToInt(),
+ buyer_account = row["buyer_account"].ParseToString(),
+ order_no = row["order_no"].ParseToString(),
+ order_sku_id = row["order_sku_id"].ParseToString(),
+ out_amount = row["out_amount"].ParseToNullableInt(),
+ out_order_no = row["out_order_no"].ParseToString(),
+ purchaser_note = row["purchaser_note"].ParseToString(),
+ created_time = row["created_time"].ParseToString().ParseToDateTime(),
+ express_1_company = row["express_1_company"].ParseToString(),
+ express_1_waybill = row["express_1_waybill"].ParseToString(),
+ express_2_company = row["express_2_company"].ParseToString(),
+ express_2_waybill = row["express_2_waybill"].ParseToString(),
+ order_code = row["order_code"].ParseToString(),
+ order_platform_code = row["order_platform_code"].ParseToString(),
+ pickup_time = row["pickup_time"].ParseToString().ParseToDateTime(),
+ platform = row["platform"].ParseToString(),
+ pre_allocated_order_no = row["pre_allocated_order_no"].ParseToNullableInt(),
+ raw_message = row["raw_message"].ParseToString(),
+ refund_status = row["refund_status"].ParseToString(),
+ transfer_warehouse_status = row["transfer_warehouse_status"].ParseToNullableInt(),
+ updated_time = row["updated_time"].ParseToString().ParseToDateTime(),
+ });
+ }
+ JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
+ var data = JsonUtils.SerializeObjectToString(oms_wei_external_procurement_log_list, 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\":\"输入为空\"}";
+ }
+
+ ///
+ /// 修改中转仓订单信息,临时补救
+ ///
+ ///
+ ///
+ public string WXUpdateErpOrderExpress(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ if (!WXUserManage.GetSign(inputData))
+ return "{\"code\":999,\"msg\":\"校验失败\"}";
+ var timeCalc = DateTime.Now;
+
+ int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
+ string out_order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "out_order_no"))?.Replace("'", "\\'");
+ string express_1_company = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "express_1_company"))?.Replace("'", "\\'");
+ string express_1_waybill = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "express_1_waybil"))?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(out_order_no))
+ return "{\"code\":500,\"msg\":\"订单外部ID信息不能为空\"}";
+ if (string.IsNullOrEmpty(express_1_company))
+ return "{\"code\":500,\"msg\":\"物流公司不能为空\"}";
+ if (string.IsNullOrEmpty(express_1_waybill))
+ return "{\"code\":500,\"msg\":\"物流单号不能为空\"}";
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "";
+ var count = -1;
+
+ sql = " update `erp`.`oms_wei_external_procurement_log` ";
+ sql += " set express_1_company='" + express_1_company + "',";
+ sql += " express_1_waybill='" + express_1_waybill + "',";
+ sql = sql.TrimEnd(',');
+ sql += " where out_order_no = '" + out_order_no + "';";
+
+ count = mySql.ExecuteAffectedRows(sql);
+ mySql.Close();
+
+ if (!string.IsNullOrEmpty(mySql.Message))
+ {
+ return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + count + "}";
+ }
+ return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + count + "}";
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
}
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj
index 6a85572..28573b9 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj
@@ -130,6 +130,7 @@
+
diff --git a/KJDService/KJD_WebService/Model/WxModel/WXBuyUrlNotesInfo.cs b/KJDService/KJD_WebService/Model/WxModel/WXBuyUrlNotesInfo.cs
index 97c19a1..b065ca9 100644
--- a/KJDService/KJD_WebService/Model/WxModel/WXBuyUrlNotesInfo.cs
+++ b/KJDService/KJD_WebService/Model/WxModel/WXBuyUrlNotesInfo.cs
@@ -14,4 +14,27 @@ namespace KJD_Web.Model.WxModel
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
}
+
+ public class WXBuyMapInfo
+ {
+ public long id { get; set; }
+ public string user_name { get; set; }
+ public string spu_code { get; set; }
+ public string sku_code { get; set; }
+ public string map_url { get; set; }
+ public string map_goods_name { get; set; }
+ ///
+ /// sku规格名称
+ ///
+ public string map_spec_name { get; set; }
+ public string map_goods_id { get; set; }
+ public string map_sku_id { get; set; }
+ ///
+ /// 发货地(省,市)
+ ///
+ public string map_send_address { get; set; }
+ public string transit_warehouse_id { get; set; }
+ public DateTime add_time { get; set; }
+ public DateTime mdy_time { get; set; }
+ }
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/Model/WxModel/oms_wei_external_procurement_log.cs b/KJDService/KJD_WebService/Model/WxModel/oms_wei_external_procurement_log.cs
new file mode 100644
index 0000000..b51f344
--- /dev/null
+++ b/KJDService/KJD_WebService/Model/WxModel/oms_wei_external_procurement_log.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace KJD_Web.Model.WxModel
+{
+ public class oms_wei_external_procurement_log
+ {
+ public long id { get; set; }
+ public string out_order_no { get; set; }
+ public string order_no { get; set; }
+ public string order_sku_id { get; set; }
+ public string buyer_account { get; set; }
+ public int? out_amount { get; set; }
+ public string purchaser_note { get; set; }
+ public string express_1_company { get; set; }
+ public string express_1_waybill { get; set; }
+ public string express_2_company { get; set; }
+ public string express_2_waybill { get; set; }
+ public string refund_status { get; set; }
+ public DateTime pickup_time { get; set; }
+ ///
+ /// 中转仓状态:0 未使用,1 已创建,2 创建失败
+ ///
+ public int? transfer_warehouse_status { get; set; }
+ public string raw_message { get; set; }
+ public DateTime created_time { get; set; }
+ public DateTime updated_time { get; set; }
+ public string platform { get; set; }
+ public string order_platform_code { get; set; }
+ public string order_code { get; set; }
+ ///
+ /// 1正常取号 2提前取号
+ ///
+ public int? pre_allocated_order_no { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/UpdateService.asmx.cs b/KJDService/KJD_WebService/UpdateService.asmx.cs
index 75a0d02..61eb626 100644
--- a/KJDService/KJD_WebService/UpdateService.asmx.cs
+++ b/KJDService/KJD_WebService/UpdateService.asmx.cs
@@ -78,5 +78,17 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
+
+ [WebMethod]
+ public void get_wx_finder_order_update()
+ {
+ var jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new UpdateManage().GetWxFindOrderUpdate(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
}
}
diff --git a/KJDService/KJD_WebService/WXOrderService.asmx.cs b/KJDService/KJD_WebService/WXOrderService.asmx.cs
index 07b540b..4f889f0 100644
--- a/KJDService/KJD_WebService/WXOrderService.asmx.cs
+++ b/KJDService/KJD_WebService/WXOrderService.asmx.cs
@@ -87,5 +87,59 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
+
+
+ [WebMethod]
+ public void wx_add_mdy_buy_prod_map()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXOrderManage().WXAddMdyBuyProdMap(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+ [WebMethod]
+ public void wx_get_buy_prod_map()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXOrderManage().WXGetBuyPordMap(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+
+ ///
+ /// 获取中转仓订单信息
+ ///
+ [WebMethod]
+ public void wx_get_transit_order()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXOrderManage().WXGetTransitOrder(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+
+ ///
+ /// 获取中转仓订单信息
+ ///
+ [WebMethod]
+ public void wx_update_erp_order_express()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXOrderManage().WXUpdateErpOrderExpress(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
}
}
diff --git a/KJDService/KJD_WebService/Web.config b/KJDService/KJD_WebService/Web.config
index 5f56a64..69750d7 100644
--- a/KJDService/KJD_WebService/Web.config
+++ b/KJDService/KJD_WebService/Web.config
@@ -20,6 +20,11 @@
+
+
+
+
+