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

s

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