Commit f680ba76 authored by 黄奎's avatar 黄奎

导出修改

parent d343cae7
......@@ -245,6 +245,9 @@ namespace Mall.Common.Plugin
HSSFPalette palette = workbook.GetCustomPalette();
int rowIndex = 0;
HSSFFont ffont = (HSSFFont)workbook.CreateFont();
//单元格样式
HSSFCellStyle fCellStyle = (HSSFCellStyle)workbook.CreateCellStyle();
//循环添加行
foreach (var item in list)
{
......@@ -258,8 +261,7 @@ namespace Mall.Common.Plugin
dataRow.Height = 50 * 10;//行高
}
int columnsIndex = 0;
//单元格样式
HSSFCellStyle fCellStyle = (HSSFCellStyle)workbook.CreateCellStyle();
//循环添加列
foreach (var subItem in item.ExcelRows)
{
......
......@@ -50,17 +50,17 @@ namespace Mall.WebApi.Controllers.User
public ApiResult GetMemberUserPageList()
{
var parms = RequestParm;
JObject param= JObject.Parse(parms.msg.ToString());
JObject param = JObject.Parse(parms.msg.ToString());
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Member_User_Extend demodel = new RB_Member_User_Extend()
{
Name= param.GetStringValue("param"),
Source=(UserSourceEnum)param.GetInt("Source"),
MemberGrade=param.GetInt("MemberGrade"),
Id=param.GetInt("Id"),
Moblie=param.GetStringValue("Moblie"),
StartTime=param.GetStringValue("StartTime"),
EndTime=param.GetStringValue("EndTime"),
Name = param.GetStringValue("param"),
Source = (UserSourceEnum)param.GetInt("Source"),
MemberGrade = param.GetInt("MemberGrade"),
Id = param.GetInt("Id"),
Moblie = param.GetStringValue("Moblie"),
StartTime = param.GetStringValue("StartTime"),
EndTime = param.GetStringValue("EndTime"),
};
demodel.TenantId = Convert.ToInt32(parms.uid);
demodel.MallBaseId = parms.MallBaseId;
......@@ -223,7 +223,8 @@ namespace Mall.WebApi.Controllers.User
var Enumlist = EnumHelper.GetEnumList(typeof(UserExportEnum));
ExcelDataSource header = new ExcelDataSource()
{
ExcelRows = new List<ExcelColumn>(30) {
ExcelRows = new List<ExcelColumn>(30)
{
new ExcelColumn(value: "序号") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }
}
};
......@@ -290,9 +291,7 @@ namespace Mall.WebApi.Controllers.User
slist.Add(datarow);
}
#endregion
var byteData = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData, "application/octet-stream", ExcelName);
}
catch (Exception ex)
......@@ -301,7 +300,6 @@ namespace Mall.WebApi.Controllers.User
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", ExcelName);
}
}
/// <summary>
......@@ -953,7 +951,7 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.ParamIsNull("请传递分销申请下文本颜色");
}
if (string.IsNullOrEmpty(demodel.DistributionCommissionName))
{
return ApiResult.ParamIsNull("请传递分销中心下分销佣金");
......@@ -1733,16 +1731,18 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetDistributorCommission()
public ApiResult SetDistributorCommission()
{
var re = RequestParm;
var parms = JObject.Parse(re.msg.ToString());
int DistributorId = parms.GetInt("DistributorId", 0);
decimal Money = parms.GetDecimal("Money");
if (DistributorId <= 0) {
if (DistributorId <= 0)
{
return ApiResult.ParamIsNull();
}
if (Money < 0) {
if (Money < 0)
{
return ApiResult.ParamIsNull();
}
......@@ -1882,7 +1882,8 @@ namespace Mall.WebApi.Controllers.User
var parms = JObject.Parse(re.msg.ToString());
int RemitId = parms.GetInt("RemitId", 0);
int ErpEmpId = parms.GetInt("ErpEmpId", 0);//erp用户id
if (ErpEmpId <= 0) {
if (ErpEmpId <= 0)
{
ErpEmpId = re.ERPEmpId;
}
int Type = parms.GetInt("Type", 0);//1审核通过 2打款 3驳回
......@@ -1953,8 +1954,8 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.Success();
}
}
else if (model.WithdrawalWay == DistrbutorWithdrawWayEnum.YETX)
{
else if (model.WithdrawalWay == DistrbutorWithdrawWayEnum.YETX)
{
//把钱充值到余额里 在更新完提现表状态后 发放到余额
}
......@@ -2651,7 +2652,7 @@ namespace Mall.WebApi.Controllers.User
if (UserId <= 0)
{
return ApiResult.ParamIsNull();
}
}
var obj = userModule.GetHpUserDistributorInfo(UserId, req.TenantId, req.MallBaseId);
return ApiResult.Success("", obj);
......@@ -2786,15 +2787,19 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.ParamIsNull("请传递同级返佣比例");
}
//验证等级是否重复
if (userModule.ValidateFXGrade(demodel.Id, demodel.Grade, req.TenantId, req.MallBaseId)) {
if (userModule.ValidateFXGrade(demodel.Id, demodel.Grade, req.TenantId, req.MallBaseId))
{
return ApiResult.ParamIsNull("等级已存在,请核实后再试");
}
if ((demodel.IsUpgrade ?? 2) == 1) {
if ((demodel.UpgradeNum ?? 0) <= 0) {
if ((demodel.IsUpgrade ?? 2) == 1)
{
if ((demodel.UpgradeNum ?? 0) <= 0)
{
return ApiResult.ParamIsNull("请输入所需下线数量");
}
if ((demodel.UpgradeId ?? 0) <= 0) {
if ((demodel.UpgradeId ?? 0) <= 0)
{
return ApiResult.ParamIsNull("请选择所需下线等级");
}
}
......@@ -2868,7 +2873,8 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetIsEnableFXDistributorGrade() {
public ApiResult GetIsEnableFXDistributorGrade()
{
var requestParm = RequestParm;
var model = userModule.GetDistributorBasicsInfo(requestParm.uid, requestParm.MallBaseId);
......@@ -2975,11 +2981,13 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult CancalRecommendOrdersBill() {
public ApiResult CancalRecommendOrdersBill()
{
var req = RequestParm;
var parms = JObject.Parse(req.msg.ToString());
int BillId = parms.GetInt("BillId", 0);
if (BillId <= 0) {
if (BillId <= 0)
{
return ApiResult.ParamIsNull();
}
bool flag = userModule.CancalRecommendOrdersBill(BillId, req.TenantId, req.MallBaseId, req.EmpId);
......@@ -2987,7 +2995,8 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.Success();
}
else {
else
{
return ApiResult.Failed();
}
}
......@@ -2997,7 +3006,8 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetRecommendOrdersBillRemark() {
public ApiResult SetRecommendOrdersBillRemark()
{
var req = RequestParm;
var parms = JObject.Parse(req.msg.ToString());
int BillId = parms.GetInt("BillId", 0);
......@@ -3041,7 +3051,7 @@ namespace Mall.WebApi.Controllers.User
{
var mallModel = userModule.GetMiniProgramExtend(req.MallBaseId);
var umodel = userModule.GetMemberUserInfo(bmodel.UserId ?? 0);
var flag = App_Code.PayUtil.GetTransfersOrder((bmodel.Periods ?? "") + bmodel.Id, bmodel.Money ?? 0, (bmodel.UserId ?? 0).ToString(), umodel.OpenId, mallModel, _accessor,"赞羊供应商佣金打款");
var flag = App_Code.PayUtil.GetTransfersOrder((bmodel.Periods ?? "") + bmodel.Id, bmodel.Money ?? 0, (bmodel.UserId ?? 0).ToString(), umodel.OpenId, mallModel, _accessor, "赞羊供应商佣金打款");
if (flag)
{
string msg = userModule.SetRecommendOrdersBillRemit(BillId, req.TenantId, req.MallBaseId, req.EmpId);
......@@ -3078,13 +3088,15 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetRecommendOrdersBillDetailList() {
public ApiResult GetRecommendOrdersBillDetailList()
{
var parms = RequestParm;
RB_Distributor_BillDetail_Extend demodel = JsonConvert.DeserializeObject<RB_Distributor_BillDetail_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
if ((demodel.BillId ?? 0) <= 0) {
if ((demodel.BillId ?? 0) <= 0)
{
return ApiResult.ParamIsNull("请传递账单id");
}
var Robj = userModule.GetRecommendOrdersBillDetailList(demodel);
......@@ -3099,11 +3111,12 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult InitializeFXVIPCommission() {
public ApiResult InitializeFXVIPCommission()
{
var req = RequestParm;
JObject parms = JObject.Parse(req.msg.ToString());
int OrderId = parms.GetInt("OrderId", 0);
if (OrderId<=0)
if (OrderId <= 0)
{
return ApiResult.ParamIsNull("请传递参数");
}
......@@ -3315,7 +3328,8 @@ namespace Mall.WebApi.Controllers.User
x.Grade
}));
}
else {
else
{
List<RB_Distributor_Grade_Extend> list = new List<RB_Distributor_Grade_Extend>();
return ApiResult.Success("", list.Select(x => new
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment