Merge branch 'master' of https://github.com/KJD2025/KJD_WebService
This commit is contained in:
commit
43a11a4015
7 files changed
+164
-44
No files matched your search
@@ -1134,7 +1134,9 @@ namespace KJD_Web.BLL.BXX
|
||||
if (!WXShopManage.GetTimeSign(sign))
|
||||
return "{\"code\":500,\"msg\":\"校验失败\"}";
|
||||
|
||||
var wx_safe_status = "安全商品,未校验";
|
||||
var wx_safe_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_safe_status"))?.Replace("'", "\\'");
|
||||
if (string.IsNullOrWhiteSpace(wx_safe_status))
|
||||
wx_safe_status = "安全商品,未校验";
|
||||
var special_prod_type = "爆款数据";
|
||||
|
||||
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -156,6 +156,16 @@ namespace KJD_Web.Controllers.WX
|
||||
return JsonString(result);
|
||||
}
|
||||
|
||||
public IHttpActionResult wx_get_transfer_extra_package()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOrderManage().WXGetTransferExtraPackage(jsontext);
|
||||
|
||||
return JsonString(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询同步单列表
|
||||
/// </summary>
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
<Compile Include="Controllers\UserController.cs" />
|
||||
<Compile Include="Mappers\WeOrderMapper.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_ewaybill_path.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_transfer_extra_package.cs" />
|
||||
<Compile Include="Model\WxModel\yh_sync_logistics.cs" />
|
||||
<Compile Include="Requests\RequestBase.cs" />
|
||||
<Compile Include="Requests\Users\CUUserInfoRequest.cs" />
|
||||
|
||||
@@ -6,38 +6,41 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace KJD_Web.Model.WxModel;
|
||||
public class oms_wei_transfer_extra_package
|
||||
namespace KJD_Web.Model.WxModel
|
||||
{
|
||||
public long id { get; set; } // 主键ID
|
||||
public string batchId { get; set; } // 新订单号
|
||||
public string order_no { get; set; } // 平台订单号
|
||||
public string buyer_account { get; set; } // '买家账号',
|
||||
public int out_amount { get; set; } // '外部金额(分)',
|
||||
public string purchaser_note { get; set; } // '采购人备注'
|
||||
public string logistics_code { get; set; } // '快递公司',
|
||||
public string logistics_express_code { get; set; } // '快递单号',
|
||||
public string real_logistics_code { get; set; } // '出库快递公司',
|
||||
public string real_logistics_express_code { get; set; } // '出库单号',
|
||||
public string refund_status { get; set; } // '买手退款状态',
|
||||
public DateTime pickup_time { get; set; } // '取号时间',
|
||||
public int transfer_warehouse_status { get; set; } // '中转仓状态:0 未使用,1 已创建,2 创建失败',
|
||||
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; } // '唯一值编码',
|
||||
public string random_code { get; set; } // '溯源码',
|
||||
public int warehouse_status { get; set; } // '0: 未使用, 1: 已入库, 2: 未入库',
|
||||
public DateTime inbound_time { get; set; } // '入库时间',
|
||||
public DateTime outbound_time { get; set; } // '出库时间',
|
||||
public int order_void_status { get; set; } // '订单作废状态:0=正常,1=已作废,2=作废失败',
|
||||
public int postage { get; set; } // '订单初始费用(分)',
|
||||
public int retry_acquire_success { get; set; } // '重试取号是否成功 0=未尝试/未重试 1=成功 2=失败',
|
||||
public int over_weight_fee { get; set; } // '超重费用',
|
||||
public string pack_type { get; set; } // '中转仓额外包裹类型 1商品2额外3礼品4退货',
|
||||
public DateTime rejected_time { get; set; } // '拒收时间',
|
||||
public int? has_reject { get; set; } // DEFAULT NULL,
|
||||
public DateTime? blocked_arrival_time { get; set; }
|
||||
public class oms_wei_transfer_extra_package
|
||||
{
|
||||
public long id { get; set; } // 主键ID
|
||||
public string batchId { get; set; } // 新订单号
|
||||
public string order_no { get; set; } // 平台订单号
|
||||
public string buyer_account { get; set; } // '买家账号',
|
||||
public int? out_amount { get; set; } // '外部金额(分)',
|
||||
public string purchaser_note { get; set; } // '采购人备注'
|
||||
public string logistics_code { get; set; } // '快递公司',
|
||||
public string logistics_express_code { get; set; } // '快递单号',
|
||||
public string real_logistics_code { get; set; } // '出库快递公司',
|
||||
public string real_logistics_express_code { get; set; } // '出库单号',
|
||||
public string refund_status { get; set; } // '买手退款状态',
|
||||
public DateTime? pickup_time { get; set; } // '取号时间',
|
||||
public int? transfer_warehouse_status { get; set; } // '中转仓状态:0 未使用,1 已创建,2 创建失败',
|
||||
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; } // '唯一值编码',
|
||||
public string random_code { get; set; } // '溯源码',
|
||||
public int? warehouse_status { get; set; } // '0: 未使用, 1: 已入库, 2: 未入库',
|
||||
public DateTime? inbound_time { get; set; } // '入库时间',
|
||||
public DateTime? outbound_time { get; set; } // '出库时间',
|
||||
public int? order_void_status { get; set; } // '订单作废状态:0=正常,1=已作废,2=作废失败',
|
||||
public int? postage { get; set; } // '订单初始费用(分)',
|
||||
public int? retry_acquire_success { get; set; } // '重试取号是否成功 0=未尝试/未重试 1=成功 2=失败',
|
||||
public int? over_weight_fee { get; set; } // '超重费用',
|
||||
public string pack_type { get; set; } // '中转仓额外包裹类型 1商品2额外3礼品4退货',
|
||||
public DateTime? rejected_time { get; set; } // '拒收时间',
|
||||
public int? has_reject { get; set; } // DEFAULT NULL,
|
||||
public DateTime? blocked_arrival_time { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -433,7 +433,7 @@ namespace KJD_Web.Services.Users
|
||||
var payItem = new UserPaymentRecordEntity
|
||||
{
|
||||
Type = (int)type,
|
||||
Amount = (user.SyncLogisticsPerOrder ?? 0.0m) + 1.7m,
|
||||
Amount = (user.SyncLogisticsPerOrder ?? 0.0m) + 1.9m,
|
||||
UserName = user.UserName,
|
||||
PlatformCode = "WEISHOP",
|
||||
OrderId = orderId,
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace Store.VirtualLogistics.Services;
|
||||
public class VirtualLogisticsService : ITransientDependency
|
||||
{
|
||||
/// <summary>
|
||||
/// 固定费用1.7元
|
||||
/// 固定费用1.7元->1.9元(260927涨价啦)
|
||||
/// </summary>
|
||||
const decimal FIXEDFEES = 1.7m;
|
||||
const decimal FIXEDFEES = 1.9m;
|
||||
private IFreeSql _freeSql;
|
||||
private readonly ILoggerFacade _logger;
|
||||
private readonly IUserService _userService;
|
||||
|
||||
Reference in new issue
Block a user