Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ed886837
由
LN
编写于
2026-01-20 14:23:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.外部数据匹配后显示到界面。2.外部数据源读取优化。
1 个父辈
f88539ce
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
62 行增加
和
3 行删除
BLL/Extension/Item_General.cs
BLL/ExtraFileData.cs
BLL/Extension/Item_General.cs
查看文件 @
ed88683
...
...
@@ -302,6 +302,15 @@ namespace BLL
{
LogNet
.
log
.
Info
(
$
"updatereelid false"
);
if
(
findOk
)
{
LogNet
.
log
.
Info
(
$
"OnKeySet3 findOK"
);
OnKeySet
(
templateName
,
originalCode
,
key
,
hasMatch
);
if
(
lastKeys
==
null
&&
!
islast
&&
BLLCommon
.
config
.
CheckFunction
)
{
lastKeys
=
new
Dictionary
<
string
,
string
>(
key
);
// 更新 lastKey
}
}
return
false
;
}
// }
...
...
BLL/ExtraFileData.cs
查看文件 @
ed88683
...
...
@@ -69,7 +69,7 @@ namespace BLL
var
dataline
=
sm
.
ReadLine
();
if
(
string
.
IsNullOrWhiteSpace
(
dataline
))
break
;
var
datas
=
dataline
.
Split
(
','
);
var
datas
=
ParseCsvLine
(
dataline
);
if
(
datas
.
Length
<
Titles
.
Count
)
continue
;
string
keydata
=
""
;
...
...
@@ -115,10 +115,56 @@ namespace BLL
using
var
sm
=
new
StreamReader
(
filename
,
Encoding
.
GetEncoding
(
Config
.
DataSource_Encoding
.
Val
));
var
titleline
=
sm
.
ReadLine
();
var
titles
=
new
List
<
string
>(
titleline
.
Split
(
','
));
var
titles
=
new
List
<
string
>(
ParseCsvLine
(
titleline
));
return
titles
;
}
private
static
string
[]
ParseCsvLine
(
string
line
)
{
List
<
string
>
result
=
new
List
<
string
>();
try
{
if
(
string
.
IsNullOrEmpty
(
line
))
return
new
string
[
0
];
StringBuilder
currentStr
=
new
StringBuilder
();
bool
inQuotes
=
false
;
for
(
int
i
=
0
;
i
<
line
.
Length
;
i
++)
{
char
c
=
line
[
i
];
if
(
c
==
'\"'
)
{
if
(
inQuotes
&&
i
+
1
<
line
.
Length
&&
line
[
i
+
1
]
==
'\"'
)
{
currentStr
.
Append
(
'\"'
);
i
++;
}
else
{
inQuotes
=
!
inQuotes
;
}
}
else
if
(
c
==
','
&&
!
inQuotes
)
{
result
.
Add
(
currentStr
.
ToString
());
currentStr
.
Clear
();
}
else
{
currentStr
.
Append
(
c
);
}
}
result
.
Add
(
currentStr
.
ToString
());
}
catch
(
Exception
ex
)
{
LogNet
.
log
.
Error
(
"ParseCsvLine,line="
+
line
+
" 出错:"
+
ex
.
ToString
());
}
return
result
.
ToArray
();
}
public
static
void
LoadXLSALlData
()
{
...
...
@@ -374,12 +420,16 @@ namespace BLL
foreach
(
Dictionary
<
string
,
string
>
data
in
sourceData
)
{
if
(
data
.
ContainsKey
(
titleValue
)
&&
data
[
titleValue
]
==
CleanData
)
if
(
data
.
ContainsKey
(
titleValue
)
)
{
string
vstring
=
data
[
titleValue
];
if
(
vstring
.
Trim
().
Equals
(
CleanData
.
Trim
()))
{
findData
.
Add
(
data
);
}
}
}
}
if
(
findData
.
Count
>
0
)
{
var
findDataMap
=
new
Dictionary
<
string
,
string
>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论