Commit fb73aa6e by 王勇飞

gyq

parent 74a8c79f
......@@ -93,6 +93,7 @@ class DeliverybillCtl extends CtlBase {
* @param {*} req
*/
async setupBill(pobj, qobj, req) {
console.log("deliveryCtl:setupBill:pobj--------------------------------"+JSON.stringify(pobj));
try {
if (!pobj.deliverId) {
throw new Error("deliverId 不能为空");
......@@ -101,8 +102,10 @@ class DeliverybillCtl extends CtlBase {
throw new Error("参数不能为空");
}
const rs = await this.service.setupBill(pobj);
console.log("deliveryCtl:setupBill:rs--------------------------------"+JSON.stringify(rs));
return system.getResult(rs);
} catch (err) {
console.log("deliveryCtl:setupBill:err--------------------------------"+err);
return system.getResult(null, err.message)
}
}
......
......@@ -29,6 +29,7 @@ class DeliverybillService extends ServiceBase {
if (!deliverData.delivery_info.companyName) {
throw new Error("查不到对应公司名称");
}
let updateResult = {};
let { delivery_info } = deliverData;
if (pobj.orderStaus === true) {
......@@ -75,6 +76,8 @@ class DeliverybillService extends ServiceBase {
}
async setupBill(pobj) {
try {
console.log("deliverySve:setupBill:pobj----------------------------------------",JSON.stringify(pobj));
let deliverData = await this.dao.findOne({
id: pobj.deliverId
});
......@@ -104,8 +107,16 @@ class DeliverybillService extends ServiceBase {
}, {
id: pobj.deliverId
});
console.log("deliverySve:setupBill:SUCCESS----------------------------------------SUCCESS");
return "SUCCESS"
}
catch(error)
{
console.log("deliverySve:setupBill:error----------------------------------------"+error);
return error;
}
}
async deliverInfo(pobj) {
let result = {};
......
......@@ -59,7 +59,9 @@ const postToFtBySign = async (url, data, headers = {}) => {
let tenantInfo = await getChannelCompany(data.companyId);
data.companyId = tenantInfo.id;
let sign = system.signValid(data, tenantInfo.signSecret);
return postRequest(`${ftConfig.url}${url}`, { ...data, sign }, headers = {})
var res = postRequest(`${ftConfig.url}${url}`, { ...data, sign }, headers = {});
console.log("postToFtBySign:res--------------------------------------" + JSON.stringify(res));
return res;
}
/**
......
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