Commit c9a71a24 by 兰国旗

laolan

parent cb2750ac
...@@ -1128,7 +1128,20 @@ class RegCenterOrderService { ...@@ -1128,7 +1128,20 @@ class RegCenterOrderService {
var uappId = orderInfo.uapp_id; var uappId = orderInfo.uapp_id;
var channelOrderNo = orderInfo.channelOrderNo var channelOrderNo = orderInfo.channelOrderNo
} }
let startTime
let endTime
if (ab.startTime) {
startTime = (new Date(ab.startTime * 1000)).Format("yyyy-MM-dd hh:mm:ss")
}
if (ab.startTime) {
endTime = (new Date(ab.endTime * 1000)).Format("yyyy-MM-dd hh:mm:ss")
}
if (ab.consultType == "QYJYTC1") {
bizTypeName = "企业经营套餐一"
}
if (ab.consultType == "QYJYTC2") {
bizTypeName = "企业经营套餐二"
}
//判断是否有交付信息 //判断是否有交付信息
if (orderdeliveryInfo[0] && orderdeliveryInfo[0].deliveryContent) { if (orderdeliveryInfo[0] && orderdeliveryInfo[0].deliveryContent) {
deliveryContent = orderdeliveryInfo[0].deliveryContent; deliveryContent = orderdeliveryInfo[0].deliveryContent;
...@@ -1223,7 +1236,7 @@ class RegCenterOrderService { ...@@ -1223,7 +1236,7 @@ class RegCenterOrderService {
var afterStatusList = [//用户支付后的流程状态 var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS" "COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
]; ];
if (!deliveryContent[ab.productType] || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) { if (!deliveryContent[ab.productType] || (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0)) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集"); return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
} }
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") { if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
...@@ -1249,6 +1262,19 @@ class RegCenterOrderService { ...@@ -1249,6 +1262,19 @@ class RegCenterOrderService {
return system.getResultFail(-708, "该方案已完成,不可更改"); return system.getResultFail(-708, "该方案已完成,不可更改");
} }
} }
deliveryContent['GSZZ'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "工商执照",
status: ab.ApplicationStatus,
statusName: this.regDeliveryStatusName[ab.ApplicationStatus],
channelStatus: this.regDeliveryStatus[ab.ApplicationStatus],
customerInfo: needsolutioninfo.solutionContent.customerInfo,
update_at: new Date().Format("yyyy-MM-dd hh:mm:ss"),
officialFile: ab.officialFile || "",
deliveryFlowList: []
}
} }
if (ab.productType && ab.productType == "DZFW") {//地址服务 if (ab.productType && ab.productType == "DZFW") {//地址服务
if (ab.ApplicationStatus == 702) {//材料收集环节 if (ab.ApplicationStatus == 702) {//材料收集环节
...@@ -1260,7 +1286,7 @@ class RegCenterOrderService { ...@@ -1260,7 +1286,7 @@ class RegCenterOrderService {
var afterStatusList = [//用户支付后的流程状态 var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS" "COLLECTING", "AUDITING", "ENGRAVING", "SUCCESS"
]; ];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) { if (!deliveryContent[ab.productType] || (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0)) {
return system.getResultFail(-703, "交付流程错误,请先完成材料收集"); return system.getResultFail(-703, "交付流程错误,请先完成材料收集");
} }
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") { if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
...@@ -1271,7 +1297,7 @@ class RegCenterOrderService { ...@@ -1271,7 +1297,7 @@ class RegCenterOrderService {
var afterStatusList = [//用户支付后的流程状态 var afterStatusList = [//用户支付后的流程状态
"COLLECTING", "AUDITING", "SUCCESS" "COLLECTING", "AUDITING", "SUCCESS"
]; ];
if (!deliveryContent[ab.productType].channelStatus || afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0) { if (!deliveryContent[ab.productType] || (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && afterStatusList.indexOf(deliveryContent[ab.productType].channelStatus) < 0)) {
return system.getResultFail(-704, "交付流程错误,请先工商审核"); return system.getResultFail(-704, "交付流程错误,请先工商审核");
} }
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") { if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
...@@ -1286,80 +1312,27 @@ class RegCenterOrderService { ...@@ -1286,80 +1312,27 @@ class RegCenterOrderService {
return system.getResultFail(-708, "该方案已完成,不可更改"); return system.getResultFail(-708, "该方案已完成,不可更改");
} }
} }
} deliveryContent['DZFW'] = {
if (ab.productType && ab.productType == "YHKH" || ab.productType == "SWBD") {//银行开户、税务报道:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
}
if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态
if (ab.ApplicationStatus == 706) {//服务中
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "ACTIVE") {
return system.getResultFail(-707, "该交付单已在服务中,不能重复提交");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该交付单已在服务中,不能重复提交");
}
}
}
//如果存在交付信息的话就去进行逻辑判断
if (deliveryContent && deliveryContent[ab.productType] && deliveryContent[ab.productType].status && deliveryContent[ab.productType].deliveryFlowList) {
if (this.regStatus[deliveryContent.ApplicationStatus] && this.regStatus[deliveryContent.ApplicationStatus] == ab.ApplicationStatus && ab.ApplicationStatus == 705) {
return system.getResultFail(-406, "操作失败,该交付已完成,不能更改");
}
deliveryFlowList = deliveryContent[ab.productType].solutionFlowList || [];
} else {//如果交付信息不存在的话就去进行赋值
let startTime
let endTime
if (ab.startTime) {
startTime = (new Date(ab.startTime * 1000)).Format("yyyy-MM-dd hh:mm:ss")
}
if (ab.startTime) {
endTime = (new Date(ab.endTime * 1000)).Format("yyyy-MM-dd hh:mm:ss")
}
if (ab.consultType == "QYJYTC1") {
bizTypeName = "企业经营套餐一"
}
if (ab.consultType == "QYJYTC2") {
bizTypeName = "企业经营套餐二"
}
switch (productType) {
case "GSZZ":
deliveryContent['GSZZ'] = {
bizType: ab.consultType, bizType: ab.consultType,
bizTypeName: bizTypeName, bizTypeName: bizTypeName,
productType: productType, productType: productType,
productTypeName: "工商执照", productTypeName: "地址服务",
startTime: startTime || "",
endTime: endTime || "",
status: ab.ApplicationStatus, status: ab.ApplicationStatus,
statusName: this.regDeliveryStatusName[ab.ApplicationStatus], statusName: this.regDeliveryStatusName[ab.ApplicationStatus],
channelStatus: this.regDeliveryStatus[ab.ApplicationStatus], channelStatus: this.regDeliveryStatus[ab.ApplicationStatus],
customerInfo: needsolutioninfo.solutionContent.customerInfo,
update_at: new Date().Format("yyyy-MM-dd hh:mm:ss"), update_at: new Date().Format("yyyy-MM-dd hh:mm:ss"),
officialFile: ab.officialFile || "", officialFile: ab.officialFile || "",
deliveryFlowList: [] deliveryFlowList: []
} }
break;
case "YHKH":
deliveryContent['YHKH'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "银行开户",
status: ab.ApplicationStatus,
statusName: this.regDeliveryStatusName[ab.ApplicationStatus],
channelStatus: this.regDeliveryStatus[ab.ApplicationStatus],
update_at: new Date().Format("yyyy-MM-dd hh:mm:ss"),
officialFile: ab.officialFile || "",
deliveryFlowList: []
} }
break; if (ab.productType && ab.productType == "SWBD") {//税务报道:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//已完成
case "SWBD": if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
deliveryContent['SWBD'] = { deliveryContent['SWBD'] = {
bizType: ab.consultType, bizType: ab.consultType,
bizTypeName: bizTypeName, bizTypeName: bizTypeName,
...@@ -1372,16 +1345,18 @@ class RegCenterOrderService { ...@@ -1372,16 +1345,18 @@ class RegCenterOrderService {
officialFile: ab.officialFile || "", officialFile: ab.officialFile || "",
deliveryFlowList: [] deliveryFlowList: []
} }
break; }
if (ab.productType && ab.productType == "YHKH") {//银行开户、:有已接单,已完成状态
case "DLJZ": if (ab.ApplicationStatus == 705) {//已完成
deliveryContent['DLJZ'] = { if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
deliveryContent['YHKH'] = {
bizType: ab.consultType, bizType: ab.consultType,
bizTypeName: bizTypeName, bizTypeName: bizTypeName,
productType: productType, productType: productType,
productTypeName: "代理记账", productTypeName: "银行开户",
startTime: startTime || "",
endTime: endTime || "",
status: ab.ApplicationStatus, status: ab.ApplicationStatus,
statusName: this.regDeliveryStatusName[ab.ApplicationStatus], statusName: this.regDeliveryStatusName[ab.ApplicationStatus],
channelStatus: this.regDeliveryStatus[ab.ApplicationStatus], channelStatus: this.regDeliveryStatus[ab.ApplicationStatus],
...@@ -1389,14 +1364,23 @@ class RegCenterOrderService { ...@@ -1389,14 +1364,23 @@ class RegCenterOrderService {
officialFile: ab.officialFile || "", officialFile: ab.officialFile || "",
deliveryFlowList: [] deliveryFlowList: []
} }
break; }
if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态
case "DZFW": if (ab.ApplicationStatus == 706) {//服务中
deliveryContent['DZFW'] = { if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "ACTIVE") {
return system.getResultFail(-707, "该交付单已在服务中,不能重复提交");
}
}
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该交付单已在服务中,不能重复提交");
}
}
deliveryContent['DLJZ'] = {
bizType: ab.consultType, bizType: ab.consultType,
bizTypeName: bizTypeName, bizTypeName: bizTypeName,
productType: productType, productType: productType,
productTypeName: "地址服务", productTypeName: "代理记账",
startTime: startTime || "", startTime: startTime || "",
endTime: endTime || "", endTime: endTime || "",
status: ab.ApplicationStatus, status: ab.ApplicationStatus,
...@@ -1406,8 +1390,13 @@ class RegCenterOrderService { ...@@ -1406,8 +1390,13 @@ class RegCenterOrderService {
officialFile: ab.officialFile || "", officialFile: ab.officialFile || "",
deliveryFlowList: [] deliveryFlowList: []
} }
break;
} }
//如果存在交付信息的话就去进行逻辑判断
if (deliveryContent && deliveryContent[ab.productType] && deliveryContent[ab.productType].status && deliveryContent[ab.productType].deliveryFlowList) {
if (this.regStatus[deliveryContent.ApplicationStatus] && this.regStatus[deliveryContent.ApplicationStatus] == ab.ApplicationStatus && ab.ApplicationStatus == 705) {
return system.getResultFail(-406, "操作失败,该交付已完成,不能更改");
}
deliveryFlowList = deliveryContent[ab.productType].solutionFlowList || [];
} }
deliveryContent[ab.productType].deliveryFlowList.push({ deliveryContent[ab.productType].deliveryFlowList.push({
status: ab.ApplicationStatus, status: ab.ApplicationStatus,
......
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