Commit 4176fa8a by Sxy

fix: 代码格式

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