Commit 7c4785f5 authored by Scott Sun's avatar Scott Sun

s

parent a445aa63
...@@ -100,6 +100,7 @@ try { ...@@ -100,6 +100,7 @@ try {
} }
var matrix = UPLOAD_LAYER_MATRIX({job:job}) // 分析matrix 获得分析后的matrix信息 var matrix = UPLOAD_LAYER_MATRIX({job:job}) // 分析matrix 获得分析后的matrix信息
GEN.openStep({job:job, name:pcs_step}) GEN.openStep({job:job, name:pcs_step})
GEN.units({type:"mm"})
_.values(matrix).forEach(function(v){ _.values(matrix).forEach(function(v){
if(v.context == "board" && v.layer_type == "drill"){ if(v.context == "board" && v.layer_type == "drill"){
...@@ -800,7 +801,10 @@ function analysis(props){ ...@@ -800,7 +801,10 @@ function analysis(props){
this.jobId = props.jobId; this.jobId = props.jobId;
if(props.pcs_step){ this.pcs_step = props.pcs_step; } if(props.pcs_step){ this.pcs_step = props.pcs_step; }
if(props.matrix){ this.matrix = props.matrix; } if(props.matrix){ this.matrix = props.matrix; }
if(props.array_step){ this.array_step = props.array_step; } if(props.array_step){
this.array_step = props.array_step;
}
this.matrixInfo = getMatrixInfo({job:this.job}) this.matrixInfo = getMatrixInfo({job:this.job})
this.init(); this.init();
} }
......
...@@ -131,7 +131,18 @@ try { ...@@ -131,7 +131,18 @@ try {
if(!fs.exists(path)){throw "path error"} if(!fs.exists(path)){throw "path error"}
var pathInfo = fs.listDir(path, 1) var pathInfo = fs.listDir(path, 1)
// 判断存不存在料号文件 // 判断存不存在料号文件
var jobFile = pathInfo.filter(function(v){return v.baseName.toLowerCase() == job}) 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"} if(jobFile.length == 0){throw "job file is not exist"}
var jobFiles = [] // 记录要分析的文件 var jobFiles = [] // 记录要分析的文件
if (!jobFile[0].isDir) { if (!jobFile[0].isDir) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment