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
02861d95
Commit
02861d95
authored
Oct 15, 2025
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
40af6269
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
1 deletion
+112
-1
Program.cs
REBORN.HuaTuQUART/Program.cs
+11
-1
FinancialModule2.cs
REBORN.Module.FinanceModule/FinancialModule2.cs
+101
-0
No files found.
REBORN.HuaTuQUART/Program.cs
View file @
02861d95
...
...
@@ -568,11 +568,21 @@ where a.FinalPriceTips>0 and a.DepartTime>NOW() AND DATE_SUB(a.DepartTime, INTER
LogHelper
.
Write
(
"更新预付款:"
+
e
.
Message
);
}
try
{
//更新银行账户 期初余额
new
Module
.
FinanceModule
.
FinancialModule2
().
InitializeAccountBalace
(
106
);
}
catch
(
Exception
e
)
{
LogHelper
.
Write
(
"更新银行账户 期初余额:"
+
e
.
Message
);
}
try
{
if
(
DateTime
.
Now
.
Hour
<=
9
)
{
FinanceStatisticsModule
.
UpdateRejectUnDispose
(
106
);
//
FinanceStatisticsModule.UpdateRejectUnDispose(106);
LogHelper
.
Write
(
"更新驳回单据长时间未处理,自动作废"
);
}
}
...
...
REBORN.Module.FinanceModule/FinancialModule2.cs
View file @
02861d95
...
...
@@ -697,6 +697,7 @@ namespace REBORN.Module.FinanceModule
return
list
;
}
/// <summary>
/// 根据tcnum获取tcid
/// </summary>
...
...
@@ -3870,6 +3871,106 @@ namespace REBORN.Module.FinanceModule
return
list
;
}
#
region
账户余额
/// <summary>
/// 初始化账户余额
/// </summary>
/// <param name="groupId"></param>
/// <returns></returns>
public
bool
InitializeAccountBalace
(
int
groupId
)
{
//查询所有的已设置期初日期的账户
var
list
=
backAccountRepository
.
GetList
(
new
RB_BackAccount_Extend
()
{
RB_Group_Id
=
groupId
,
BeginTime
=
Convert
.
ToDateTime
(
"2023-01-01"
)
});
foreach
(
var
item
in
list
)
{
GetAccountStatement
(
new
RB_Finance_Extend
()
{
RB_Group_Id
=
groupId
,
RB_Branch_Id
=
-
1
,
sTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
eTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
BankList
=
new
List
<
RB_TradeWay_Extend
>()
{
new
RB_TradeWay_Extend
(){
Type
=
BranchAccountEnum
.
Bank
,
AccountId
=
item
.
ID
}
}
},
out
decimal
RStartMoney
,
new
UserInfo
()
{
RB_Group_id
=
groupId
});
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_BackAccount_Extend
.
Initialbalance
),
RStartMoney
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_BackAccount_Extend
.
ID
),
FiledValue
=
item
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
backAccountRepository
.
Update
(
keyValues
,
wheres
);
}
var
plist
=
platformAccountRepository
.
GetSingleList
(
new
RB_PlatformAccount_Extend
()
{
RB_Group_Id
=
groupId
,
BeginTime
=
Convert
.
ToDateTime
(
"2023-01-01"
)
});
foreach
(
var
item
in
plist
)
{
GetAccountStatement
(
new
RB_Finance_Extend
()
{
RB_Group_Id
=
groupId
,
sTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
eTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
BankList
=
new
List
<
RB_TradeWay_Extend
>()
{
new
RB_TradeWay_Extend
(){
Type
=
BranchAccountEnum
.
Platform
,
AccountId
=
item
.
ID
}
}
},
out
decimal
RStartMoney
,
new
UserInfo
()
{
RB_Group_id
=
groupId
});
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_PlatformAccount_Extend
.
Initialbalance
),
RStartMoney
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_PlatformAccount_Extend
.
ID
),
FiledValue
=
item
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
platformAccountRepository
.
Update
(
keyValues
,
wheres
);
}
var
clist
=
cashAccountRepository
.
GetList
(
new
RB_CashAccount_Extend
()
{
RB_Group_Id
=
groupId
,
BeginTime
=
Convert
.
ToDateTime
(
"2023-01-01"
)
});
foreach
(
var
item
in
clist
)
{
GetAccountStatement
(
new
RB_Finance_Extend
()
{
RB_Group_Id
=
groupId
,
sTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
eTradeDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyy-MM-dd"
),
BankList
=
new
List
<
RB_TradeWay_Extend
>()
{
new
RB_TradeWay_Extend
(){
Type
=
BranchAccountEnum
.
Cash
,
AccountId
=
item
.
ID
}
}
},
out
decimal
RStartMoney
,
new
UserInfo
()
{
RB_Group_id
=
groupId
});
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_CashAccount_Extend
.
Initialbalance
),
RStartMoney
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_CashAccount_Extend
.
ID
),
FiledValue
=
item
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
cashAccountRepository
.
Update
(
keyValues
,
wheres
);
}
return
true
;
}
#
endregion
#
endregion
...
...
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