Commit 1922961f by Sxy

fix: 代码规范

parent 9cf1636a
......@@ -11,7 +11,7 @@ class OplogCtl extends CtlBase {
async initNewInstance(qobj) {
const u = uuidv4();
const aid = u.replace(/\-/g, '');
const aid = u.replace(/-/g, '');
const rd = { name: '', appid: aid };
return system.getResult(rd);
}
......
......@@ -50,11 +50,9 @@ class Dao {
whereParam.transaction = t;
const result = await this.model.destroy(whereParam);
return result
}
const result = await this.model.destroy(whereParam);
return result
}
async delete(qobj, t) {
let en = null;
......@@ -186,7 +184,6 @@ class Dao {
}
const result = await this.model.bulkCreate(ids);
return result;
}
async updateByWhere(setObj, whereObj, t) {
......
......@@ -101,8 +101,8 @@ class DbFactory {
// throw err;
// });
// 同步模型
if (settings.env == 'dev') {
}
// if (settings.env == 'dev') {
// }
return this.db;
}
}
......
......@@ -28,12 +28,12 @@ class DeliverDao extends Dao {
qc.raw = true;
const type = qobj.bizpath.split('/')[1];
if (type === 'deliveryManagement') {
qc.where.product_code =
qc.where.product_code = (
(product_code && [system.SERVICECODE.EDI, system.SERVICECODE.ICP].includes(product_code))
? product_code
: {
$in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP],
};
});
switch (qobj.bizpath) {
......@@ -58,12 +58,12 @@ class DeliverDao extends Dao {
break;
}
} else if (type === 'annualReport') {
qc.where.product_code =
qc.where.product_code = (
(product_code && [system.SERVICECODE.ICPANNUALREPORT, system.SERVICECODE.EDIANNUALREPORT].includes(product_code))
? product_code
: {
$in: [system.SERVICECODE.EDIANNUALREPORT, system.SERVICECODE.ICPANNUALREPORT],
};
});
// ---- 兼容 年报 状态 未申报、已申报 start
let status;
......
......@@ -84,8 +84,9 @@ function buildValue(value, cryptStr) {
}));
}
if (newValue.proposerInfo.businessInformation) {
newValue.proposerInfo.businessInformation.fixedTelephone =
cryptStr(newValue.proposerInfo.businessInformation.fixedTelephone);
newValue.proposerInfo.businessInformation.fixedTelephone = (
cryptStr(newValue.proposerInfo.businessInformation.fixedTelephone)
);
}
}
if (newValue.shareholderData) {
......
......@@ -10,7 +10,7 @@ class CachSearchesSve {
}
getUUID() {
const uuid = uuidv4();
const u = uuid.replace(/\-/g, '');
const u = uuid.replace(/-/g, '');
return u;
}
async buildCacheRtn(pageValues) {
......
......@@ -22,7 +22,7 @@ class ServiceBase {
}
getUUID() {
const uuid = uuidv4();
const u = uuid.replace(/\-/g, '');
const u = uuid.replace(/-/g, '');
return u;
}
static getDaoName(ClassObj) {
......
......@@ -7,7 +7,7 @@ class AuthUtils {
}
getUUID() {
const uuid = uuidv4();
const u = uuid.replace(/\-/g, '');
const u = uuid.replace(/-/g, '');
return u;
}
/**
......
......@@ -23,9 +23,9 @@ class ExecClient {
FetchPostCmd(subData, url) {
const data = JSON.stringify(subData);
const cmd = this.cmdPostPattern.replace(
/\{data\}/g,
/{data}/g,
data,
).replace(/\{url\}/g, url);
).replace(/{url}/g, url);
console.log(cmd);
return cmd;
}
......@@ -43,7 +43,7 @@ class ExecClient {
}
FetchGetCmd(subData, url) {
const cmd = this.cmdGetPattern.replace(/\{data\}/g, subData).replace(/\{url\}/g, url);
const cmd = this.cmdGetPattern.replace(/{data}/g, subData).replace(/{url}/g, url);
console.log(cmd);
return cmd;
}
......
......@@ -5,7 +5,7 @@ const system = require('../system');
class LogClient {
getUUID() {
const uuid = uuidv4();
const u = uuid.replace(/\-/g, '');
const u = uuid.replace(/-/g, '');
return u;
}
async log(pobj, req, rtninfo, errinfo) {
......@@ -25,3 +25,4 @@ class LogClient {
}
}
module.exports = LogClient;
......@@ -14,8 +14,8 @@ class RestClient {
this.cmdPostPattern5 = 'curl -k --data \'{data}\' {url}';
}
FetchGetCmd(subData, url) {
const cmd = this.cmdGetPattern.replace(/\{\-G\}/g, '-G').replace(/\{data\}/g, subData)
.replace(/\{url\}/g, url);
const cmd = this.cmdGetPattern.replace(/{-G}/g, '-G').replace(/{data}/g, subData)
.replace(/{url}/g, url);
return cmd;
}
FetchPostCmd(subData, url) {
......@@ -52,7 +52,7 @@ class RestClient {
return cmd;
}
FetchGetCmd3(url) {
const cmd = this.cmdGetPattern3.replace(/\{\-G\}/g, '-G').replace(/\{url\}/g, url);
const cmd = this.cmdGetPattern3.replace(/{-G}/g, '-G').replace(/{url}/g, url);
return cmd;
}
FetchPostCmd4(subData, url) {
......@@ -73,7 +73,7 @@ class RestClient {
}
FetchDownLoadCmd(outfname, url) {
// console.log(this.cmdPattern);
const cmd = this.cmdDownLoadFilePattern.replace(/\{fileName\}/g, outfname).replace(/\{url\}/g, url);
const cmd = this.cmdDownLoadFilePattern.replace(/{fileName}/g, outfname).replace(/{url}/g, url);
return cmd;
}
async exec(cmd) {
......
......@@ -31,4 +31,4 @@ function getDataUrl(filepath) {
}
const dataurl = `data:${mime};base64,${str}`;
return dataurl;
}
\ No newline at end of file
}
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