Commit efece65b by Sxy

商机验重

parent 49968651
...@@ -233,25 +233,35 @@ class BizOptCtl extends CtlBase { ...@@ -233,25 +233,35 @@ class BizOptCtl extends CtlBase {
var pobj = nobj.d; var pobj = nobj.d;
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined') { if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined') {
try { try {
//pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案 const businessData = await this.service.findOne({ demand_code: pobj.businessMode });
// pobj.channelSource = "tencentCloud";//目前渠道只有腾讯 if (businessData) {
// pobj.sourceNumber = "1111111"; return {
pobj.businessType = appconfig.pdict.dyDict[pobj.businessType]; "status": 1, //1代表成功,否则失败
var buInfo = await this.service.insertInfo(pobj); "msg": "已处理成功!",
var logInfo = { "data": "",
"flowType": "BIZ", "requestId": ""
"flowId": buInfo.id, }
"statusCode": pobj.currentStatus, } else {
"clerkName": pobj.clerkName, //pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案
"clerkId": pobj.salesmanId // pobj.channelSource = "tencentCloud";//目前渠道只有腾讯
// pobj.sourceNumber = "1111111";
pobj.businessType = appconfig.pdict.dyDict[pobj.businessType];
var buInfo = await this.service.insertInfo(pobj);
var logInfo = {
"flowType": "BIZ",
"flowId": buInfo.id,
"statusCode": pobj.currentStatus,
"clerkName": pobj.clerkName,
"clerkId": pobj.salesmanId
}
await this.logService.insertInfo(logInfo);//插入状态日至表
return {
"status": 1, //1代表成功,否则失败
"message": "操作成功",
"data": "",
"requestId": ""
};
} }
await this.logService.insertInfo(logInfo);//插入状态日至表
return {
"status": 1, //1代表成功,否则失败
"message": "操作成功",
"data": "",
"requestId": ""
};
} }
catch (error) { catch (error) {
console.log("TTTTTTTTTTTTTTTTTTTTTTT"); console.log("TTTTTTTTTTTTTTTTTTTTTTT");
......
...@@ -699,7 +699,7 @@ class DeliverybillCtl extends CtlBase { ...@@ -699,7 +699,7 @@ class DeliverybillCtl extends CtlBase {
try { try {
var res = await this.service.findInfoByDeliverCode(pobj); var res = await this.service.findInfoByDeliverCode(pobj);
if (res) { if (res) {
if (res.delivery_status != 'received'){//如果数据库中状态是已接单,说明是第一次提交文件,状态为传过了的状态;如果不是已接单,说明是客户驳回后重新提交的文件,状态改为已驳回 if (res.delivery_status != 'received' && res.delivery_status != 'userUploadWait') {//如果数据库中状态是已接单、待用户上传,说明是第一次提交文件,状态为传过了的状态;如果不是已接单、待用户上传,说明是客户驳回后重新提交的文件,状态改为已驳回
pobj.deliverStatus = "userConfirmationReject";//状态改成驳回, pobj.deliverStatus = "userConfirmationReject";//状态改成驳回,
} }
await this.service.updateInfoByDeliverCode(pobj); await this.service.updateInfoByDeliverCode(pobj);
......
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