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
daf2289a
Commit
daf2289a
authored
Aug 28, 2025
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8e71c6fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
CRMModule.cs
REBORN.Module.SellModule/CRMModule.cs
+25
-25
No files found.
REBORN.Module.SellModule/CRMModule.cs
View file @
daf2289a
...
...
@@ -254,16 +254,17 @@ namespace REBORN.Module.SellModule
foreach
(
var
item
in
travellist
)
{
var
rmodel
=
rtlist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
FirstOrDefault
();
item
.
TCID
=
rmodel
.
TCID
??
0
;
var
tcmodel
=
tclist
.
Where
(
x
=>
x
.
TCID
==
item
.
TCID
).
FirstOrDefault
();
item
.
StartDate
=
rmodel
.
StartDate
.
HasValue
?
rmodel
.
StartDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
;
item
.
TCNUM
=
rmodel
.
TCNUM
;
item
.
TeamType
=
rmodel
.
TeamType
??
0
;
item
.
PriceTeamType
=
(
int
)(
tcmodel
?.
PriceTeamType
??
PriceTeamTypeEnum
.
SanPing
);
if
(
rmodel
.
TeamType
==
0
&&
(
tcmodel
?.
PriceTeamType
??
PriceTeamTypeEnum
.
SanPing
)
==
PriceTeamTypeEnum
.
SanPing
)
if
(
rmodel
.
TeamType
==
1
&&
(
tcmodel
?.
PriceTeamType
??
PriceTeamTypeEnum
.
SanPing
)
==
PriceTeamTypeEnum
.
SanPing
)
{
item
.
TCNUM
+=
"(定制团)"
;
}
else
if
(
rmodel
.
TeamType
==
0
&&
(
tcmodel
?.
PriceTeamType
??
PriceTeamTypeEnum
.
SanPing
)
==
PriceTeamTypeEnum
.
OutTravel
)
else
if
(
rmodel
.
TeamType
==
1
&&
(
tcmodel
?.
PriceTeamType
??
PriceTeamTypeEnum
.
SanPing
)
==
PriceTeamTypeEnum
.
OutTravel
)
{
item
.
TCNUM
+=
"(定制团)"
;
}
...
...
@@ -301,7 +302,6 @@ namespace REBORN.Module.SellModule
item
.
IsOneDayOrder
=
rmodel
.
IsOneDay
;
item
.
CurrencyName
=
"CNY"
;
item
.
StateName
=
rmodel
.
OrderState
.
GetEnumName
();
item
.
TCID
=
rmodel
.
TCID
??
0
;
//团区分 台湾公司别 根据公司别本位币
var
brmodel
=
branchList
.
Where
(
x
=>
x
.
Id
==
rmodel
.
OutBranchId
).
FirstOrDefault
();
...
...
@@ -310,28 +310,28 @@ namespace REBORN.Module.SellModule
item
.
CurrencyName
=
currencyList
.
Where
(
x
=>
x
.
ID
==
brmodel
.
StandardCurrencyId
).
FirstOrDefault
()?.
Code
;
}
if
(
tcmodel
!=
null
)
{
if
(
tcmodel
.
TeamType
>
0
||
tcmodel
.
PriceTeamType
==
Common
.
Enum
.
Dmc
.
PriceTeamTypeEnum
.
SingleService
)
{
var
reportList
=
ReportList
.
Where
(
x
=>
x
.
TCID
==
item
.
TCID
).
ToList
();
//利润 直接根据人头比例分配
decimal
TCProfit
=
reportList
.
Any
()
?
reportList
.
Sum
(
x
=>
(
x
.
ShiJiLiRun
??
0
)
+
(
x
.
TiCheng
??
0
)
-
(
x
.
YongJinShouRu
??
0
))
:
0
;
decimal
TotalPeople
=
OrderPeopleList
.
Where
(
x
=>
x
.
TCID
==
item
.
TCID
).
FirstOrDefault
()?.
GuestNum
??
0
;
if
(
TotalPeople
>
0
)
item
.
OrderProfit
=
Math
.
Round
(
TCProfit
*
(
rmodel
.
GuestNum
??
0
)
/
TotalPeople
,
2
,
MidpointRounding
.
AwayFromZero
);
}
else
{
//销售额
item
.
OrderProfit
=
0
;
//item.OrderAchievements = (rmodel.PreferPrice ?? 0) - (rmodel.DiscountMoney ?? 0) - (rmodel.RedEnvelopeMoney ?? 0);
}
if
(
tcmodel
.
TeamType
==
Common
.
Enum
.
Dmc
.
TeamTypeEnum
.
PacketGroup
)
{
item
.
TCNUM
+=
"(小包团)"
;
}
}
//
if (tcmodel != null)
//
{
//
if (tcmodel.TeamType > 0 || tcmodel.PriceTeamType == Common.Enum.Dmc.PriceTeamTypeEnum.SingleService)
//
{
//
var reportList = ReportList.Where(x => x.TCID == item.TCID).ToList();
//
//利润 直接根据人头比例分配
//
decimal TCProfit = reportList.Any() ? reportList.Sum(x => (x.ShiJiLiRun ?? 0) + (x.TiCheng ?? 0) - (x.YongJinShouRu ?? 0)) : 0;
//
decimal TotalPeople = OrderPeopleList.Where(x => x.TCID == item.TCID).FirstOrDefault()?.GuestNum ?? 0;
//
if (TotalPeople > 0)
//
item.OrderProfit = Math.Round(TCProfit * (rmodel.GuestNum ?? 0) / TotalPeople, 2, MidpointRounding.AwayFromZero);
//
}
//
else
//
{
//
//销售额
//
item.OrderProfit = 0;
//
//item.OrderAchievements = (rmodel.PreferPrice ?? 0) - (rmodel.DiscountMoney ?? 0) - (rmodel.RedEnvelopeMoney ?? 0);
//
}
//
if (tcmodel.TeamType == Common.Enum.Dmc.TeamTypeEnum.PacketGroup)
//
{
//
item.TCNUM += "(小包团)";
//
}
//
}
}
}
//内部酒店
...
...
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