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,13 +1312,58 @@ class RegCenterOrderService { ...@@ -1286,13 +1312,58 @@ class RegCenterOrderService {
return system.getResultFail(-708, "该方案已完成,不可更改"); return system.getResultFail(-708, "该方案已完成,不可更改");
} }
} }
deliveryContent['DZFW'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "地址服务",
startTime: startTime || "",
endTime: endTime || "",
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: []
}
} }
if (ab.productType && ab.productType == "YHKH" || ab.productType == "SWBD") {//银行开户、税务报道:有已接单,已完成状态 if (ab.productType && ab.productType == "SWBD") {//税务报道:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//已完成 if (ab.ApplicationStatus == 705) {//已完成
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") {
return system.getResultFail(-707, "该方案已完成,不可更改"); return system.getResultFail(-707, "该方案已完成,不可更改");
} }
} }
deliveryContent['SWBD'] = {
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: []
}
}
if (ab.productType && ab.productType == "YHKH") {//银行开户、:有已接单,已完成状态
if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent[ab.productType] && deliveryContent[ab.productType].channelStatus && deliveryContent[ab.productType].channelStatus == "SUCCESS") {
return system.getResultFail(-707, "该方案已完成,不可更改");
}
}
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: []
}
} }
if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态 if (ab.productType && ab.productType == "DLJZ") {//代理记账:有已接单,服务中,已完成状态
if (ab.ApplicationStatus == 706) {//服务中 if (ab.ApplicationStatus == 706) {//服务中
...@@ -1305,6 +1376,20 @@ class RegCenterOrderService { ...@@ -1305,6 +1376,20 @@ class RegCenterOrderService {
return system.getResultFail(-707, "该交付单已在服务中,不能重复提交"); return system.getResultFail(-707, "该交付单已在服务中,不能重复提交");
} }
} }
deliveryContent['DLJZ'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "代理记账",
startTime: startTime || "",
endTime: endTime || "",
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: []
}
} }
//如果存在交付信息的话就去进行逻辑判断 //如果存在交付信息的话就去进行逻辑判断
if (deliveryContent && deliveryContent[ab.productType] && deliveryContent[ab.productType].status && deliveryContent[ab.productType].deliveryFlowList) { if (deliveryContent && deliveryContent[ab.productType] && deliveryContent[ab.productType].status && deliveryContent[ab.productType].deliveryFlowList) {
...@@ -1312,102 +1397,6 @@ class RegCenterOrderService { ...@@ -1312,102 +1397,6 @@ class RegCenterOrderService {
return system.getResultFail(-406, "操作失败,该交付已完成,不能更改"); return system.getResultFail(-406, "操作失败,该交付已完成,不能更改");
} }
deliveryFlowList = deliveryContent[ab.productType].solutionFlowList || []; 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,
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: []
}
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;
case "SWBD":
deliveryContent['SWBD'] = {
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;
case "DLJZ":
deliveryContent['DLJZ'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "代理记账",
startTime: startTime || "",
endTime: endTime || "",
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;
case "DZFW":
deliveryContent['DZFW'] = {
bizType: ab.consultType,
bizTypeName: bizTypeName,
productType: productType,
productTypeName: "地址服务",
startTime: startTime || "",
endTime: endTime || "",
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;
}
} }
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