Commit d8162473 by 兰国旗

laolan

parent e5cb0c90
...@@ -1115,6 +1115,170 @@ class RegCenterOrderService { ...@@ -1115,6 +1115,170 @@ class RegCenterOrderService {
let solutionFlowList = []; let solutionFlowList = [];
var deliveryFlowList = []; var deliveryFlowList = [];
let deliveryContent = {}; let deliveryContent = {};
//2021-5-18 新增百度公司注册与公司注册套餐区分 start
if (ab.consultType && ab.consultType == "GSREG") {//公司注册
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
deliveryContent['ApplicationStatus'] = 702;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "COLLECTING", statusName: this.regSolutionStatus.COLLECTING, updated_at: new Date()
});
deliveryContent.status = "COLLECTING";
deliveryContent.statusName = this.regSolutionStatus.COLLECTING;
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent.status || afterStatusList.indexOf(deliveryContent.status) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 703;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "AUDITING", statusName: this.regSolutionStatus.AUDITING, updated_at: new Date()
});
deliveryContent.status = "AUDITING";
deliveryContent.statusName = this.regSolutionStatus.AUDITING;
console.log('deliveryContent-----sss---', deliveryContent)
console.log('deliveryContent-----ss+++', typeof (deliveryContent))
deliveryContent['deliveryContent'] = deliveryContents
}
if (ab.ApplicationStatus == 704) {//刻章环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent.status || afterStatusList.indexOf(deliveryContent.status) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 704;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "ENGRAVING", statusName: this.regSolutionStatus.ENGRAVING, updated_at: new Date()
});
deliveryContent.status = "ENGRAVING";
deliveryContent.statusName = this.regSolutionStatus.ENGRAVING;
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent.status != "ENGRAVING") {
return system.getResultFail(-705, "交付流程错误,请先刻章");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 705;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "SUCCESS", statusName: this.regSolutionStatus.SUCCESS, updated_at: new Date()
});
deliveryContent.status = "SUCCESS";
needsolutioninfo.status = "ywc";
deliveryContent.statusName = this.regSolutionStatus.SUCCESS;
}
}
if (ab.consultType && ab.consultType == "QYJYTC1" || ab.consultType && ab.consultType == "QYJYTC2") {//公司注册套餐1和公司注册套餐2
if (ab.productType && ab.productType == "GSZZ") {//工商执照
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 704) {//刻章环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType].channelStatus != "ENGRAVING") {
return system.getResultFail(-705, "交付流程错误,请先刻章");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "DZFW") {//地址服务
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 706) {//服务中
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType].channelStatus != "ACTIVE") {
return system.getResultFail(-705, "交付流程错误,请先变更状态为服务中");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "YHKH" || ab.productType == "SWBD") {//银行开户、税务报道:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//服务中
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态
if (ab.ApplicationStatus == 706) {//服务中
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
}
}
//2021-5-18 新增百度公司注册与公司注册套餐区分 end
if (ab.consultType == "GSREG") {//获取交付信息 原始公司注册 if (ab.consultType == "GSREG") {//获取交付信息 原始公司注册
if (orderdeliveryInfo[0] && orderdeliveryInfo[0].deliveryContent) {//如果存在交付信息的话就去进行逻辑判断 if (orderdeliveryInfo[0] && orderdeliveryInfo[0].deliveryContent) {//如果存在交付信息的话就去进行逻辑判断
deliveryContent = orderdeliveryInfo[0].deliveryContent; deliveryContent = orderdeliveryInfo[0].deliveryContent;
...@@ -1326,168 +1490,6 @@ class RegCenterOrderService { ...@@ -1326,168 +1490,6 @@ class RegCenterOrderService {
var channelOrderNo = orderInfo.channelOrderNo var channelOrderNo = orderInfo.channelOrderNo
} }
//2021-5-18 新增百度公司注册与公司注册套餐区分 start
if (ab.consultType && ab.consultType == "GSREG") {//公司注册
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
deliveryContent['ApplicationStatus'] = 702;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "COLLECTING", statusName: this.regSolutionStatus.COLLECTING, updated_at: new Date()
});
deliveryContent.status = "COLLECTING";
deliveryContent.statusName = this.regSolutionStatus.COLLECTING;
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent.status || afterStatusList.indexOf(deliveryContent.status) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 703;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "AUDITING", statusName: this.regSolutionStatus.AUDITING, updated_at: new Date()
});
deliveryContent.status = "AUDITING";
deliveryContent.statusName = this.regSolutionStatus.AUDITING;
console.log('deliveryContent-----sss---', deliveryContent)
console.log('deliveryContent-----ss+++', typeof (deliveryContent))
deliveryContent['deliveryContent'] = deliveryContents
}
if (ab.ApplicationStatus == 704) {//刻章环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent.status || afterStatusList.indexOf(deliveryContent.status) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 704;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "ENGRAVING", statusName: this.regSolutionStatus.ENGRAVING, updated_at: new Date()
});
deliveryContent.status = "ENGRAVING";
deliveryContent.statusName = this.regSolutionStatus.ENGRAVING;
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent.status != "ENGRAVING") {
return system.getResultFail(-705, "交付流程错误,请先刻章");
}
if (deliveryContent.status == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
deliveryContent['ApplicationStatus'] = 705;
solutionFlowList.push({
file: ab.OfficialFileURL || "",
status: "SUCCESS", statusName: this.regSolutionStatus.SUCCESS, updated_at: new Date()
});
deliveryContent.status = "SUCCESS";
needsolutioninfo.status = "ywc";
deliveryContent.statusName = this.regSolutionStatus.SUCCESS;
}
}
if (ab.consultType && ab.consultType == "QYJYTC1" || ab.consultType && ab.consultType == "QYJYTC2") {//公司注册套餐1和公司注册套餐2
if (ab.productType && ab.productType == "GSZZ") {//工商执照
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 704) {//刻章环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType].channelStatus != "ENGRAVING") {
return system.getResultFail(-705, "交付流程错误,请先刻章");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "DZFW") {//地址服务
if (ab.ApplicationStatus == 702) {//材料收集环节
if (needsolutioninfo.solutionContent.status != "PAID") {
return system.getResultFail(-702, "交付流程错误,请先完成支付");
}
}
if (ab.ApplicationStatus == 703) {//工商审核环节
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-706, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 706) {//服务中
var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "SUCCESS"
];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) {
return system.getResultFail(-704, "交付流程错误,请先工商审核");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType].channelStatus != "ACTIVE") {
return system.getResultFail(-705, "交付流程错误,请先变更状态为服务中");
}
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-708, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "YHKH" || ab.productType == "SWBD") {//银行开户、税务报道:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//服务中
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态
if (ab.ApplicationStatus == 706) {//服务中
if (deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
}
}
//2021-5-18 新增百度公司注册与公司注册套餐区分 end
if (ab.consultType && ab.consultType == "GSREG") { if (ab.consultType && ab.consultType == "GSREG") {
......
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