Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
leifei
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
彭寒菲
leifei
Commits
74b500df
提交
74b500df
authored
12月 25, 2021
作者:
彭寒菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
物料替换
上级
0dfaa6df
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
54 行增加
和
31 行删除
+54
-31
GGReplaceModel.cs
...BusinessPlugin/LF.K3.SCM.BusinessPlugin/GGReplaceModel.cs
+14
-15
ImportDatePlugin.cs
...sinessPlugin/LF.K3.SCM.BusinessPlugin/ImportDatePlugin.cs
+4
-10
ImportExcelPlugin.cs
...inessPlugin/LF.K3.SCM.BusinessPlugin/ImportExcelPlugin.cs
+35
-5
LF.K3.SCM.BusinessPlugin.csproj
.../LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin.csproj
+1
-1
ee6e060d-032b-46e6-953f-93d8e8d2baee.2052.dymx
...2_51c046d1/ee6e060d-032b-46e6-953f-93d8e8d2baee.2052.dymx
+0
-0
ee6e060d-032b-46e6-953f-93d8e8d2baee.dym
...el/6002_51c046d1/ee6e060d-032b-46e6-953f-93d8e8d2baee.dym
+0
-0
qaz_BOMTASK.2052.dymx
DataModel/6002_51c046d1/qaz_BOMTASK.2052.dymx
+0
-0
qaz_BOMTASK.dym
DataModel/6002_51c046d1/qaz_BOMTASK.dym
+0
-0
qaz_GGReplace.2052.dymx
DataModel/6002_51c046d1/qaz_GGReplace.2052.dymx
+0
-0
qaz_GGReplace.dym
DataModel/6002_51c046d1/qaz_GGReplace.dym
+0
-0
没有找到文件。
Code/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin/
OpenGGReplace
.cs
→
Code/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin/
GGReplaceModel
.cs
浏览文件 @
74b500df
...
...
@@ -2,10 +2,12 @@
using
Kingdee.BOS.Core.DynamicForm.PlugIn
;
using
Kingdee.BOS.Core.DynamicForm.PlugIn.Args
;
using
Kingdee.BOS.Core.List.PlugIn
;
using
Kingdee.BOS.ServiceHelper
;
using
Kingdee.BOS.Util
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Dynamic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -13,21 +15,18 @@ namespace LF.K3.SCM.BusinessPlugin
{
[
Description
(
"打开物料替换弹出框"
)]
[
HotUpdate
]
public
class
OpenGGReplace
:
AbstractDynamicFormPlugIn
public
class
GGReplaceModel
:
AbstractDynamicFormPlugIn
{
//public override void BeforeDoOperation(BeforeDoOperationEventArgs e)
//{
// if (e.Operation.FormOperation.Id == "btn_tbReplace")
// {
// //显示动态表单
// DynamicFormShowParameter forParameter = new DynamicFormShowParameter();
// //获取动态表单的唯一标识
// forParameter.FormId = "qaz_GGReplace";
// this.View.ShowForm(forParameter);
// }
//}
public
override
void
AfterBindData
(
EventArgs
e
)
{
base
.
AfterBindData
(
e
);
string
billno
=
this
.
View
.
OpenParameter
.
GetCustomParameter
(
"billno"
).
ToString
();
billno
=
billno
.
Remove
(
billno
.
LastIndexOf
(
","
));
string
tab
=
DBServiceHelper
.
CreateTemporaryTableName
(
this
.
Context
);
string
sql
=
$@"/*dialect*/select FNUMBER FNUMBER,FNAME FNAME,F_QAZ_REMARK F_FRONT from t_BD_MATERIAL T0
left join T_BD_MATERIAL_L T1 on T0.FMATERIALID=T1.FMATERIALID WHERE T0.FMATERIALID IN (
{
billno
}
) "
;
DBServiceHelper
.
Execute
(
this
.
Context
,
sql
);
}
}
}
Code/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin/ImportDatePlugin.cs
浏览文件 @
74b500df
...
...
@@ -35,12 +35,6 @@ namespace LF.K3.SCM.BusinessPlugin
if
(
e
.
Operation
.
FormOperation
.
Id
==
"FImportDate"
)
{
//if (this._filePath == null)
//{
// this.View.ShowMessage("请选择文件");
// return;
//}
//判断是否有Excel表格
if
(
this
.
IsNotNull
())
{
//数据的操作
...
...
@@ -148,8 +142,8 @@ namespace LF.K3.SCM.BusinessPlugin
strTest
=
strTest
.
Substring
(
1
,
strTest
.
Length
-
1
);
strTest
=
strTest
.
Remove
(
strTest
.
Length
-
1
,
1
);
//判断是否存在此表,如果存在则删除
//string sql2 = " IF Object_id('Tempdb..
LStable') IS NOT NULL DROP TABLE LStable";
//
DBUtils.Execute(this.Context, sql2);
string
sql2
=
$@"/*dialect*/ IF Object_id('
LStable') IS NOT NULL DROP TABLE LStable"
;
var
a
=
DBUtils
.
Execute
(
this
.
Context
,
sql2
);
//创建表
string
sql1
=
"create table LStable("
+
strTest
;
DBUtils
.
Execute
(
this
.
Context
,
sql1
);
...
...
@@ -181,8 +175,8 @@ namespace LF.K3.SCM.BusinessPlugin
jg
=
-
1
;
}
//删除表
string
sql
2
=
"DROP TABLE LStable"
;
DBUtils
.
Execute
(
this
.
Context
,
sql
2
);
string
sql
3
=
"DROP TABLE LStable"
;
DBUtils
.
Execute
(
this
.
Context
,
sql
3
);
}
//自定义方法,拼接临时表字段
private
string
GetCreateTmpTableNameSql
(
DataColumnCollection
fieldColumn
)
...
...
Code/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin/ImportExcelPlugin.cs
浏览文件 @
74b500df
...
...
@@ -7,6 +7,8 @@ using Kingdee.BOS.Core.DynamicForm;
using
System.ComponentModel
;
using
Kingdee.BOS.Util
;
using
Kingdee.BOS.Core.DynamicForm.PlugIn.Args
;
using
Kingdee.BOS.Core.List
;
using
System.Dynamic
;
namespace
LF.K3.SCM.BusinessPlugin
{
...
...
@@ -28,13 +30,41 @@ namespace LF.K3.SCM.BusinessPlugin
this
.
View
.
ShowForm
(
forParameter
);
}
if
(
e
.
BarItemKey
==
"btn_tbReplace"
)
if
(
e
.
BarItemKey
==
"btn_tbReplace"
)
{
DynamicFormShowParameter
forParameter
=
new
DynamicFormShowParameter
();
//获取动态表单的唯一标识
forParameter
.
FormId
=
"qaz_GGReplace"
;
var
lv
=
this
.
View
as
IListView
;
if
(
lv
==
null
)
{
return
;
}
string
billno
=
""
;
var
selectedRows
=
lv
.
SelectedRowsInfo
;
if
(
selectedRows
==
null
||
selectedRows
.
Count
==
0
)
{
this
.
View
.
ShowMessage
(
"当前没有行被选中!"
);
return
;
}
else
{
for
(
int
i
=
0
;
i
<
selectedRows
.
Count
;
i
++)
{
billno
+=
selectedRows
[
i
].
PrimaryKeyValue
.
ToString
()+
","
;
}
}
//DynamicFormShowParameter forParameter = new DynamicFormShowParameter();
////获取动态表单的唯一标识
//forParameter.FormId = "qaz_GGReplace";
//forParameter.CustomComplexParams.Add("billno", billno);
//this.View.ShowForm(forParameter);
DynamicFormShowParameter
dynamicFormShowParameter
=
new
DynamicFormShowParameter
();
dynamicFormShowParameter
.
FormId
=
"qaz_GGReplace"
;
dynamicFormShowParameter
.
CustomParams
.
Add
(
"billno"
,
billno
);
this
.
View
.
ShowForm
(
dynamicFormShowParameter
);
this
.
View
.
ReturnToParentWindow
(
dynamicFormShowParameter
);
this
.
View
.
ShowForm
(
forParameter
);
}
}
...
...
Code/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin/LF.K3.SCM.BusinessPlugin.csproj
浏览文件 @
74b500df
...
...
@@ -76,7 +76,7 @@
<Compile
Include=
"ImportDatePlugin.cs"
/>
<Compile
Include=
"ImportExcelPlugin.cs"
/>
<Compile
Include=
"LastOutWarningPlugin.cs"
/>
<Compile
Include=
"
OpenGGReplace
.cs"
/>
<Compile
Include=
"
GGReplaceModel
.cs"
/>
<Compile
Include=
"OutStockEditPlugin.cs"
/>
<Compile
Include=
"OutStockListPlugin.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
...
...
DataModel/6002_51c046d1/ee6e060d-032b-46e6-953f-93d8e8d2baee.2052.dymx
浏览文件 @
74b500df
No preview for this file type
DataModel/6002_51c046d1/ee6e060d-032b-46e6-953f-93d8e8d2baee.dym
浏览文件 @
74b500df
No preview for this file type
DataModel/6002_51c046d1/qaz_BOMTASK.2052.dymx
浏览文件 @
74b500df
No preview for this file type
DataModel/6002_51c046d1/qaz_BOMTASK.dym
浏览文件 @
74b500df
No preview for this file type
DataModel/6002_51c046d1/qaz_GGReplace.2052.dymx
浏览文件 @
74b500df
No preview for this file type
DataModel/6002_51c046d1/qaz_GGReplace.dym
浏览文件 @
74b500df
No preview for this file type
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论