Commit 9f8f963e by 任晓松

360推送

parent 78d94a77
...@@ -14,7 +14,18 @@ class Push360Service extends AppBase{ ...@@ -14,7 +14,18 @@ class Push360Service extends AppBase{
//推送数据至360 //推送数据至360
async pushTmStatus(actionBody,req) { async pushTmStatus(actionBody,req) {
let status = 30; let status = 30;
if (actionBody.tmStatus == 3 || actionBody.tmStatus == "ROBOTPAY") { let sub_status = 6;
//待递交
if (actionBody.tmStatus == "WAITCOMMIT" || actionBody.tmStatus == "ddj") {
sub_status = 6;
}
//已递交
if (actionBody.tmStatus == "ROBOT" || actionBody.tmStatus == "ROBOTPAY") {
sub_status = 7;
}
//已完成
if (actionBody.tmStatus == "RECVCOMMIT" || actionBody.tmStatus == "ydj") {
sub_status = 8;
status = 40; status = 40;
} }
let order_id = actionBody.orderNo; let order_id = actionBody.orderNo;
...@@ -29,7 +40,8 @@ class Push360Service extends AppBase{ ...@@ -29,7 +40,8 @@ class Push360Service extends AppBase{
url = this.push360Url + 'api/v1/eshop/GsbOrderUpdate?token=' + token; url = this.push360Url + 'api/v1/eshop/GsbOrderUpdate?token=' + token;
pushObj = { pushObj = {
order_id: order_id, order_id: order_id,
status: status status: status,
sub_status:sub_status
} }
result = await this.execPostByTimeOut(null,pushObj, url); result = await this.execPostByTimeOut(null,pushObj, url);
if (result.status != 0) { if (result.status != 0) {
......
...@@ -583,9 +583,9 @@ class BaseQcService { ...@@ -583,9 +583,9 @@ class BaseQcService {
if (!needsolutioninfo || !needsolutioninfo.id) { if (!needsolutioninfo || !needsolutioninfo.id) {
return system.getResultFail(-400, "未知方案"); return system.getResultFail(-400, "未知方案");
} }
if (!needsolutioninfo.needNo) { // if (!needsolutioninfo.needNo) {
return system.getResultFail(-401, "方案需求信息有误"); // return system.getResultFail(-401, "方案需求信息有误");
} // }
var solutionContent = needsolutioninfo.solutionContent; var solutionContent = needsolutioninfo.solutionContent;
if (!solutionContent) { if (!solutionContent) {
return system.getResultFail(-402, "方案交付信息有误"); return system.getResultFail(-402, "方案交付信息有误");
...@@ -616,9 +616,23 @@ class BaseQcService { ...@@ -616,9 +616,23 @@ class BaseQcService {
if(orderuappId){ if(orderuappId){
var uappId = orderuappId.uapp_id; var uappId = orderuappId.uapp_id;
} }
if(uappId != '50'){
if (!needsolutioninfo.needNo) {
return system.getResultFail(-401, "方案需求信息有误");
}
//获取需求信息
var needinfo = await this.needinfoDao.model.findOne({
where: { needNo: needsolutioninfo.needNo }, raw: true
});
if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息");
}
if (needinfo.status == "ygb") {
return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作");
}
}
if (ab.ApplicationStatus == 507) {//完成账户注册 if (ab.ApplicationStatus == 507) {//完成账户注册
if(uappId == '18'){ if(uappId != '50'){
if (solutionContent.status != "USER_CONFIRMED") { if (solutionContent.status != "USER_CONFIRMED") {
return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作"); return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作");
} }
......
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