|
@@ -38,14 +38,14 @@ namespace MySystem
|
|
|
// ConfiemMer(808);//新建商户
|
|
|
// ChangeMerchantCard(1);//商户修改银行卡
|
|
|
// AddOpenDivideAccounts(832); //添加分账方
|
|
|
- // QueryAuthStatus(1600);//查询实名认证状态
|
|
|
+ QueryAuthStatus(1845);//查询实名认证状态
|
|
|
// WeChatFunctionForHD.Instance.QueryAuthMerchant("600955391");
|
|
|
// AlipayFunctionForHD.Instance.AuthOrderAuthQuery("2088820718243322");
|
|
|
// StartProfitShareListen();
|
|
|
// HaoDaHelper.Instance.BindWeChatAppId("1490230", "21622558", AppConfig.Haoda.SubAppId);
|
|
|
|
|
|
// HaoDaHelper.Instance.OrderDivideAccountsQuery("FZ2023110315225748140470708", "1492500"); //查询分账结果
|
|
|
- WebCMSEntities db = new WebCMSEntities();
|
|
|
+ // WebCMSEntities db = new WebCMSEntities();
|
|
|
|
|
|
// List<int> ids = new List<int>();
|
|
|
// foreach(int id in ids)
|
|
@@ -121,56 +121,41 @@ namespace MySystem
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
- List<string> list = new List<string>();
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180937731\",\"settle\":\"29687\",\"part\":\"29575\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180937136\",\"settle\":\"29687\",\"part\":\"29575\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180934708\",\"settle\":\"1195\",\"part\":\"1191\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02181017175\",\"settle\":\"13947\",\"part\":\"13895\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180869872\",\"settle\":\"1195\",\"part\":\"1191\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180865846\",\"settle\":\"3586\",\"part\":\"3573\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180789355\",\"settle\":\"3686\",\"part\":\"3673\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180846241\",\"settle\":\"7471\",\"part\":\"7444\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180846052\",\"settle\":\"5180\",\"part\":\"5161\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180820392\",\"settle\":\"4782\",\"part\":\"4765\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180815114\",\"settle\":\"3586\",\"part\":\"3573\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180738487\",\"settle\":\"6475\",\"part\":\"6451\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180725366\",\"settle\":\"1195\",\"part\":\"1191\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180720986\",\"settle\":\"4682\",\"part\":\"4665\"}");
|
|
|
- list.Add("{\"orderNo\":\"G2231124C02180720630\",\"settle\":\"1195\",\"part\":\"1191\"}");
|
|
|
- list.Add("{\"orderNo\":\"G1231124C02180712338\",\"settle\":\"1195\",\"part\":\"1191\"}");
|
|
|
- foreach(string sub in list)
|
|
|
- {
|
|
|
- JsonData jsonObj = JsonMapper.ToObject(sub);
|
|
|
- string orderNo = jsonObj["orderNo"].ToString();
|
|
|
- string settle = jsonObj["settle"].ToString();
|
|
|
- string part = jsonObj["part"].ToString();
|
|
|
- ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.SeoTitle == orderNo) ?? new ConsumerOrders();
|
|
|
- if(order.SettleAmount > 0)
|
|
|
- {
|
|
|
- MerchantParamSet set = Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantParamSet>(order.SeoDescription);
|
|
|
- MerchantAddInfo merchantAdd = db.MerchantAddInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantAddInfo();
|
|
|
- string applyNo = "FZ" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8); //批次号
|
|
|
- string mchtNo = merchantAdd.OutMchtNo; //慧掌柜商户号
|
|
|
- string acctNo = AppConfig.Haoda.AcctNo; //账户号,分账接收方账户号
|
|
|
- string sacctNo = merchantAdd.MchtNo; //账户号,收款商户号
|
|
|
-
|
|
|
- decimal settleamount = decimal.Parse(settle);
|
|
|
- decimal partamount = decimal.Parse(part);
|
|
|
- decimal amount = settleamount - partamount;
|
|
|
- if(amount > 0)
|
|
|
- {
|
|
|
- decimal servicefee = amount / 100M;
|
|
|
- servicefee = decimal.Parse(servicefee.ToString("f0"));
|
|
|
- amount -= servicefee;
|
|
|
- string seviceAmount = servicefee.ToString("f0"); //服务费
|
|
|
- string amountAmount = amount.ToString("f0");
|
|
|
+ // List<string> list = new List<string>();
|
|
|
+ // list.Add("{\"orderNo\":\"G2231124C02180937731\",\"settle\":\"29687\",\"part\":\"29575\"}");
|
|
|
+ // foreach(string sub in list)
|
|
|
+ // {
|
|
|
+ // JsonData jsonObj = JsonMapper.ToObject(sub);
|
|
|
+ // string orderNo = jsonObj["orderNo"].ToString();
|
|
|
+ // string settle = jsonObj["settle"].ToString();
|
|
|
+ // string part = jsonObj["part"].ToString();
|
|
|
+ // ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.SeoTitle == orderNo) ?? new ConsumerOrders();
|
|
|
+ // if(order.SettleAmount > 0)
|
|
|
+ // {
|
|
|
+ // MerchantParamSet set = Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantParamSet>(order.SeoDescription);
|
|
|
+ // MerchantAddInfo merchantAdd = db.MerchantAddInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantAddInfo();
|
|
|
+ // string applyNo = "FZ" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8); //批次号
|
|
|
+ // string mchtNo = merchantAdd.OutMchtNo; //慧掌柜商户号
|
|
|
+ // string acctNo = AppConfig.Haoda.AcctNo; //账户号,分账接收方账户号
|
|
|
+ // string sacctNo = merchantAdd.MchtNo; //账户号,收款商户号
|
|
|
|
|
|
- string result = HaoDaHelper.Instance.OrderDivideAccounts(OrderDivideAccountsUtil.AddValue(applyNo, mchtNo, orderNo, acctNo, sacctNo, "0", amountAmount, seviceAmount));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // decimal settleamount = decimal.Parse(settle);
|
|
|
+ // decimal partamount = decimal.Parse(part);
|
|
|
+ // decimal amount = settleamount - partamount;
|
|
|
+ // if(amount > 0)
|
|
|
+ // {
|
|
|
+ // decimal servicefee = amount / 100M;
|
|
|
+ // servicefee = decimal.Parse(servicefee.ToString("f0"));
|
|
|
+ // amount -= servicefee;
|
|
|
+ // string seviceAmount = servicefee.ToString("f0"); //服务费
|
|
|
+ // string amountAmount = amount.ToString("f0");
|
|
|
|
|
|
- db.Dispose();
|
|
|
+ // string result = HaoDaHelper.Instance.OrderDivideAccounts(OrderDivideAccountsUtil.AddValue(applyNo, mchtNo, orderNo, acctNo, sacctNo, "0", amountAmount, seviceAmount));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // db.Dispose();
|
|
|
}
|
|
|
|
|
|
public void StartProfitShareListen()
|