Commit 14380565 by Sxy

fix: bug

parent e3f57094
......@@ -44,6 +44,7 @@ class DeliverybillCtl extends CtlBase {
setupStatus: delivery_info.setupStatus || System.SERVERSESTATUS.NOTSETUP,//建账状态 notsetup | setup
createdAt: created_at,
updatedAt: updated_at,
setupAt: delivery_info.serviceStartTime || (delivery_info.setupInfo && delivery_info.setupInfo.time) || delivery_info.setupAt || null
});
}
rs.results.rows = result;
......@@ -376,24 +377,24 @@ class DeliverybillCtl extends CtlBase {
currentPeriod: pobj.actionBody.accountDate,
courierNumber: pobj.actionBody.expressNum
}
param.sign = await toFtClient.postToFtBySign("/customerReceiveBill/addCusReceiveBill",param.companyId);
param.sign = await toFtClient.postToFtBySign("/customerReceiveBill/addCusReceiveBill", param.companyId);
var rc = this.getObject("util.execClient");
var reqUrl = settings.ftConfig.url + "/customerReceiveBill/addCusReceiveBill";
var result = await rc.execPost(param, reqUrl);
var j = JSON.parse(result.stdout);
if (j.status == 1){
if (j.status == 1) {
return system.getResult(result);
}
else{
else {
return system.getResultError("接收票据快递单号错误!");
}
}
else{
else {
return system.getResultError("没有交付单信息");
}
}
......@@ -424,11 +425,11 @@ class DeliverybillCtl extends CtlBase {
}
return system.queueOper(pushObj);
}
else{
else {
return system.getResultError("没有交付单信息");
}
}
}
module.exports = DeliverybillCtl;
\ No newline at end of file
......@@ -44,7 +44,7 @@ class DeliverybillDao extends Dao {
filters.push({
delivery_status: {
$in: [
system.SERVERSESTATUS.INSERVICE, system.SERVERSESTATUS.CLOSED
system.SERVERSESTATUS.INSERVICE, system.SERVERSESTATUS.CLOSED, system.SERVERSESTATUS.SUCCESS
]
}
});
......@@ -53,7 +53,7 @@ class DeliverybillDao extends Dao {
filters.push({
delivery_status: {
$in: [
system.SERVERSESTATUS.RECEIVED, system.SERVERSESTATUS.WAITUSERCONFIRM,system.SERVERSESTATUS.INSERVICE
system.SERVERSESTATUS.RECEIVED, system.SERVERSESTATUS.WAITUSERCONFIRM, system.SERVERSESTATUS.INSERVICE
]
}
});
......
......@@ -108,7 +108,6 @@ class DeliverybillService extends ServiceBase {
companyName: deliverData.delivery_info.companyName,// 企业名称
uscc: deliverData.delivery_info.creditCode, //统一信用代码
taxpayerType: deliverData.delivery_info.taxpayerType, //纳税人类型 1 一般;2 小规模
//会计准侧
companyBizType: deliverData.delivery_info.companyBizType,// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他
areaType: deliverData.delivery_info.areaType, //区域类型 city-城市
area: deliverData.service_address, // 服务 地区 编码
......@@ -119,6 +118,7 @@ class DeliverybillService extends ServiceBase {
setupStatus: deliverData.delivery_info.setupStatus || System.SERVERSESTATUS.NOTSETUP,//建账状态 notsetup | setup
createdAt: deliverData.created_at,
updatedAt: deliverData.updated_at,
accountingType: (deliverData.delivery_info.setupInfo && deliverData.delivery_info.setupInfo.accountingType) || null //会计准侧
}
if (deliverData.scheme_number) {
let schemeData = await this.fitaxschemeDao.findOne({
......@@ -313,7 +313,7 @@ class DeliverybillService extends ServiceBase {
return result;
}
//根据客户ID(帐套)查询deliverybill表中的所有信息
async getInfobyClientId(pobj){
async getInfobyClientId(pobj) {
let result = {};
let deliveryBillInfo = await this.dao.findByClientId(pobj);
// console.log("gggg"+deliveryBillInfo+pobj.bizId)
......
......@@ -462,6 +462,7 @@ System.SERVERSESTATUS = {
WAITUSERCONFIRM: "waituserconfirm",//待用户确认
INSERVICE: "inservice",//服务中
CLOSED: "closed",//已关闭 、已终止
SUCCESS: "success",//服务已完成
NOTSETUP: "notsetup",//未建账
SETUP: "setup"//建账
}
......
......@@ -103,7 +103,7 @@ const addCusAccApplyInfo = async (deliverData, pobj) => {
}
let reqData = {
accountStandard: accountStandard[pobj.accountingType],
applyDate: pobj.time,
applyDate: moment(pobj.time).format('YYYY-MM-DD'),
contact: deliverData.delivery_info.contactsName,
creditCode: deliverData.delivery_info.creditCode,
customerName: deliverData.delivery_info.companyName,
......
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