Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
OFL
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
OFL
Commits
3de979ac
提交
3de979ac
authored
8月 21, 2025
作者:
谢雨莎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成代码
上级
94590e63
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
25 行增加
和
22 行删除
+25
-22
CostReportPlugin.cs
CostReportPlugin.cs
+25
-22
没有找到文件。
CostReportPlugin.cs
浏览文件 @
3de979ac
...
@@ -46,17 +46,22 @@ namespace LQKJ_OFLCostReport
...
@@ -46,17 +46,22 @@ namespace LQKJ_OFLCostReport
[
Description
(
"获取销售订单明细报表数据"
),
HotUpdate
]
[
Description
(
"获取销售订单明细报表数据"
),
HotUpdate
]
public
class
CostReportPlugin
:
AbstractListPlugIn
public
class
CostReportPlugin
:
AbstractListPlugIn
{
{
public
override
void
PreOpenForm
(
PreOpenFormEventArgs
e
)
public
override
void
PreOpenForm
(
PreOpenFormEventArgs
e
)
{
{
if
(
DBServiceHelper
.
IsExistTable
(
e
.
Context
,
"cbmxCursor"
))
Clear
(
e
.
Context
);
base
.
PreOpenForm
(
e
);
}
private
void
Clear
(
Context
context
)
{
{
DBServiceHelper
.
Execute
(
e
.
Context
,
$"DELETE FROM cbmxCursor_ckzjcl where FUserID =
{
e
.
Context
.
UserId
}
;"
);
if
(
DBServiceHelper
.
IsExistTable
(
context
,
"cbmxCursor"
))
DBServiceHelper
.
Execute
(
e
.
Context
,
$"DELETE FROM cbmxCursor_ckzjrg where FUserID =
{
e
.
Context
.
UserId
}
;"
);
{
DBServiceHelper
.
Execute
(
e
.
Context
,
$"DELETE FROM cbmxCursor_ckzzfy where FUserID =
{
e
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
context
,
$"DELETE FROM cbmxCursor_ckzjcl where FUserID =
{
context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
e
.
Context
,
$"DELETE FROM cbmxCursor_ckljzj where FUserID =
{
e
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
context
,
$"DELETE FROM cbmxCursor_ckzjrg where FUserID =
{
context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
e
.
Context
,
$"DELETE FROM cbmxCursor where FUserID =
{
e
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
context
,
$"DELETE FROM cbmxCursor_ckzzfy where FUserID =
{
context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
context
,
$"DELETE FROM cbmxCursor_ckljzj where FUserID =
{
context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
context
,
$"DELETE FROM cbmxCursor where FUserID =
{
context
.
UserId
}
;"
);
}
}
base
.
PreOpenForm
(
e
);
}
}
private
bool
isLoading
=
false
;
private
bool
isLoading
=
false
;
...
@@ -73,14 +78,7 @@ namespace LQKJ_OFLCostReport
...
@@ -73,14 +78,7 @@ namespace LQKJ_OFLCostReport
{
{
base
.
FormClosed
(
e
);
base
.
FormClosed
(
e
);
if
(
DBServiceHelper
.
IsExistTable
(
this
.
Context
,
"cbmxCursor"
))
Clear
(
this
.
Context
);
{
DBServiceHelper
.
Execute
(
this
.
Context
,
$"DELETE FROM cbmxCursor_ckzjcl where FUserID =
{
this
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
this
.
Context
,
$"DELETE FROM cbmxCursor_ckzjrg where FUserID =
{
this
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
this
.
Context
,
$"DELETE FROM cbmxCursor_ckzzfy where FUserID =
{
this
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
this
.
Context
,
$"DELETE FROM cbmxCursor_ckljzj where FUserID =
{
this
.
Context
.
UserId
}
;"
);
DBServiceHelper
.
Execute
(
this
.
Context
,
$"DELETE FROM cbmxCursor where FUserID =
{
this
.
Context
.
UserId
}
;"
);
}
}
}
...
@@ -109,6 +107,7 @@ namespace LQKJ_OFLCostReport
...
@@ -109,6 +107,7 @@ namespace LQKJ_OFLCostReport
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Logger
.
Error
(
"销售订单明细报表"
,
ex
.
Message
,
ex
);
this
.
View
.
ShowErrMessage
(
ex
.
Message
);
this
.
View
.
ShowErrMessage
(
ex
.
Message
);
}
}
finally
finally
...
@@ -265,6 +264,7 @@ namespace LQKJ_OFLCostReport
...
@@ -265,6 +264,7 @@ namespace LQKJ_OFLCostReport
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
where t2L.FNAME = '材料成本'
where t2L.FNAME = '材料成本'
and t1.FEXPENSENAME <> '小计'
and t1.FEXPENSENAME <> '小计'
and t1.FUSERID =
{
this
.
Context
.
UserId
}
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
"
);
"
);
...
@@ -276,6 +276,7 @@ namespace LQKJ_OFLCostReport
...
@@ -276,6 +276,7 @@ namespace LQKJ_OFLCostReport
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
where t2L.FNAME = '工资'
where t2L.FNAME = '工资'
and t1.FEXPENSENAME <> '小计'
and t1.FEXPENSENAME <> '小计'
and t1.FUSERID =
{
this
.
Context
.
UserId
}
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
"
);
"
);
...
@@ -292,6 +293,7 @@ namespace LQKJ_OFLCostReport
...
@@ -292,6 +293,7 @@ namespace LQKJ_OFLCostReport
and t2L.FNAME <> '工资'
and t2L.FNAME <> '工资'
and FNAME not like '%折旧费用%'
and FNAME not like '%折旧费用%'
and t1.FEXPENSENAME <> '小计'
and t1.FEXPENSENAME <> '小计'
and t1.FUSERID =
{
this
.
Context
.
UserId
}
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
"
);
"
);
...
@@ -306,6 +308,7 @@ namespace LQKJ_OFLCostReport
...
@@ -306,6 +308,7 @@ namespace LQKJ_OFLCostReport
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
left join T_BD_EXPENSE_L t2L on t2.FEXPID = t2L.FEXPID and t2L.FLOCALEID = 2052
where FNAME like '%折旧费用%'
where FNAME like '%折旧费用%'
and t1.FEXPENSENAME <> '小计'
and t1.FEXPENSENAME <> '小计'
and t1.FUSERID =
{
this
.
Context
.
UserId
}
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
group by t1.FBillNo, t1.FBillSeq, t1.FUSERID
"
);
"
);
...
@@ -346,7 +349,7 @@ namespace LQKJ_OFLCostReport
...
@@ -346,7 +349,7 @@ namespace LQKJ_OFLCostReport
this
.
View
.
Session
[
"ProcessRateValue"
]
=
80
;
this
.
View
.
Session
[
"ProcessRateValue"
]
=
80
;
string
sql
=
$@"/*dialect*/IF OBJECT_ID('T_BAS_PREBDTWO', 'V') IS NULL
string
sql
=
$@"/*dialect*/IF OBJECT_ID('T_BAS_PREBDTWO', 'V') IS NULL
BEGIN
BEGIN
EXEC('CREATE VIEW
T_BAS_PREBDTWO
AS
EXEC('CREATE VIEW
ccc
AS
select ROW_NUMBER() OVER (ORDER BY FOutBillNo,FOutBillSeq) AS FID,* from (
select ROW_NUMBER() OVER (ORDER BY FOutBillNo,FOutBillSeq) AS FID,* from (
select ''0'' FNUMBER,
select ''0'' FNUMBER,
''0'' FMASTERID,
''0'' FMASTERID,
...
@@ -433,10 +436,10 @@ namespace LQKJ_OFLCostReport
...
@@ -433,10 +436,10 @@ namespace LQKJ_OFLCostReport
ckzzfy.FOutManufacturingCost,
ckzzfy.FOutManufacturingCost,
ckljzj.FOutAddDepreciation
ckljzj.FOutAddDepreciation
union all
union all
select DISTINCT '
0
' FNUMBER,
select DISTINCT '
'0'
' FNUMBER,
'
0
' FMASTERID,
'
'0'
' FMASTERID,
'
0
' FUSEORGID,
'
'0'
' FUSEORGID,
'
0
' FFORBIDSTATUS,
'
'0'
' FFORBIDSTATUS,
t1.FBillDate FOutBillDate, -- 出库业务日期
t1.FBillDate FOutBillDate, -- 出库业务日期
t1.FBillNo FOutBillNo, -- 出库单据编号
t1.FBillNo FOutBillNo, -- 出库单据编号
t1.FBillSeq FOutBillSeq, -- 出库单据行号
t1.FBillSeq FOutBillSeq, -- 出库单据行号
...
@@ -482,9 +485,9 @@ namespace LQKJ_OFLCostReport
...
@@ -482,9 +485,9 @@ namespace LQKJ_OFLCostReport
(ISNULL(ckljzj.FOutAddDepreciation, 0) / NULLIF(ISNULL(ckmx.FREALQTY, 0), 0) *
(ISNULL(ckljzj.FOutAddDepreciation, 0) / NULLIF(ISNULL(ckmx.FREALQTY, 0), 0) *
ISNULL(t2.FPRICEQTY, 0))) AS FInTotalCost
ISNULL(t2.FPRICEQTY, 0))) AS FInTotalCost
from cbmxCursor t1
from cbmxCursor t1
left join T_SAL_RETURNSTOCKENTRY ckmx on ckmx.FENTRYID = t1.FBillEntryId and t1.FBillFormId = '
SAL_RETURNSTOCK
'
left join T_SAL_RETURNSTOCKENTRY ckmx on ckmx.FENTRYID = t1.FBillEntryId and t1.FBillFormId = '
'SAL_RETURNSTOCK'
'
left join T_AR_RECEIVABLEENTRY_LK yslk
left join T_AR_RECEIVABLEENTRY_LK yslk
on t1.FBillEntryId = yslk.FSID and yslk.FSTABLENAME = '
T_SAL_RETURNSTOCKENTRY
'
on t1.FBillEntryId = yslk.FSID and yslk.FSTABLENAME = '
'T_SAL_RETURNSTOCKENTRY'
'
left join t_AR_receivableEntry t2
left join t_AR_receivableEntry t2
on t2.FENTRYID = yslk.FENTRYID
on t2.FENTRYID = yslk.FENTRYID
left join T_AR_RECEIVABLE t3 on t2.FID = t3.FID
left join T_AR_RECEIVABLE t3 on t2.FID = t3.FID
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论