Commit 457f2b12 by 王栋源

wdy

parent bede1f2f
...@@ -13,7 +13,7 @@ class TmjsonfileService extends ServiceBase { ...@@ -13,7 +13,7 @@ class TmjsonfileService extends ServiceBase {
} }
async createjsonfile() { async createjsonfile() {
var sql = "select * from bi_trademarktransaction where ncl_one_code is not null and ncl_one_code<>'' limit 1000"; var sql = "select * from bi_trademarktransaction where id=175342";
var tminfos = await this.connectionigirl.query(sql); var tminfos = await this.connectionigirl.query(sql);
var sources = []; var sources = [];
if (tminfos[0]) { if (tminfos[0]) {
...@@ -22,18 +22,23 @@ class TmjsonfileService extends ServiceBase { ...@@ -22,18 +22,23 @@ class TmjsonfileService extends ServiceBase {
var strlist = null; var strlist = null;
if (tmg) { if (tmg) {
strlist = tmg.replace(/"/g, "").replace(/\[/g, "").replace(/\]/g, "").split(","); strlist = tmg.replace(/"/g, "").replace(/\[/g, "").replace(/\]/g, "").split(",");
if (!strlist) { for(var n=0;n<strlist.length;n++){
if (!strlist[n]) {
strlist.shift(); strlist.shift();
} }
} }
var des = tminfos[0][i].tm_ncl_third.replace(/\[/g, "").replace(/\]/g, "").replace(/\'/g, ""); }
var des = "";
if(tminfos[0][i].tm_ncl_third){
des = tminfos[0][i].tm_ncl_third.replace(/\[/g, "").replace(/\]/g, "").replace(/\'/g, "");
}
var source = { var source = {
beginTime: 1574388139000, beginTime: 1574388139000,
classificationCode: tminfos[0][i].ncl_one_code, classificationCode: tminfos[0][i].ncl_one_code,
description: des, description: des,
endTime: 1668089537981, endTime: 1668089537981,
label: "商标标签", label: "商标标签",
originalPrice: 10, originalPrice: parseInt(tminfos[0][i].platform_quoted_price) ,
ownerEnName: "", ownerEnName: "",
ownerName: tminfos[0][i].tm_applier, ownerName: tminfos[0][i].tm_applier,
partnerCode: "gong_si_bao", partnerCode: "gong_si_bao",
...@@ -47,9 +52,15 @@ class TmjsonfileService extends ServiceBase { ...@@ -47,9 +52,15 @@ class TmjsonfileService extends ServiceBase {
} }
sources.push(source); sources.push(source);
} }
var strdate = ""
if (newdate.getHours() > 12) {
strdate = newdate.getFullYear() + "" + m + d + "_2.json";
} else {
strdate = newdate.getFullYear() + "" + m + d + "_1.json";
}
var jsonstr = JSON.stringify(sources, null, "\t"); var jsonstr = JSON.stringify(sources, null, "\t");
return new Promise(function (resv, rej) { return new Promise(function (resv, rej) {
fs.writeFile('/tmp/20191125_2.json', jsonstr, function (err) { fs.writeFile('/tmp/'+strdate, jsonstr, function (err) {
if (err) { if (err) {
console.error(err); console.error(err);
} }
......
...@@ -15,7 +15,6 @@ class AliApiClient { ...@@ -15,7 +15,6 @@ class AliApiClient {
var self = this; var self = this;
var action = obj.action; var action = obj.action;
var reqbody = obj.reqbody; var reqbody = obj.reqbody;
return self.client.request(action, reqbody, { return self.client.request(action, reqbody, {
timeout: 3000, // default 3000 ms timeout: 3000, // default 3000 ms
formatAction: true, // default true, format the action to Action formatAction: true, // default true, format the action to Action
......
...@@ -31,14 +31,14 @@ var settings = { ...@@ -31,14 +31,14 @@ var settings = {
}, },
channelApiUrl: function () { channelApiUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://192.168.18.61:4003"; return "http://192.168.48.209:4003";
} else { } else {
return "http://zc-channel-service"; return "http://zc-channel-service";
} }
}, },
uploadfileossurl:function () { uploadfileossurl:function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://192.168.18.15:8080"; return "http://192.168.49.170:8080";
} else { } else {
return "http://localhost:8080"; return "http://localhost:8080";
} }
......
...@@ -40,11 +40,12 @@ ...@@ -40,11 +40,12 @@
}, },
addjson: function() { addjson: function() {
if (this.f1) { if (this.f1) {
var that=this;
var obj = { id: this.rowid, jsonfile_url: this.f1 }; var obj = { id: this.rowid, jsonfile_url: this.f1 };
this.$root.postReq("/web/transfer/tmjsonfileCtl/update", obj).then(function (d) { this.$root.postReq("/web/transfer/tmjsonfileCtl/update", obj).then(function (d) {
debugger; debugger;
if (d.status > -1) { if (d.status > -1) {
this.showUploadform = false; that.showUploadform = false;
} }
}) })
} else { } else {
......
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
} }
}, },
onColFormater(row, column, cellvalue, index){ onColFormater(row, column, cellvalue, index){
return cellvalue; return cellvalue;
}, },
handleSelectionChange: function(val) { handleSelectionChange: function(val) {
......
...@@ -4,6 +4,33 @@ ...@@ -4,6 +4,33 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@alicloud/pop-core": {
"version": "1.7.7",
"resolved": "https://registry.npmjs.org/@alicloud/pop-core/-/pop-core-1.7.7.tgz",
"integrity": "sha512-vrFXJyjc58LjpfjMyGSRxM0rkhEzJRXfwFFy3wzzS4Q8rTfosrnqZAW1G6gRoPUPjGBQxUpMBnHvMLfPRRAcCA==",
"requires": {
"debug": "^3.1.0",
"httpx": "^2.1.2",
"json-bigint": "^0.2.3",
"kitx": "^1.2.1",
"xml2js": "^0.4.17"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"@types/geojson": { "@types/geojson": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz",
...@@ -501,6 +528,11 @@ ...@@ -501,6 +528,11 @@
"callsite": "1.0.0" "callsite": "1.0.0"
} }
}, },
"bignumber.js": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz",
"integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA=="
},
"blob": { "blob": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
...@@ -3727,6 +3759,14 @@ ...@@ -3727,6 +3759,14 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"json-bigint": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-0.2.3.tgz",
"integrity": "sha1-EY1/b/HThlnxn5TPc+ZKdaP5iKg=",
"requires": {
"bignumber.js": "^4.0.0"
}
},
"json-schema": { "json-schema": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
...@@ -3790,6 +3830,11 @@ ...@@ -3790,6 +3830,11 @@
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true "dev": true
}, },
"kitx": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/kitx/-/kitx-1.3.0.tgz",
"integrity": "sha512-fhBqFlXd0GkKTB+8ayLfpzPUw+LHxZlPAukPNBD1Om7JMeInT+/PxCAf1yLagvD+VKoyWhXtJR68xQkX/a0wOQ=="
},
"lcid": { "lcid": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
......
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