Commit 6784d013 by sxy

fix: 需求联调 修改

parent f6bbca5f
...@@ -15,8 +15,8 @@ class BizOptCtl extends CtlBase { ...@@ -15,8 +15,8 @@ class BizOptCtl extends CtlBase {
let result = []; let result = [];
for (let val of rs.results.rows) { for (let val of rs.results.rows) {
val.company_name = val.business_info.company; val.company_name = val.business_info.company;
val.customer_number = val.business_info.phone; val.customer_number = val.business_info.contactsPhone;
val.customer_name = val.business_info.person; val.customer_name = val.business_info.contactsName;
val.updated_at = moment(val.updated_at).format('YYYY-MM-DD HH:mm:ss'); val.updated_at = moment(val.updated_at).format('YYYY-MM-DD HH:mm:ss');
val.created_at = moment(val.created_at).format('YYYY-MM-DD HH:mm:ss'); val.created_at = moment(val.created_at).format('YYYY-MM-DD HH:mm:ss');
val.schemeStatus = val["scheme.scheme_status"]; val.schemeStatus = val["scheme.scheme_status"];
......
...@@ -18,12 +18,12 @@ class BizoptService extends ServiceBase { ...@@ -18,12 +18,12 @@ class BizoptService extends ServiceBase {
id: data.id, id: data.id,
demand_code: data.demand_code, demand_code: data.demand_code,
business_type: data.business_type, business_type: data.business_type,
company_name: data.business_info.company, company_name: data.business_info.companyName,
customer_name: data.business_info.person, customer_name: data.business_info.contactsName,
customer_number: data.business_info.phone, customer_number: data.business_info.contactsPhone,
annual_report: data.business_info.annual_report || false, annual_report: data.business_info.annual_report || false,
content: data.business_info.content, content: data.business_info.memoInfo,
service_address: data.service_address, service_address: data.business_info.serviceName,
source_name: data.source_name, source_name: data.source_name,
business_status: data.business_status, business_status: data.business_status,
source_number: data.source_number, source_number: data.source_number,
...@@ -89,8 +89,8 @@ class BizoptService extends ServiceBase { ...@@ -89,8 +89,8 @@ class BizoptService extends ServiceBase {
flow_type: system.FLOWCODE.BIZ, flow_type: system.FLOWCODE.BIZ,
flow_id: pobj.bizId, flow_id: pobj.bizId,
status_code: system.BUSSTATUS.CLOSED, status_code: system.BUSSTATUS.CLOSED,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
if (schemeResult) { if (schemeResult) {
await this.schemeDao.updateByWhere({ await this.schemeDao.updateByWhere({
...@@ -102,8 +102,8 @@ class BizoptService extends ServiceBase { ...@@ -102,8 +102,8 @@ class BizoptService extends ServiceBase {
flow_type: system.FLOWCODE.SCHEME, flow_type: system.FLOWCODE.SCHEME,
flow_id: schemeResult.id, flow_id: schemeResult.id,
status_code: system.SCHEMESTATUS.CLOSED, status_code: system.SCHEMESTATUS.CLOSED,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
} }
return "success" return "success"
......
...@@ -68,8 +68,8 @@ class DeliverService extends ServiceBase { ...@@ -68,8 +68,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: pobj.deliver_id, flow_id: pobj.deliver_id,
status_code: system.SERVERSESTATUS.SUBMITING, status_code: system.SERVERSESTATUS.SUBMITING,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
} }
...@@ -125,8 +125,8 @@ class DeliverService extends ServiceBase { ...@@ -125,8 +125,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: pobj.id, flow_id: pobj.id,
status_code: status, status_code: status,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
return "success" return "success"
} }
...@@ -179,8 +179,8 @@ class DeliverService extends ServiceBase { ...@@ -179,8 +179,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: annualReportData.id, flow_id: annualReportData.id,
status_code: System.ANNUALREPORT.TAKEEFFECT, status_code: System.ANNUALREPORT.TAKEEFFECT,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
await this.annualreportDao.bulkCreate(annualReportArry, t); await this.annualreportDao.bulkCreate(annualReportArry, t);
} }
...@@ -234,8 +234,8 @@ class DeliverService extends ServiceBase { ...@@ -234,8 +234,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: pobj.id, flow_id: pobj.id,
status_code: system.SERVERSESTATUS.CLOSED, status_code: system.SERVERSESTATUS.CLOSED,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
if (annualReportData) { if (annualReportData) {
await this.dao.updateByWhere({ await this.dao.updateByWhere({
...@@ -248,8 +248,8 @@ class DeliverService extends ServiceBase { ...@@ -248,8 +248,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: annualReportData.id, flow_id: annualReportData.id,
status_code: system.SERVERSESTATUS.CLOSED, status_code: system.SERVERSESTATUS.CLOSED,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
} }
return "success" return "success"
...@@ -301,8 +301,8 @@ class DeliverService extends ServiceBase { ...@@ -301,8 +301,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: pobj.id, flow_id: pobj.id,
status_code: system.SERVERSESTATUS.POSTING, status_code: system.SERVERSESTATUS.POSTING,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
return "success" return "success"
}); });
...@@ -386,8 +386,8 @@ class DeliverService extends ServiceBase { ...@@ -386,8 +386,8 @@ class DeliverService extends ServiceBase {
flow_type: system.FLOWCODE.DELIVERY, flow_type: system.FLOWCODE.DELIVERY,
flow_id: deliverData.id, flow_id: deliverData.id,
status_code: System.ANNUALREPORT.SUCCESS, status_code: System.ANNUALREPORT.SUCCESS,
salesman_id: data.userid, salesman_id: pobj.userid,
salesman_name: data.username salesman_name: pobj.username
}); });
} }
return 'success'; return 'success';
......
...@@ -35,7 +35,7 @@ const pushScheme = async (bizData, schemeData) => { ...@@ -35,7 +35,7 @@ const pushScheme = async (bizData, schemeData) => {
let data = { let data = {
actionType: "submitSolution", actionType: "submitSolution",
actionBody: { actionBody: {
needNum: bizData.source_number, needNum: bizData.demand_code,
solutionContent: { solutionContent: {
scheme_info: schemeData.scheme_info, scheme_info: schemeData.scheme_info,
remark_info: schemeData.remark_info, remark_info: schemeData.remark_info,
...@@ -60,7 +60,7 @@ const pushCloseNeed = async (bizData, note) => { ...@@ -60,7 +60,7 @@ const pushCloseNeed = async (bizData, note) => {
let data = { let data = {
"actionType": "closeNeed", "actionType": "closeNeed",
"actionBody": { "actionBody": {
"needNum": bizData.source_number, "needNum": bizData.demand_code,
"note": note "note": note
} }
} }
...@@ -126,8 +126,12 @@ const pushDeclareReport = async (annualReport, deliverData) => { ...@@ -126,8 +126,12 @@ const pushDeclareReport = async (annualReport, deliverData) => {
* @param {*} data * @param {*} data
*/ */
const postRequest = async (url, data) => { const postRequest = async (url, data) => {
console.log("请求数据 ------- ");
console.log(data);
let result = await porApi.post(url, data); let result = await porApi.post(url, data);
result = result.data; result = result.data;
console.log("返回数据 ------- ");
console.log(result);
if (result.status === 1) { if (result.status === 1) {
return result return result
} else { } else {
......
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