Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
Scott
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Scott Sun
Scott
Commits
6f787924
Commit
6f787924
authored
5 years ago
by
Scott Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scott
parent
149f666c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
480 additions
and
94 deletions
+480
-94
analysis_test.js
ats/scott_test/analysis_test.js
+149
-87
input_test.js
ats/scott_test/input_test.js
+2
-7
config_ats.js
config_ats.js
+329
-0
No files found.
ats/scott_test/analysis_test.js
View file @
6f787924
This diff is collapsed.
Click to expand it.
ats/scott_test/input_test.js
View file @
6f787924
...
...
@@ -130,18 +130,12 @@ try {
if
(
!
fs
.
exists
(
path
)){
throw
"path error"
}
var
pathInfo
=
fs
.
listDir
(
path
+
"/"
+
db_customer
.
toLowerCase
(),
1
)
// 判断存不存在料号文件
var
vc_position
=
db
.
query
(
""
,
function
(
q
){
return
q
.
selectValue
({
table
:
'pdm_job'
,
field
:
'version'
,
where
:{
id
:
JobId
}
})
});
var
job_file_baseName
=
job
// if(vc_position && vc_position != "" && !(/null/ig.test(vc_position))){
// job_file_baseName = job_file_baseName + "_" + vc_position
// }
var
jobFile
=
pathInfo
.
filter
(
function
(
v
){
return
v
.
baseName
.
toLowerCase
()
==
job_file_baseName
})
if
(
jobFile
.
length
==
0
){
throw
"job file is not exist"
}
var
jobFiles
=
[]
// 记录要分析的文件
if
(
!
jobFile
[
0
].
isDir
)
{
...
...
@@ -155,6 +149,7 @@ try {
var
importOk
=
false
;
// 是否成功导入
if
(
/odb/ig
.
test
(
jobInfo
.
type
)){
// odb导入
if
(
jobInfo
.
data
.
length
==
1
){
// 只分析到一个tgz文件 直接导入
console
.
log
(
"========= import one ====>path:"
+
_
.
toString
(
jobInfo
.
data
))
// ? tmp
var
err
=
importJob
({
name
:
job
,
db
:
custCfg
.
db
,
path
:
jobInfo
.
data
[
0
].
file
.
path
},
config
.
delSameJob
)
if
(
err
){
throw
err
}
}
else
{
// 多个tgz文件 说明需要合并
...
...
This diff is collapsed.
Click to expand it.
config_ats.js
View file @
6f787924
This diff is collapsed.
Click to expand it.
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