Commit 2d20359f by sxy

fix: 年报流程联调

parent 988e7b49
...@@ -198,8 +198,10 @@ class DeliverService extends ServiceBase { ...@@ -198,8 +198,10 @@ class DeliverService extends ServiceBase {
// 推送年报信息 // 推送年报信息
await pushTx.pushChangeOrder(pushTx.TXSTATUS.WAITDECLARE, annualReportData.delivery_code, { await pushTx.pushChangeOrder(pushTx.TXSTATUS.WAITDECLARE, annualReportData.delivery_code, {
annualReport: annualReportArry.map(item => { annualReport: annualReportArry.map(item => {
item.status = item.status === system.ANNUALREPORT.WAITDECLARE ? "待申报" : "已申报" return {
return item ...item,
status: item.status === system.ANNUALREPORT.WAITDECLARE ? "待申报" : "已申报"
}
}) })
}) })
......
...@@ -19,7 +19,7 @@ const TXSTATUS = { ...@@ -19,7 +19,7 @@ const TXSTATUS = {
} }
const porApi = axios.create({ const porApi = axios.create({
baseURL: settings.txurl(), // api 的 base_url baseURL: settings.txurl(), // api 的 base_url
timeout: 5000, // request timeout timeout: 2000, // request timeout
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
...@@ -140,16 +140,23 @@ const pushDeclareReport = async (annualReport, deliverData) => { ...@@ -140,16 +140,23 @@ const pushDeclareReport = async (annualReport, deliverData) => {
* @param {*} data * @param {*} data
*/ */
const postRequest = async (url, data) => { const postRequest = async (url, data) => {
console.log("请求数据 ------- "); try {
console.log(data); console.log("请求数据 ------- ");
let result = await porApi.post(url, data); console.log(data);
result = result.data; console.log(JSON.stringify(data.actionBody.deliverContent));
console.log("返回数据 ------- "); let result = await porApi.post(url, data);
console.log(result); result = result.data;
if (result.status === 1) { console.log("返回数据 ------- ");
return result console.log(result);
} else { if (result.status === 1) {
throw new Error(result.message) return result
} else {
throw new Error(result.message)
}
} catch (err) {
console.log("------ err -----");
console.log(err)
throw (err)
} }
} }
......
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