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
0e37d9f4
Commit
0e37d9f4
authored
Mar 06, 2026
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
ac7562ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
157 deletions
+165
-157
SellOrderModule.cs
REBORN.Module.SellModule/SellOrderModule.cs
+82
-61
RB_Travel_ContractRepository.cs
REBORN.Repository/Dmc/RB_Travel_ContractRepository.cs
+81
-0
SellOrderService.cs
REBORN.Services.SellService/SellOrderService.cs
+2
-96
No files found.
REBORN.Module.SellModule/SellOrderModule.cs
View file @
0e37d9f4
This diff is collapsed.
Click to expand it.
REBORN.Repository/Dmc/RB_Travel_ContractRepository.cs
View file @
0e37d9f4
...
...
@@ -93,6 +93,87 @@ WHERE 1=1
return
Get
<
RB_Travel_Contract_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 根据查询条件获取合同列表
/// </summary>
/// <param name="where">查询条件</param>
/// <returns></returns>
public
List
<
RB_Travel_Contract_Extend
>
GetTravelContractListNewRepository
(
RB_Travel_Contract_Extend
where
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.ID,A.CType,A.T_ContractNum,A.Tourists_Name,A.TCID,A.OrderId,A.ContractTemplete,A.ThirdContractState
FROM RB_Travel_Contract AS A
WHERE 1=1
"
);
builder
.
Append
(
" AND A.Status<>5 "
);
//排除作废的
if
(
where
!=
null
)
{
if
(
where
.
RB_Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.RB_Group_Id ={0} "
,
where
.
RB_Group_Id
);
}
if
(
where
.
TCID
>
0
)
{
builder
.
AppendFormat
(
" AND A.TCID={0} "
,
where
.
TCID
);
}
if
(
where
.
ID
>
0
)
{
builder
.
AppendFormat
(
" AND A.ID={0} "
,
where
.
ID
);
}
if
(
where
.
CustomerId
>
0
)
{
builder
.
AppendFormat
(
" AND A.CustomerId={0} "
,
where
.
CustomerId
);
}
if
(
where
.
CType
.
HasValue
&&
where
.
CType
>
0
)
{
builder
.
AppendFormat
(
" AND A.CType={0} "
,
where
.
CType
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
QTCIDs
))
{
builder
.
AppendFormat
(
" AND A.TCID IN({0}) "
,
where
.
QTCIDs
);
}
if
(
where
.
OrderId
>
0
)
{
builder
.
AppendFormat
(
" AND A.OrderId={0} "
,
where
.
OrderId
);
}
if
(
where
.
Type
.
HasValue
&&
(
int
)
where
.
Type
.
Value
>
0
)
{
builder
.
AppendFormat
(
" AND A.Type={0} "
,
(
int
)
where
.
Type
.
Value
);
}
if
(
where
.
Status
!=
null
&&
where
.
Status
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.Status={0} "
,
where
.
Status
);
}
if
(
where
.
ContractStatus
>
0
)
{
builder
.
AppendFormat
(
" AND A.ContractStatus={0} "
,
where
.
ContractStatus
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
QOrderIds
))
{
builder
.
AppendFormat
(
" AND A.OrderId IN({0}) "
,
where
.
QOrderIds
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
QCustomerIds
))
{
builder
.
AppendFormat
(
" AND A.CustomerId IN({0}) "
,
where
.
QCustomerIds
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
QAllianceIds
))
{
builder
.
AppendFormat
(
" AND A.AllianceId IN({0}) "
,
where
.
QAllianceIds
);
}
if
(
where
.
AllianceId
>
0
)
{
builder
.
AppendFormat
(
" AND A.AllianceId={0} "
,
where
.
AllianceId
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
ThirdContractID
))
{
builder
.
AppendFormat
(
" AND A.ThirdContractID='{0}' "
,
where
.
ThirdContractID
);
}
}
return
Get
<
RB_Travel_Contract_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取合同分页列表
/// </summary>
...
...
REBORN.Services.SellService/SellOrderService.cs
View file @
0e37d9f4
...
...
@@ -12522,16 +12522,7 @@ namespace REBORN.Services.SellService
pageSize
=
parm
.
GetInt
(
"pageSize"
),
};
UserInfo
userInfo
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
request
.
uid
);
//再查询一次 防止缓存丢失
if
(
string
.
IsNullOrWhiteSpace
(
userInfo
.
ActionMenuCode
))
{
var
ActionMenuList
=
sellOrderModule
.
GetActionCodeForUrlAndUser
(
userInfo
.
RB_Post_Id
,
""
);
if
(
ActionMenuList
!=
null
&&
ActionMenuList
.
Count
()
>
0
)
{
userInfo
.
ActionMenuCode
=
string
.
Join
(
","
,
ActionMenuList
?.
Select
(
x
=>
x
.
ActionCode
).
ToList
());
}
}
RB_Travel_Order_Extend
OrderInfo
=
new
RB_Travel_Order_Extend
()
{
BranchId
=
parm
.
GetInt
(
"BranchId"
),
...
...
@@ -12554,92 +12545,7 @@ namespace REBORN.Services.SellService
tempOrderId
=
parm
.
GetInt
(
"tempOrderId"
),
RB_Department_Id
=
parm
.
GetInt
(
"RB_Department_Id"
),
};
if
(
OrderInfo
.
IsUnionOrder
==
1
||
OrderInfo
.
IsLeaderOrder
==
1
)
{
}
else
{
if
(
OrderInfo
.
SellFormEmp
==
1
)
{
OrderInfo
.
SellFormEmp
=
userInfo
.
EmployeeId
;
}
if
(!
string
.
IsNullOrEmpty
(
userInfo
.
ActionMenuCode
)
&&
(
","
+
userInfo
.
ActionMenuCode
+
","
).
Contains
(
",S_CheckAllOrder,"
))
{
if
(
OrderInfo
.
RB_Department_Id
>
0
)
{
OrderInfo
.
DepartmentIds
=
sellOrderModule
.
GetDepartments
(
OrderInfo
.
RB_Department_Id
??
0
);
}
}
else
{
if
(
OrderInfo
.
RB_Department_Id
>
0
)
{
//HK修改
OrderInfo
.
DepartmentIds
=
sellOrderModule
.
GetDepartments
(
Convert
.
ToInt32
(
OrderInfo
.
RB_Department_Id
));
}
else
{
if
(!
string
.
IsNullOrEmpty
(
userInfo
.
ActionMenuCode
)
&&
(
","
+
userInfo
.
ActionMenuCode
+
","
).
Contains
(
",S_CheckBranchOrder,"
))
{
string
departStr
=
sellOrderModule
.
GetDepartmentsForBranchId
(
userInfo
.
RB_Branch_id
);
//查询二级公司部门
var
blist
=
branchModule
.
GetTwoBranchList
(
userInfo
.
RB_Branch_id
,
userInfo
.
RB_Group_id
);
if
(
blist
.
Any
())
{
foreach
(
var
ritem
in
blist
)
{
var
emodel
=
CacheManager
.
User
.
RbUserCache
.
GetEmployee
(
ritem
.
BranchManager
);
if
(
emodel
!=
null
)
{
string
depStr
=
sellOrderModule
.
GetDepartments
(
emodel
.
RB_Department_Id
);
if
(!
string
.
IsNullOrEmpty
(
depStr
))
{
departStr
+=
","
+
depStr
;
}
}
}
}
//验证员工是否在
if
((
OrderInfo
.
CreateBy
??
0
)
>
0
)
{
var
cmodel
=
CacheManager
.
User
.
RbUserCache
.
GetEmployee
(
OrderInfo
.
CreateBy
);
if
(!(
","
+
departStr
+
","
).
Contains
(
","
+
cmodel
?.
RB_Department_Id
+
","
))
{
return
ApiResult
.
Failed
(
"没有权限查询该员工订单"
);
}
}
else
{
OrderInfo
.
DepartmentIds
=
departStr
;
}
}
else
if
(!
string
.
IsNullOrEmpty
(
userInfo
.
ActionMenuCode
)
&&
(
","
+
userInfo
.
ActionMenuCode
+
","
).
Contains
(
",S_CheckDepartmentOrder,"
))
{
string
departStr
=
sellOrderModule
.
GetDepartments
(
userInfo
.
RB_Department_Id
);
//验证员工是否在
if
((
OrderInfo
.
CreateBy
??
0
)
>
0
)
{
var
cmodel
=
CacheManager
.
User
.
RbUserCache
.
GetEmployee
(
OrderInfo
.
CreateBy
);
if
(!(
","
+
departStr
+
","
).
Contains
(
","
+
cmodel
?.
RB_Department_Id
+
","
))
{
return
ApiResult
.
Failed
(
"没有权限查询该员工订单"
);
}
}
else
{
OrderInfo
.
DepartmentIds
=
departStr
;
}
}
else
{
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
}
}
}
}
OrderInfo
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
OrderInfo
.
OutBranchId
=
-
1
;
OrderInfo
.
Sort
=
3
;
...
...
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