Commit ac1f05db by 兰国旗

laolan

parent 75dd282d
...@@ -86,7 +86,7 @@ class RegCenterOrderService{ ...@@ -86,7 +86,7 @@ class RegCenterOrderService{
} }
return system.getResultSuccess(item); return system.getResultSuccess(item);
} }
//接收icp用户方案反馈 //接收reg用户方案反馈
async regFeedbackSubmit(pobj) { async regFeedbackSubmit(pobj) {
var ab = pobj.actionBody; var ab = pobj.actionBody;
if (!ab.intentionBizId) { if (!ab.intentionBizId) {
...@@ -185,16 +185,8 @@ class RegCenterOrderService{ ...@@ -185,16 +185,8 @@ class RegCenterOrderService{
//渠道方案号获取需求详情 //渠道方案号获取需求详情
async getItemByChannelSolutionNo(pobj) { async getItemByChannelSolutionNo(pobj) {
console.log('getItemByChannelSolutionNo---',pobj) console.log('getItemByChannelSolutionNo---',pobj)
// var i = 0; var solutionitem = await this.needsolutionDao.findOne({ channelSolutionNo: pobj.actionBody.channelSolutionNo });
// var bizIdLength = pobj.actionBody.length; console.log('solutionitem---',pobj)
// var bizIdList = [];
// for (i = 0; i <= bizIdLength; i++) {
// bizIdList.push(pobj.actionBody[i].bizId)
// }
// bizIdListStr = bizIdList.join(",");
var solutionitem = await this.needsolutionDao.findOne({ channelSolutionNo: pobj.actionBody.bizId });
// var sql = "select * from n_need_solution where channelSolutionNo in (" + bizIdListStr + ")";
// var solutionitem = await this.customQuery(sql);
if (!solutionitem) { if (!solutionitem) {
return system.getResult(null, "方案数据为空,30210"); return system.getResult(null, "方案数据为空,30210");
} }
...@@ -203,7 +195,7 @@ class RegCenterOrderService{ ...@@ -203,7 +195,7 @@ class RegCenterOrderService{
return system.getResult(null, "需求数据为空,30210"); return system.getResult(null, "需求数据为空,30210");
} }
item.solutionProvince = solutionitem.solutionContent.solution.Area || solutionitem.solutionContent.solution.area; item.solutionProvince = solutionitem.solutionContent.solution.area;
item.solutionContent = solutionitem.solutionContent item.solutionContent = solutionitem.solutionContent
item.channelSolutionNo = solutionitem.channelSolutionNo item.channelSolutionNo = solutionitem.channelSolutionNo
return system.getResultSuccess(item); return system.getResultSuccess(item);
...@@ -385,11 +377,12 @@ class RegCenterOrderService{ ...@@ -385,11 +377,12 @@ class RegCenterOrderService{
}; };
newNsObj.solutionContent = JSON.stringify(newSolutionCount); newNsObj.solutionContent = JSON.stringify(newSolutionCount);
var ns = null; var ns = null;
if(oldNs && oldNs.id){ // if(oldNs && oldNs.id){
ns = oldNs; // ns = oldNs;
}else{ // console.log('ddddddd---ns=====',ns)
// }else{
ns = await this.needsolutionDao.create(newNsObj); ns = await this.needsolutionDao.create(newNsObj);
} // }
var ns2 = await this.needsolutionDao.model.findOne({ var ns2 = await this.needsolutionDao.model.findOne({
where: { id: ns.id }, raw: true where: { id: ns.id }, raw: true
}); });
...@@ -407,10 +400,6 @@ class RegCenterOrderService{ ...@@ -407,10 +400,6 @@ class RegCenterOrderService{
// solutionContent = JSON.parse(solutionContent); // solutionContent = JSON.parse(solutionContent);
solutionContent["totalSum"] = Number(ab.orderPrice || "0"); solutionContent["totalSum"] = Number(ab.orderPrice || "0");
} }
// 2020 1017 lin 新增去掉status的判断,生成订单这个方案才算完成,所以没必要再判断,另一个原因网文2.3每个状态都有不同status,所以不能以来有没有status来决定方案完成情况。
// if (ab.status) {
// needsolutioninfo.status = "ywc";
// }
if (ab.orderNo) { if (ab.orderNo) {
needsolutioninfo.orderNo = ab.orderNo; needsolutioninfo.orderNo = ab.orderNo;
needsolutioninfo.status = "ywc"; needsolutioninfo.status = "ywc";
...@@ -998,7 +987,9 @@ class RegCenterOrderService{ ...@@ -998,7 +987,9 @@ class RegCenterOrderService{
if (ab.officialFileURL) { if (ab.officialFileURL) {
ab["OfficialFileURL"] = ab.officialFileURL; ab["OfficialFileURL"] = ab.officialFileURL;
} }
if(pobj.deliverContent){
ab['deliverContent']= ab.deliverContent
}
var ns = await this.needsolutionDao.model.findOne({ var ns = await this.needsolutionDao.model.findOne({
where: { orderNo: ab.orderNo }, raw: true where: { orderNo: ab.orderNo }, raw: true
}); });
...@@ -1025,6 +1016,10 @@ class RegCenterOrderService{ ...@@ -1025,6 +1016,10 @@ class RegCenterOrderService{
if (!ab.ApplicationStatus) { if (!ab.ApplicationStatus) {
return system.getResultFail(-102, "通知状态不能为空"); return system.getResultFail(-102, "通知状态不能为空");
} }
var deliveryContents;
if(ab.deliverContent){
deliveryContents = ab.deliverContent
}
//获取方案信息 //获取方案信息
var needsolutioninfo = await this.needsolutionDao.model.findOne({ var needsolutioninfo = await this.needsolutionDao.model.findOne({
attributes: ["id", "status", "solutionContent", "needNo"], attributes: ["id", "status", "solutionContent", "needNo"],
...@@ -1096,7 +1091,7 @@ class RegCenterOrderService{ ...@@ -1096,7 +1091,7 @@ class RegCenterOrderService{
} }
if (ab.ApplicationStatus == 703) {//工商审核环节 if (ab.ApplicationStatus == 703) {//工商审核环节
if (deliveryContent.status != "COLLECTING") { if (deliveryContent.status != "COLLECTING") {
return system.getResultFail(-703, "交付流程错误,请先已接单"); return system.getResultFail(-703, "交付流程错误,材料收集");
} }
deliveryContent['ApplicationStatus'] = 703; deliveryContent['ApplicationStatus'] = 703;
solutionFlowList.push({ solutionFlowList.push({
...@@ -1105,10 +1100,13 @@ class RegCenterOrderService{ ...@@ -1105,10 +1100,13 @@ class RegCenterOrderService{
}); });
deliveryContent.status = "AUDITING"; deliveryContent.status = "AUDITING";
deliveryContent.statusName = this.regSolutionStatus.AUDITING; deliveryContent.statusName = this.regSolutionStatus.AUDITING;
console.log('deliveryContent-----sss---',deliveryContent)
console.log('deliveryContent-----ss+++',typeof(deliveryContent))
deliveryContent['deliveryContent'] = deliveryContents
} }
if (ab.ApplicationStatus == 704) {//刻章环节 if (ab.ApplicationStatus == 704) {//刻章环节
if (deliveryContent.status != "AUDITING") { if (deliveryContent.status != "AUDITING") {
return system.getResultFail(-704, "交付流程错误,请先材料收集环节"); return system.getResultFail(-704, "交付流程错误,请先工商审核");
} }
deliveryContent['ApplicationStatus'] = 704; deliveryContent['ApplicationStatus'] = 704;
solutionFlowList.push({ solutionFlowList.push({
...@@ -1120,7 +1118,7 @@ class RegCenterOrderService{ ...@@ -1120,7 +1118,7 @@ class RegCenterOrderService{
} }
if (ab.ApplicationStatus == 705) {//已完成 if (ab.ApplicationStatus == 705) {//已完成
if (deliveryContent.status != "ENGRAVING") { if (deliveryContent.status != "ENGRAVING") {
return system.getResultFail(-705, "交付流程错误,请先材料收集环节"); return system.getResultFail(-705, "交付流程错误,请先刻章");
} }
deliveryContent['ApplicationStatus'] = 705; deliveryContent['ApplicationStatus'] = 705;
solutionFlowList.push({ solutionFlowList.push({
......
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