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
7d3b6310
Commit
7d3b6310
authored
Apr 13, 2026
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
412d4c35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
148 additions
and
0 deletions
+148
-0
FinancialModule2.cs
REBORN.Module.FinanceModule/FinancialModule2.cs
+148
-0
No files found.
REBORN.Module.FinanceModule/FinancialModule2.cs
View file @
7d3b6310
...
...
@@ -1211,6 +1211,154 @@ namespace REBORN.Module.FinanceModule
};
RB_Finance_InfoChange_LogRepository
.
Insert
(
logModel
);
#
endregion
#
region
判断一下
是否合并单据的
//更新关联得 + 合并单
var
frList
=
financeRelationRepository
.
GetList
(
new
RB_FinanceRelation
()
{
FinanceId
=
tmodel
.
FinanceId
});
if
(
fmodel
.
Type
==
Common
.
Enum
.
User
.
WFTempLateClassEnum
.
OUT
&&
frList
.
Any
())
{
var
fr2List
=
financeRelationRepository
.
GetList
(
new
RB_FinanceRelation
()
{
NewFinanceId
=
frList
.
FirstOrDefault
().
NewFinanceId
});
fr2List
=
fr2List
.
Where
(
x
=>
x
.
FinanceId
!=
tmodel
.
FinanceId
).
ToList
();
List
<
int
>
FrIds
=
new
List
<
int
>
{
frList
.
FirstOrDefault
().
NewFinanceId
??
0
};
foreach
(
var
fr
in
fr2List
)
{
if
(
fr
.
FinanceId
!=
tmodel
.
FinanceId
)
{
FrIds
.
Add
(
fr
.
FinanceId
??
0
);
}
}
if
(
FrIds
.
Any
())
{
var
t2list
=
tradeWayRepository
.
GetByFinanceIds
(
string
.
Join
(
","
,
FrIds
));
int
num
=
0
;
foreach
(
var
item
in
list
)
{
Content
=
""
;
var
otmodel
=
tlist
.
Where
(
x
=>
x
.
ID
==
item
.
ID
).
FirstOrDefault
();
if
(
otmodel
!=
null
)
{
if
(
otmodel
.
Type
==
BranchAccountEnum
.
Bank
)
{
var
BankAccountModel
=
backAccountRepository
.
GetEntity
(
otmodel
.
AccountId
);
if
(
BankAccountModel
!=
null
)
{
Content
+=
"由【"
+
BankAccountModel
.
Alias
+
"】修改为"
;
}
}
else
if
(
otmodel
.
Type
==
BranchAccountEnum
.
Cash
)
{
var
CashModel
=
cashAccountRepository
.
GetEntity
(
otmodel
.
AccountId
);
if
(
CashModel
!=
null
)
{
Content
+=
"由【"
+
CashModel
.
Alias
+
"】修改为"
;
}
}
else
if
(
otmodel
.
Type
==
BranchAccountEnum
.
CashPool
)
{
var
CashPoolModel
=
cashPoolAccountRepository
.
GetEntity
(
otmodel
.
AccountId
);
if
(
CashPoolModel
!=
null
)
{
Content
+=
"由【"
+
CashPoolModel
.
Alias
+
"】修改为"
;
}
}
else
if
(
otmodel
.
Type
==
BranchAccountEnum
.
Platform
)
{
var
PlatformModel
=
platformAccountRepository
.
GetEntity
(
otmodel
.
AccountId
);
if
(
PlatformModel
!=
null
)
{
Content
+=
"由【"
+
PlatformModel
.
Alias
+
"】修改为"
;
}
}
}
int
CurrencyId
=
0
;
if
(
item
.
Type
==
BranchAccountEnum
.
Bank
)
{
var
BankAccountModel
=
backAccountRepository
.
GetEntity
(
item
.
AccountId
);
if
(
BankAccountModel
!=
null
)
{
//是本位币
CurrencyId
=
BankAccountModel
.
CurrencyId
??
0
;
Content
+=
"【"
+
BankAccountModel
.
Alias
+
"】;"
;
}
}
else
if
(
item
.
Type
==
BranchAccountEnum
.
Cash
)
{
var
CashModel
=
cashAccountRepository
.
GetEntity
(
item
.
AccountId
);
if
(
CashModel
!=
null
)
{
//是本位币
CurrencyId
=
CashModel
.
CurrencyId
??
0
;
Content
+=
"【"
+
CashModel
.
Alias
+
"】;"
;
}
}
else
if
(
item
.
Type
==
BranchAccountEnum
.
CashPool
)
{
var
CashPoolModel
=
cashPoolAccountRepository
.
GetEntity
(
item
.
AccountId
);
if
(
CashPoolModel
!=
null
)
{
//是本位币
CurrencyId
=
CashPoolModel
.
CurrencyId
??
0
;
Content
+=
"【"
+
CashPoolModel
.
Alias
+
"】;"
;
}
}
else
if
(
item
.
Type
==
BranchAccountEnum
.
Platform
)
{
var
PlatformModel
=
platformAccountRepository
.
GetEntity
(
item
.
AccountId
);
if
(
PlatformModel
!=
null
)
{
//是本位币
CurrencyId
=
PlatformModel
.
CurrencyId
??
0
;
Content
+=
"【"
+
PlatformModel
.
Alias
+
"】;"
;
}
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_TradeWay_Extend
.
Type
),
item
.
Type
},
{
nameof
(
RB_TradeWay_Extend
.
AccountId
),
item
.
AccountId
},
};
if
(
CurrencyId
>
0
)
{
keyValues
.
Add
(
nameof
(
RB_TradeWay_Extend
.
CurrencyId
),
CurrencyId
);
}
#
region
匹配一下当前得
var
tUpList
=
t2list
.
Where
(
x
=>
x
.
Type
==
otmodel
.
Type
&&
x
.
AccountId
==
otmodel
.
AccountId
&&
x
.
OriginalMoney
==
otmodel
.
OriginalMoney
).
ToList
();
#
endregion
foreach
(
var
tu
in
tUpList
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_TradeWay_Extend
.
ID
),
FiledValue
=
tu
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
tradeWayRepository
.
Update
(
keyValues
,
wheres
);
if
(
num
==
0
)
{
RB_Finance_Infochange_Log
logModel2
=
new
RB_Finance_Infochange_Log
{
LogId
=
0
,
RB_Branch_id
=
userInfo
.
RB_Branch_id
,
RB_Group_id
=
userInfo
.
RB_Group_id
,
UpdateBy
=
userInfo
.
EmployeeId
,
UpdateDate
=
System
.
DateTime
.
Now
,
ResourceId
=
tu
.
FinanceId
,
StartValue
=
"修改单据交易方式【"
+
tmodel
.
FinanceId
+
"修改同步】"
+
Content
,
Type
=
TemplateEnum
.
Process
,
EndValue
=
""
,
RB_UpdateByName
=
userInfo
.
emName
};
RB_Finance_InfoChange_LogRepository
.
Insert
(
logModel2
);
}
}
num
++;
}
}
}
#
endregion
}
return
true
;
}
...
...
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