|
@@ -48,7 +48,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
string condition = "";
|
|
string condition = "";
|
|
|
if (!string.IsNullOrEmpty(data["MerchantName"].ToString()))
|
|
if (!string.IsNullOrEmpty(data["MerchantName"].ToString()))
|
|
|
{
|
|
{
|
|
|
- var merAddInfo = MerchantAddInfoService.Query(" and CertMerchantName=" + MerchantName + "");
|
|
|
|
|
|
|
+ var merAddInfo = MerchantAddInfoService.Query(" and CertMerchantName='" + MerchantName + "'");
|
|
|
condition += " and MerchantId='" + merAddInfo.Id + "'";
|
|
condition += " and MerchantId='" + merAddInfo.Id + "'";
|
|
|
}
|
|
}
|
|
|
if (!string.IsNullOrEmpty(data["MakerCode"].ToString()))
|
|
if (!string.IsNullOrEmpty(data["MakerCode"].ToString()))
|
|
@@ -90,8 +90,8 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
{
|
|
{
|
|
|
if (data["SubjectType"].ToString() == "1") SubjectType = "SUBJECT_TYPE_ENTERPRISE"; //企业公司
|
|
if (data["SubjectType"].ToString() == "1") SubjectType = "SUBJECT_TYPE_ENTERPRISE"; //企业公司
|
|
|
if (data["SubjectType"].ToString() == "2") SubjectType = "SUBJECT_TYPE_INDIVIDUAL"; //个体工商户
|
|
if (data["SubjectType"].ToString() == "2") SubjectType = "SUBJECT_TYPE_INDIVIDUAL"; //个体工商户
|
|
|
- if (data["SubjectType"].ToString() == "3") SubjectType = "SUBJECT_TYPE_SMALL"; //小微
|
|
|
|
|
- condition += " and SubjectType='" + SubjectType + "'";
|
|
|
|
|
|
|
+ var Ids = MerchantInfoUtil.QueryMerchantIdBySubjectType(SubjectType);
|
|
|
|
|
+ condition += " and MerchantId in (" + Ids + ")";
|
|
|
}
|
|
}
|
|
|
List<RelationData> relationData = new List<RelationData>();
|
|
List<RelationData> relationData = new List<RelationData>();
|
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
@@ -102,14 +102,21 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
{
|
|
{
|
|
|
Dictionary<string, object> curData = new Dictionary<string, object>();
|
|
Dictionary<string, object> curData = new Dictionary<string, object>();
|
|
|
curData.Add("Id", subdata["Id"].ToString()); //Id
|
|
curData.Add("Id", subdata["Id"].ToString()); //Id
|
|
|
- curData.Add("MerchantName", subdata["MerchantName"].ToString()); //交易商户
|
|
|
|
|
|
|
+ var subjectType = 0;
|
|
|
|
|
+ curData.Add("MerchantName", MerchantAddInfoService.Query(int.Parse(subdata["MerchantId"].ToString())).CertMerchantName); //交易商户
|
|
|
curData.Add("PayMoney", subdata["PayMoney"].ToString()); //交易金额
|
|
curData.Add("PayMoney", subdata["PayMoney"].ToString()); //交易金额
|
|
|
- curData.Add("Status", subdata["Status"].ToString()); //交易状态(0 未支付 1 已支付)
|
|
|
|
|
|
|
+ var status = 0;
|
|
|
|
|
+ if (subdata["Status"].ToString() != "0") status = 1;
|
|
|
|
|
+ curData.Add("Status", status); //交易状态(0 未支付 1 已支付)
|
|
|
curData.Add("PayMode", subdata["PayMode"].ToString()); //交易平台(1 支付宝 2 微信)
|
|
curData.Add("PayMode", subdata["PayMode"].ToString()); //交易平台(1 支付宝 2 微信)
|
|
|
curData.Add("OrderNo", subdata["OrderNo"].ToString()); //交易号
|
|
curData.Add("OrderNo", subdata["OrderNo"].ToString()); //交易号
|
|
|
curData.Add("CreateDate", subdata["CreateDate"].ToString() == null ? "" : DateTime.Parse(subdata["CreateDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); //交易时间
|
|
curData.Add("CreateDate", subdata["CreateDate"].ToString() == null ? "" : DateTime.Parse(subdata["CreateDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); //交易时间
|
|
|
curData.Add("MaxDivi", subdata["MaxDivi"].ToString()); //分账金额
|
|
curData.Add("MaxDivi", subdata["MaxDivi"].ToString()); //分账金额
|
|
|
- curData.Add("SubjectType", subdata["SubjectType"].ToString()); //主体类型(1 企业 2 个体 3 小微)
|
|
|
|
|
|
|
+ if (data["SubjectType"].ToString() == "SUBJECT_TYPE_ENTERPRISE") subjectType = 1; //企业公司
|
|
|
|
|
+ if (data["SubjectType"].ToString() == "SUBJECT_TYPE_INDIVIDUAL") subjectType = 2; //个体工商户
|
|
|
|
|
+ if (data["SubjectType"].ToString() == "SUBJECT_TYPE_SMALL") subjectType = 3; //小微
|
|
|
|
|
+ curData.Add("SubjectType", subjectType); //主体类型(1 企业 2 个体 3 小微)
|
|
|
|
|
+ dataList.Add(curData);
|
|
|
}
|
|
}
|
|
|
Other.Add("Count", count); //总数
|
|
Other.Add("Count", count); //总数
|
|
|
return dataList;
|
|
return dataList;
|