中转仓额外订单等功能
This commit is contained in:
1 parent
6c955af70a
commit
1f6e98c440
7 files changed
+164
-44
No files matched your search
@@ -995,6 +995,106 @@ namespace KJD_Web.BLL.WXXD
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询中转仓订单
|
||||
/// </summary>
|
||||
public List<oms_wei_transfer_extra_package> GetTransitExtraPackageTable(
|
||||
int page,
|
||||
int pageSize,
|
||||
string batchId,
|
||||
string order_no,
|
||||
string order_code,
|
||||
string not_count, out int count)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
|
||||
string sql = "";
|
||||
count = -1;
|
||||
|
||||
sql = "SELECT COUNT(*) FROM `erp`.`oms_wei_transfer_extra_package` WHERE 1=1";
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(batchId))
|
||||
where += $" and batchId IN ('{batchId.Replace(",", "','")}')";
|
||||
|
||||
if (!string.IsNullOrEmpty(order_no))
|
||||
where += $" and order_no IN ('{order_no.Replace(",", "','")}')";
|
||||
|
||||
if (!string.IsNullOrEmpty(order_code))
|
||||
where += $" and order_code IN ('{order_code.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_transfer_extra_package` WHERE 1=1";
|
||||
sql += where;
|
||||
sql += " order by id desc limit " + Math.Max(0, page - 1) * pageSize + "," + pageSize + ";";
|
||||
dt = mySql.ExecuteDataTable(sql);
|
||||
}
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
List<oms_wei_transfer_extra_package> oms_wei_transfer_extra_package_list = new List<oms_wei_transfer_extra_package>();
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
oms_wei_transfer_extra_package_list.Add(new oms_wei_transfer_extra_package()
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
buyer_account = row["buyer_account"].ParseToNullableString(),
|
||||
order_no = row["order_no"].ParseToNullableString(),
|
||||
out_amount = row["out_amount"].ParseToNullableInt(),
|
||||
purchaser_note = row["purchaser_note"].ParseToNullableString(),
|
||||
created_time = row["created_time"].ParseToNullableString().ParseToDateTime(),
|
||||
order_code = row["order_code"].ParseToNullableString(),
|
||||
order_platform_code = row["order_platform_code"].ParseToNullableString(),
|
||||
pickup_time = row["pickup_time"].ParseToNullableString().ParseToDateTime(),
|
||||
platform = row["platform"].ParseToNullableString(),
|
||||
raw_message = row["raw_message"].ParseToNullableString(),
|
||||
refund_status = row["refund_status"].ParseToNullableString(),
|
||||
transfer_warehouse_status = row["transfer_warehouse_status"].ParseToNullableInt(),
|
||||
updated_time = row["updated_time"].ParseToNullableString().ParseToDateTime(),
|
||||
random_code = row["random_code"].ParseToNullableString(),
|
||||
order_void_status = row["order_void_status"].ParseToNullableInt(),
|
||||
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
|
||||
inbound_time = row["inbound_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
outbound_time = row["outbound_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
has_reject = row["has_reject"].ParseToNullableInt(),
|
||||
blocked_arrival_time = row["blocked_arrival_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
rejected_time = row["rejected_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
batchId = row["batchId"].ParseToString(),
|
||||
logistics_code = row["logistics_code"].ParseToString(),
|
||||
logistics_express_code = row["logistics_express_code"].ParseToString(),
|
||||
over_weight_fee = row["over_weight_fee"].ParseToNullableInt(),
|
||||
pack_type = row["pack_type"].ParseToString(),
|
||||
postage = row["postage"].ParseToNullableInt(),
|
||||
real_logistics_code = row["real_logistics_code"].ParseToNullableString(),
|
||||
real_logistics_express_code = row["real_logistics_express_code"].ParseToNullableString(),
|
||||
retry_acquire_success = row["retry_acquire_success"].ParseToNullableInt(),
|
||||
});
|
||||
}
|
||||
return oms_wei_transfer_extra_package_list;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(mySql.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改中转仓订单信息(真实物流),临时补救
|
||||
@@ -1140,7 +1240,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 中转仓额外包裹
|
||||
/// 中转仓额外快递包裹
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
@@ -1156,7 +1256,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
var count = -1;
|
||||
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_do"))?.Replace("'", "\\'");
|
||||
string batchId = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "batchId"))?.Replace("'", "\\'");
|
||||
string order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_no"))?.Replace("'", "\\'");
|
||||
string order_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_code"))?.Replace("'", "\\'");
|
||||
string not_count = RegexUtils.GetStringQuery(ref inputData, "not_count")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(order_no) && string.IsNullOrEmpty(order_code))
|
||||
@@ -1164,11 +1265,11 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
try
|
||||
{
|
||||
var oms_wei_external_procurement_log_list = GetTransitOrderTable(page, page_size, order_no, null, null, null, null, not_count, out count);
|
||||
if (oms_wei_external_procurement_log_list != null)
|
||||
var oms_wei_transfer_extra_package = GetTransitExtraPackageTable(page, page_size, batchId, order_no, order_code, not_count, out count);
|
||||
if (oms_wei_transfer_extra_package != null)
|
||||
{
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializeObjectToString(oms_wei_external_procurement_log_list, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(oms_wei_transfer_extra_package, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
|
||||
@@ -1204,6 +1305,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"未指定订单\"}";
|
||||
}
|
||||
var not_upload_pickup_status = RegexUtils.GetStringQuery(ref inputData, "not_upload_pickup_status")?.Replace("'", "\\'");
|
||||
var sort_type = RegexUtils.GetStringQuery(ref inputData, "sort_type")?.Replace("'", "\\'");
|
||||
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") != "false";
|
||||
|
||||
@@ -1218,6 +1320,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
string where = "";
|
||||
if (!string.IsNullOrWhiteSpace(order_id))
|
||||
where += " and o.order_id in ('" + order_id.Replace(",", "','") + "')";
|
||||
if (!string.IsNullOrWhiteSpace(not_upload_pickup_status))
|
||||
where += " and (o.upload_pickup_status IS null or o.upload_pickup_status!=" + not_upload_pickup_status + ")";
|
||||
sql += where;
|
||||
|
||||
var count = 0;
|
||||
@@ -1263,8 +1367,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
remark = row["remark"].ParseToNullableString(),
|
||||
source_tracking_number = row["source_tracking_number"].ParseToNullableString(),
|
||||
tracking_number = row["tracking_number"].ParseToNullableString(),
|
||||
upload_pickup_status = row["id"].ParseToNullableInt(),
|
||||
upload_pickup_Time = row["create_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
upload_pickup_status = row["upload_pickup_status"].ParseToNullableInt(),
|
||||
upload_pickup_Time = row["upload_pickup_Time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
};
|
||||
yhSyncLogisticsList.Add(order);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user