Commit 33a8d68a authored by Scott Sun's avatar Scott Sun

s

parent 79cbbdc2
...@@ -84,6 +84,7 @@ try { ...@@ -84,6 +84,7 @@ try {
if(_.isEmpty(Job)) throw "没有传入料号名!"; if(_.isEmpty(Job)) throw "没有传入料号名!";
var job = Job.toLowerCase(); var job = Job.toLowerCase();
if(!GEN.isJobExists({job:job})){ throw "job "+ job+ " is not exist" }
// 检查料号是否能够check out // 检查料号是否能够check out
if(GEN.checkInout({job:job,mode:"test"}) != 0){ throw "the job check" } if(GEN.checkInout({job:job,mode:"test"}) != 0){ throw "the job check" }
GEN.checkInout({job:job,mode:"out"}); GEN.checkInout({job:job,mode:"out"});
......
...@@ -5,6 +5,12 @@ NAME: ...@@ -5,6 +5,12 @@ NAME:
DESCRIPTION: ; DESCRIPTION: ;
PARAMETER: PARAMETER:
[ [
{
name : 'path',
title : '资料路径',
type : 'LineEdit',
property : {tool_tip : '资料路径,必填'},
},
{ {
name : 'db', name : 'db',
title : '料号db', title : '料号db',
...@@ -71,15 +77,15 @@ if ($.hasOwnProperty('script_parameter')){ ...@@ -71,15 +77,15 @@ if ($.hasOwnProperty('script_parameter')){
try { try {
var par = PAR; var par = PAR;
var db_path = db.query("",function(q){ // var db_path = db.query("",function(q){
return q.selectValue({ // return q.selectValue({
table:'pub_conf', // table:'pub_conf',
field:'text_data', // field:'text_data',
where:{path : "quote-data-upload"} // where:{path : "quote-data-upload"}
}) // })
}); // });
if(_.isEmpty(db_path)){throw "quote-data-upload error"} // if(_.isEmpty(db_path)){throw "quote-data-upload error"}
par.path = db_path; if(!par.path || par.path == "") {throw "path error"}
if(!par.hasOwnProperty("config_path") || par.config_path==""){ if(!par.hasOwnProperty("config_path") || par.config_path==""){
console.log("========================cfg"); console.log("========================cfg");
par.config_path = "cam/input_data" par.config_path = "cam/input_data"
...@@ -120,7 +126,7 @@ try { ...@@ -120,7 +126,7 @@ try {
custCfg.db = par.db || custCfg.db custCfg.db = par.db || custCfg.db
var step = custCfg.step.toLowerCase() var step = custCfg.step.toLowerCase()
// 获取路径下文件信息 // 获取路径下文件信息
var path = JSON.parse(par.path).path var path = par.path
console.log("=============>path:"+ path) console.log("=============>path:"+ path)
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)
......
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