Commit 58cbb11d by Sxy

fix: 渠道

parent 201c6aff
......@@ -16,13 +16,13 @@ class MaterialCtl extends CtlBase {
}, [
{
model: this.db.models.deliver,
attributes: ["product_code", "source_name"],
attributes: ["product_code", "source_name", "source_number"],
}
]);
// 组装数据
return system.getResult(rs.map(item => {
const type = item.deliver.product_code;
const channel = item.deliver.source_name;
const channel = item.deliver.source_number;
const { proposerInfo, otherMaterialsInfo, implementationPlanInfo, safetyInfo, shareholderData } = item;
const { businessLicense, businessInformation, principalInfo, contactInfo } = proposerInfo;
const { webApp, targetUser, profitableWay, specialApproval, serviceProjectEdi, serviceProjectIcp } = implementationPlanInfo;
......
......@@ -60,7 +60,7 @@ class DeliverService extends ServiceBase {
await this.cacheinfoDao.createOrUpdate(pobj, t);
await this.materialDao.createOrUpdate(pobj, t);
if (deliverData.source_name === "tencentCloud") {
if (deliverData.source_number === "tencentCloud") {
if (deliverData.delivery_status === system.SERVERSESTATUS.COLLECTING) {
await this.dao.updateByWhere({
delivery_status: system.SERVERSESTATUS.SUBMITING
......@@ -77,7 +77,7 @@ class DeliverService extends ServiceBase {
}
}
if (deliverData.source_name === "aliCloud") {
if (deliverData.source_number === "aliCloud") {
if ([system.SERVERSESTATUS.COLLECTING, system.SERVERSESTATUS.USERCONFIRMATIONREJECT].includes(deliverData.delivery_status)) {
await this.dao.updateByWhere({
delivery_status: system.SERVERSESTATUS.USERCONFIRMATIONWAIT
......@@ -378,7 +378,7 @@ class DeliverService extends ServiceBase {
throw new Error("交付单不可查看");
}
if (result.source_name === "tencentCloud") {
if (result.source_number === "tencentCloud") {
if (!result.qualification) {
throw new Error("请先上传资质信息");
}
......@@ -406,7 +406,7 @@ class DeliverService extends ServiceBase {
id: material.id
}, t);
if (result.source_name === "tencentCloud") {
if (result.source_number === "tencentCloud") {
await this.dao.updateByWhere({
delivery_status: system.SERVERSESTATUS.POSTING,
}, {
......
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