Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
f7229c80
Commit
f7229c80
authored
Sep 02, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
074f4b14
315cee32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
9 deletions
+97
-9
EnumHelper.cs
Mall.Common/Plugin/EnumHelper.cs
+1
-1
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+2
-2
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+94
-6
No files found.
Mall.Common/Plugin/EnumHelper.cs
View file @
f7229c80
...
...
@@ -103,7 +103,7 @@ namespace Mall.Common.Plugin
{
Type
type
=
obj
.
GetType
();
FieldInfo
fild
=
type
.
GetField
(
obj
.
ToString
());
if
(
fild
.
IsDefined
(
typeof
(
EnumFieldAttribute
),
true
))
if
(
fild
!=
null
&&
fild
.
IsDefined
(
typeof
(
EnumFieldAttribute
),
true
))
{
EnumFieldAttribute
enumField
=
(
EnumFieldAttribute
)
fild
.
GetCustomAttribute
(
typeof
(
EnumFieldAttribute
),
true
);
return
enumField
.
Name
;
...
...
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
f7229c80
...
...
@@ -123,7 +123,7 @@ namespace Mall.Module.TradePavilion
CompanyName
=
authModel
?.
CompanyName
??
""
,
FirstShopTypeName
=
FirstShopTypeName
,
AuthName
=
AuthName
,
RowSpan
=
1
,
RowSpan
=
0
,
SignUserList
=
new
List
<
SignUserItem
>(),
};
var
tempList
=
subList
?.
Where
(
qitem
=>
qitem
.
UserId
==
item
.
UserId
&&
qitem
.
ActivityId
==
item
.
ActivityId
)?.
ToList
();
...
...
@@ -144,7 +144,7 @@ namespace Mall.Module.TradePavilion
};
activity
.
SignUserList
.
Add
(
signUser
);
}
activity
.
RowSpan
=
tempList
.
Count
;
activity
.
RowSpan
=
tempList
.
Count
>
1
?
tempList
.
Count
:
0
;
}
result
.
Add
(
activity
);
}
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
f7229c80
...
...
@@ -613,14 +613,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 获取商会活动报名分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetConsultStaticPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Consult_Extend
()
{
LinkMan
=
parms
.
GetStringValue
(
"LinkMan"
)
LinkMan
=
parms
.
GetStringValue
(
"LinkMan"
),
ActivityId
=
parms
.
GetInt
(
"ActivityId"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -630,6 +631,90 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 导出
/// </summary>
[
HttpPost
]
public
FileContentResult
DownLoadConsultStatic
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
pageModel
.
pageSize
=
100000
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Consult_Extend
()
{
LinkMan
=
parms
.
GetStringValue
(
"LinkMan"
),
ActivityId
=
parms
.
GetInt
(
"ActivityId"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
consultModule
.
GetCommerceConsultPageModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
string
ExcelName
=
"活动用户导出"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
ExcelDataSource
header
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
"用户昵称"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"认证状态"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"认证公司"
)
{
CellWidth
=
25
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"认证信息"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"公司"
)
{
CellWidth
=
25
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"性质"
)
{
CellWidth
=
20
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"联系人"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"联系电话"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"职务"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"地址"
)
{
CellWidth
=
30
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
},
};
slist
.
Add
(
header
);
try
{
#
region
组装数据
foreach
(
var
item
in
list
)
{
int
index
=
0
;
foreach
(
var
sItem
in
item
.
SignUserList
)
{
var
excelColumns
=
new
List
<
ExcelColumn
>(
30
);
if
(
index
==
0
)
{
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
UserName
)
{
Rowspan
=
item
.
RowSpan
});
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
CompanyStatusStr
)
{
Rowspan
=
item
.
RowSpan
});
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
CompanyName
)
{
Rowspan
=
item
.
RowSpan
});
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
AuthName
)
{
Rowspan
=
item
.
RowSpan
});
}
else
{
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
""
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
""
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
""
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
""
));
}
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
CompanyName
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
Nature
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
LinkMan
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
LinkTel
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
Post
));
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
sItem
.
CountryInfo
));
index
++;
ExcelDataSource
datarow
=
new
ExcelDataSource
()
{
ExcelRows
=
excelColumns
};
slist
.
Add
(
datarow
);
}
}
#
endregion
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
ExcelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
string
.
Format
(
"DownLoadConsultStatic_requestData: {0}"
,
JsonHelper
.
Serialize
(
RequestParm
)));
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
}
/// <summary>
/// 根据编号获取商会活动报名实体
...
...
@@ -2240,7 +2325,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
req
=
base
.
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
EnrollId
=
parms
.
GetInt
(
"EnrollId"
,
0
);
if
(
EnrollId
<=
0
)
if
(
EnrollId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递报名id"
);
}
...
...
@@ -2250,7 +2335,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
return
ApiResult
.
Success
(
""
,
path
);
}
else
{
else
{
return
ApiResult
.
Failed
(
errmsg
);
}
}
...
...
@@ -2260,11 +2346,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetFirstShopEnrollWordExportBatch
()
{
public
ApiResult
GetFirstShopEnrollWordExportBatch
()
{
var
req
=
base
.
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
EnrollIds
=
parms
.
GetStringValue
(
"EnrollIds"
);
//报名ids 英文逗号分隔
if
(
string
.
IsNullOrEmpty
(
EnrollIds
))
{
if
(
string
.
IsNullOrEmpty
(
EnrollIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递报名ids"
);
}
List
<
int
>
EnrollIdList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
EnrollIds
+
"]"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment