1代理改名字 2代理管理功能 3订单流水统计功能(方便报税) 4 商品预售界面-商品改价支持加减乘除四种模式

This commit is contained in:
wule committed 2026-07-18 18:29:06 +08:00
1 parent 457a8acee6
commit ba502650ab
69 files changed
+27720 -720

No files matched your search

@@ -738,6 +738,9 @@ namespace KJD_Web.BLL.WXXD
random_code = row["random_code"].ParseToString(),
transfer_refund_status = row["transfer_refund_status"].ParseToNullableInt(),
order_void_status = row["order_void_status"].ParseToNullableInt(),
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
inbound_time = row["inbound_time"].ParseToString().ParseToDateTimeNullable(),
outbound_time = row["outbound_time"].ParseToString().ParseToDateTimeNullable(),
});
}
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
@@ -926,8 +929,8 @@ namespace KJD_Web.BLL.WXXD
var count = -1;
sql = " update `erp`.`oms_wei_order` set ";
if (!string.IsNullOrEmpty(soft_remark))
sql += " soft_remark=" + soft_remark + ",";
if (soft_remark != null)
sql += " soft_remark='" + soft_remark + "',";
sql = sql.TrimEnd(',');
sql += " where order_id = '" + order_id + "';";
@@ -1172,5 +1175,121 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXGetTransitWarehouseAfterSaleList(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var timeCalc = DateTime.Now;
var wx_order_id_in = RegexUtils.GetStringQuery(ref inputData, "wx_order_id_in")?.Replace("'", "\\'");
var buyer_order_sn_in = RegexUtils.GetStringQuery(ref inputData, "buyer_order_sn_in")?.Replace("'", "\\'");
if (wx_order_id_in.IsNullOrEmpty() && string.IsNullOrEmpty(buyer_order_sn_in))
{
return "{\"code\":500,\"msg\":\"未指定订单\"}";
}
var sort_type = RegexUtils.GetStringQuery(ref inputData, "sort_type")?.Replace("'", "\\'");
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") != "false";
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(1000);
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "SELECT COUNT(id) FROM erp.oms_wei_external_procurement_after_sale o WHERE 1=1 ";
string where = "";
if (!string.IsNullOrWhiteSpace(wx_order_id_in))
where += " and o.order_no in ('" + wx_order_id_in.Replace(",", "','") + "')";
if (!string.IsNullOrWhiteSpace(buyer_order_sn_in))
where += " and o.order_code in ('" + buyer_order_sn_in.Replace(",", "','") + "')";
sql += where;
var count = 0;
if (!is_not_count)
count = mySql.ExecuteRowCount(sql);
DataTable dt;
if (count == 0 && !is_not_count)
{
dt = new DataTable();
}
else
{
sql = "SELECT o.* FROM" +
" erp.oms_wei_external_procurement_after_sale o " +
" WHERE 1=1";
//where子句
sql += where;
if (sort_type == "asc")
sql += " ORDER BY o.id ASC";
else
sql += " ORDER BY o.id DESC";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
mySql.Close();
if (dt != null)
{
try
{
List<oms_wei_external_procurement_after_sale_info> refundItemList = new List<oms_wei_external_procurement_after_sale_info>();
foreach (DataRow row in dt.Rows)
{
oms_wei_external_procurement_after_sale_info order = new oms_wei_external_procurement_after_sale_info
{
id = row["id"].ParseToLong(),
order_no = row["order_no"].ParseToString(),
order_code = row["order_code"].ParseToString(),
inbound_time = row["inbound_time"].ParseToString().ParseToDateTimeNullable(),
outbound_time = row["outbound_time"].ParseToString().ParseToDateTimeNullable(),
account_user = row["account_user"].ParseToString(),
after_sale_no = row["after_sale_no"].ParseToString(),
created_time = row["created_time"].ParseToString().ParseToDateTimeNullable(),
create_user = row["create_user"].ParseToString(),
downstream_express_code = row["downstream_express_code"].ParseToString(),
downstream_waybill = row["downstream_waybill"].ParseToString(),
external_order_no = row["external_order_no"].ParseToString(),
raw_message = row["raw_message"].ParseToString(),
recipient_name = row["recipient_name"].ParseToString(),
recipient_phone = row["recipient_phone"].ParseToString(),
refund_city = row["refund_city"].ParseToString(),
refund_county = row["refund_county"].ParseToString(),
refund_detail_address = row["refund_detail_address"].ParseToString(),
refund_province = row["refund_province"].ParseToString(),
refund_waybill = row["refund_waybill"].ParseToString(),
return_express_company = row["return_express_company"].ParseToString(),
return_or_exchange = row["return_or_exchange"].ParseToNullableInt(),
status = row["status"].ParseToNullableInt(),
updated_time = row["updated_time"].ParseToString().ParseToDateTimeNullable(),
update_user = row["update_user"].ParseToString(),
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
};
refundItemList.Add(order);
}
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
var data = JsonUtils.SerializeObjectToString(refundItemList, 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\":\"输入为空\"}";
}
}
}