Commit 4176fa8a by Sxy

fix: 代码格式

parent eeca1ebd
...@@ -24,13 +24,14 @@ class DeliverDao extends Dao { ...@@ -24,13 +24,14 @@ class DeliverDao extends Dao {
]; ];
} }
const { search: { product_code } } = qobj; const { search: { productCode } } = qobj;
qc.raw = true; qc.raw = true;
const type = qobj.bizpath.split('/')[1]; const type = qobj.bizpath.split('/')[1];
if (type === 'deliveryManagement') { if (type === 'deliveryManagement') {
qc.where.product_code = ( qc.where.product_code = (
(product_code && [system.SERVICECODE.EDI, system.SERVICECODE.ICP].includes(product_code)) (productCode && [system.SERVICECODE.EDI,
? product_code system.SERVICECODE.ICP].includes(productCode))
? productCode
: { : {
$in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP], $in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP],
}); });
...@@ -39,8 +40,11 @@ class DeliverDao extends Dao { ...@@ -39,8 +40,11 @@ class DeliverDao extends Dao {
switch (qobj.bizpath) { switch (qobj.bizpath) {
case '/deliveryManagement/wait': case '/deliveryManagement/wait':
qc.where.delivery_status = qc.where.delivery_status || { qc.where.delivery_status = qc.where.delivery_status || {
$in: [system.SERVERSESTATUS.RECEIVED, system.SERVERSESTATUS.COLLECTING, $in: [system.SERVERSESTATUS.RECEIVED,
system.SERVERSESTATUS.SUBMITING, system.SERVERSESTATUS.DISPOSEING, system.SERVERSESTATUS.POSTING, system.SERVERSESTATUS.COLLECTING,
system.SERVERSESTATUS.SUBMITING,
system.SERVERSESTATUS.DISPOSEING,
system.SERVERSESTATUS.POSTING,
], ],
}; };
break; break;
...@@ -59,16 +63,19 @@ class DeliverDao extends Dao { ...@@ -59,16 +63,19 @@ class DeliverDao extends Dao {
} }
} else if (type === 'annualReport') { } else if (type === 'annualReport') {
qc.where.product_code = ( qc.where.product_code = (
(product_code (productCode
&& [system.SERVICECODE.ICPANNUALREPORT, system.SERVICECODE.EDIANNUALREPORT].includes(product_code)) && [system.SERVICECODE.ICPANNUALREPORT,
? product_code system.SERVICECODE.EDIANNUALREPORT].includes(productCode))
? productCode
: { : {
$in: [system.SERVICECODE.EDIANNUALREPORT, system.SERVICECODE.ICPANNUALREPORT], $in: [system.SERVICECODE.EDIANNUALREPORT,
system.SERVICECODE.ICPANNUALREPORT],
}); });
// ---- 兼容 年报 状态 未申报、已申报 start // ---- 兼容 年报 状态 未申报、已申报 start
let status; let status;
if ([system.ANNUALREPORT.WAITDECLARE, system.ANNUALREPORT.DECLARESUCCESS].includes(qc.where.delivery_status)) { if ([system.ANNUALREPORT.WAITDECLARE,
system.ANNUALREPORT.DECLARESUCCESS].includes(qc.where.delivery_status)) {
status = qc.where.delivery_status; status = qc.where.delivery_status;
delete qc.where.delivery_status; delete qc.where.delivery_status;
qobj.bizpath = '/annualReport/wait'; qobj.bizpath = '/annualReport/wait';
......
...@@ -114,12 +114,14 @@ class DeliverService extends ServiceBase { ...@@ -114,12 +114,14 @@ class DeliverService extends ServiceBase {
if (!deliverData) { if (!deliverData) {
throw new Error('没有此交付单'); throw new Error('没有此交付单');
} }
if (![system.SERVERSESTATUS.SUBMITING, system.SERVERSESTATUS.DISPOSEING, system.SERVERSESTATUS.POSTING].includes(deliverData.delivery_status)) { if (![system.SERVERSESTATUS.SUBMITING,
system.SERVERSESTATUS.DISPOSEING,
system.SERVERSESTATUS.POSTING].includes(deliverData.delivery_status)) {
throw new Error('此状态下不可手动更新办理状态'); throw new Error('此状态下不可手动更新办理状态');
} }
let status; let status;
let txstatus; let txstatus;
let materialInfo = {}; // let materialInfo = {};
switch (deliverData.delivery_status) { switch (deliverData.delivery_status) {
case system.SERVERSESTATUS.SUBMITING: case system.SERVERSESTATUS.SUBMITING:
status = system.SERVERSESTATUS.DISPOSEING; status = system.SERVERSESTATUS.DISPOSEING;
...@@ -146,7 +148,7 @@ class DeliverService extends ServiceBase { ...@@ -146,7 +148,7 @@ class DeliverService extends ServiceBase {
break; break;
} }
await pushTx.pushChangeOrder(txstatus, deliverData.delivery_code, materialInfo); await pushTx.pushChangeOrder(txstatus, deliverData.delivery_code);
await this.dao.updateByWhere({ await this.dao.updateByWhere({
delivery_status: status, delivery_status: status,
...@@ -209,7 +211,9 @@ class DeliverService extends ServiceBase { ...@@ -209,7 +211,9 @@ class DeliverService extends ServiceBase {
) { ) {
throw new Error('该交付单状态下不可提交'); throw new Error('该交付单状态下不可提交');
} }
if ([system.SERVERSESTATUS.SUCCESS, system.SERVERSESTATUS.POSTING, system.SERVERSESTATUS.DISPOSEING].includes(deliverData.delivery_status)) { if ([system.SERVERSESTATUS.SUCCESS,
system.SERVERSESTATUS.POSTING,
system.SERVERSESTATUS.DISPOSEING].includes(deliverData.delivery_status)) {
// 给腾讯 发消息 // 给腾讯 发消息
const STATUS = { const STATUS = {
success: pushTx.TXSTATUS.SUCCESS, success: pushTx.TXSTATUS.SUCCESS,
......
...@@ -227,7 +227,9 @@ function buildValue(value, cryptStr) { ...@@ -227,7 +227,9 @@ function buildValue(value, cryptStr) {
})); }));
} }
if (newValue.proposerInfo.businessInformation) { 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) { if (newValue.shareholderData) {
......
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