Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
huatu_API
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
liudong1993
huatu_API
Commits
dcb75763
Commit
dcb75763
authored
Sep 08, 2025
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/liudong1993/huatu_api
parents
fed7630c
af383681
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
StringHelper.cs
REBORN.Common/Plugin/StringHelper.cs
+32
-7
SellOrderModule.cs
REBORN.Module.SellModule/SellOrderModule.cs
+1
-1
No files found.
REBORN.Common/Plugin/StringHelper.cs
View file @
dcb75763
...
@@ -5,6 +5,7 @@ using System.IO;
...
@@ -5,6 +5,7 @@ using System.IO;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
System.Web
;
using
System.Web
;
using
static
SKIT
.
FlurlHttpClient
.
Wechat
.
TenpayV3
.
Models
.
GetTaxiInvoiceDriverResponse
.
Types
.
Photo
.
Types
;
namespace
REBORN.Common.Plugin
namespace
REBORN.Common.Plugin
{
{
...
@@ -13,9 +14,33 @@ namespace REBORN.Common.Plugin
...
@@ -13,9 +14,33 @@ namespace REBORN.Common.Plugin
/// </summary>
/// </summary>
public
class
StringHelper
public
class
StringHelper
{
{
private
const
string
digits
=
"0123456789"
;
private
const
string
letters
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
private
static
Random
random
=
new
Random
();
#
region
"随机数"
#
region
"随机数"
/// <summary>
/// 生成9位数字+1位字母
/// </summary>
/// <returns></returns>
public
static
string
GenerateRandomString
()
{
char
[]
result
=
new
char
[
10
];
// 先填充9位数字
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
result
[
i
]
=
(
char
)
random
.
Next
(
'0'
,
'9'
+
1
);
}
// 生成1位字母
char
letter
=
(
char
)
random
.
Next
(
'A'
,
'Z'
+
1
);
// 随机选择一个位置插入字母
int
letterPosition
=
random
.
Next
(
10
);
result
[
letterPosition
]
=
letter
;
return
new
string
(
result
);
}
/// <summary>
/// <summary>
/// 随机生成8位随机数
/// 随机生成8位随机数
...
@@ -148,7 +173,7 @@ namespace REBORN.Common.Plugin
...
@@ -148,7 +173,7 @@ namespace REBORN.Common.Plugin
{
{
if
(!
dStart
.
HasValue
||
!
dEnd
.
HasValue
)
return
new
TimeSpan
();
if
(!
dStart
.
HasValue
||
!
dEnd
.
HasValue
)
return
new
TimeSpan
();
TimeSpan
ts
=
(
dEnd
.
Value
-
dStart
.
Value
);
TimeSpan
ts
=
(
dEnd
.
Value
-
dStart
.
Value
);
ts
=
ts
.
Add
(
new
TimeSpan
(
0
,
Convert
.
ToInt32
((
startUTCZone
-
endUTCZone
)*
60
),
0
));
ts
=
ts
.
Add
(
new
TimeSpan
(
0
,
Convert
.
ToInt32
((
startUTCZone
-
endUTCZone
)
*
60
),
0
));
return
ts
;
return
ts
;
}
}
/// <summary>
/// <summary>
...
@@ -636,7 +661,7 @@ namespace REBORN.Common.Plugin
...
@@ -636,7 +661,7 @@ namespace REBORN.Common.Plugin
/// <param name="start"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="end"></param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
IsActive
(
DateTime
now
,
DateTime
start
,
DateTime
end
)
public
static
bool
IsActive
(
DateTime
now
,
DateTime
start
,
DateTime
end
)
{
{
return
now
>=
start
&&
now
<=
end
;
return
now
>=
start
&&
now
<=
end
;
}
}
...
@@ -646,7 +671,7 @@ namespace REBORN.Common.Plugin
...
@@ -646,7 +671,7 @@ namespace REBORN.Common.Plugin
/// <param name="now"></param>
/// <param name="now"></param>
/// <param name="end"></param>
/// <param name="end"></param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
IsExpired
(
DateTime
now
,
DateTime
end
)
public
static
bool
IsExpired
(
DateTime
now
,
DateTime
end
)
{
{
return
now
>
end
;
return
now
>
end
;
}
}
...
@@ -657,7 +682,7 @@ namespace REBORN.Common.Plugin
...
@@ -657,7 +682,7 @@ namespace REBORN.Common.Plugin
/// <param name="now"></param>
/// <param name="now"></param>
/// <param name="start"></param>
/// <param name="start"></param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
IsFuture
(
DateTime
now
,
DateTime
start
)
public
static
bool
IsFuture
(
DateTime
now
,
DateTime
start
)
{
{
return
now
<
start
;
return
now
<
start
;
}
}
...
@@ -1972,7 +1997,7 @@ namespace REBORN.Common.Plugin
...
@@ -1972,7 +1997,7 @@ namespace REBORN.Common.Plugin
/// <param name="Name">名</param>
/// <param name="Name">名</param>
public
static
void
GetChinseSurNameAndName
(
string
value
,
out
string
SurName
,
out
string
Name
)
public
static
void
GetChinseSurNameAndName
(
string
value
,
out
string
SurName
,
out
string
Name
)
{
{
List
<
string
>
compoundSurnames
=
new
List
<
string
>
{
"欧阳"
,
"司马"
,
"诸葛"
,
"慕容"
,
"上官"
,
"公孙"
,
"皇甫"
,
"端木"
};
List
<
string
>
compoundSurnames
=
new
List
<
string
>
{
"欧阳"
,
"司马"
,
"诸葛"
,
"慕容"
,
"上官"
,
"公孙"
,
"皇甫"
,
"端木"
};
SurName
=
""
;
SurName
=
""
;
Name
=
""
;
Name
=
""
;
if
(!
string
.
IsNullOrEmpty
(
value
))
if
(!
string
.
IsNullOrEmpty
(
value
))
...
@@ -1981,7 +2006,7 @@ namespace REBORN.Common.Plugin
...
@@ -1981,7 +2006,7 @@ namespace REBORN.Common.Plugin
if
(
value
.
Length
>=
2
&&
compoundSurnames
.
Contains
(
value
.
Substring
(
0
,
2
)))
if
(
value
.
Length
>=
2
&&
compoundSurnames
.
Contains
(
value
.
Substring
(
0
,
2
)))
{
{
SurName
=
value
.
Substring
(
0
,
2
);
SurName
=
value
.
Substring
(
0
,
2
);
Name
=
value
.
Length
>
2
?
value
.
Substring
(
2
)
:
""
;
Name
=
value
.
Length
>
2
?
value
.
Substring
(
2
)
:
""
;
}
}
else
else
{
{
...
...
REBORN.Module.SellModule/SellOrderModule.cs
View file @
dcb75763
...
@@ -5589,7 +5589,7 @@ namespace REBORN.Module.SellModule
...
@@ -5589,7 +5589,7 @@ namespace REBORN.Module.SellModule
tmodel.OutBranchId = userInfo.RB_Branch_id;
tmodel.OutBranchId = userInfo.RB_Branch_id;
tmodel.RB_Group_Id = dmodel.RB_Group_Id;
tmodel.RB_Group_Id = dmodel.RB_Group_Id;
tmodel.RB_Department_Id = userInfo.RB_Department_Id;
tmodel.RB_Department_Id = userInfo.RB_Department_Id;
tmodel.TCNUM =
tmodel.StartDate.Value.ToString("yyyyMMddHHmmssfff"
);
tmodel.TCNUM =
StringHelper.FormatDate(tmodel.StartDate) +StringHelper.GenerateRandomString(
);
tmodel.Status = GroupStateEnum.Normal;
tmodel.Status = GroupStateEnum.Normal;
tmodel.TCState = TravelSaleStateEnum.SaleTeam;
tmodel.TCState = TravelSaleStateEnum.SaleTeam;
var hotelId = travel_PriceRepository.Insert(tmodel);
var hotelId = travel_PriceRepository.Insert(tmodel);
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