Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
43309873
Commit
43309873
authored
Aug 29, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
a404733a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
31 deletions
+112
-31
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+1
-0
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+56
-31
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
+7
-0
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
+48
-0
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
43309873
...
...
@@ -91,6 +91,7 @@ class BizOptCtl extends CtlBase {
}
*/
async
distribution
(
mobj
,
qobj
,
req
)
{
console
.
log
(
"bizoptCtl/distribution分配需求"
);
let
pobj
=
mobj
.
d
;
let
obj
=
{
numbers
:
pobj
.
demand_code_list
,
...
...
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
43309873
...
...
@@ -366,47 +366,72 @@ class DeliverybillCtl extends CtlBase {
//接收票据快递单号
async
receivePaperPost
(
pobj
,
qobj
,
req
)
{
var
param
=
{
companyId
:
""
,
//租户信息
customerName
:
""
,
//客户信息(帐套)
sign
:
""
,
//签名
postWay
:
"2"
,
currentPeriod
:
pobj
.
actionBody
.
accountDate
,
courierNumber
:
pobj
.
actionBody
.
expressNum
var
deliverInfo
=
await
this
.
service
.
getInfo
({
"bizId"
:
pobj
.
bizNo
});
if
(
deliverInfo
)
{
var
param
=
{
companyId
:
deliverInfo
.
deliveryBillInfo
.
deliveryInfo
.
setupInfo
.
supplier
,
//租户信息
customerName
:
deliverInfo
.
deliveryBillInfo
.
vftClientId
,
//客户信息(帐套)
sign
:
""
,
//签名
postWay
:
"2"
,
currentPeriod
:
pobj
.
actionBody
.
accountDate
,
courierNumber
:
pobj
.
actionBody
.
expressNum
}
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
){
return
system
.
getResult
(
result
);
}
else
{
return
system
.
getResultError
(
"接收票据快递单号错误!"
);
}
}
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
);
return
result
;
else
{
return
system
.
getResultError
(
"没有交付单信息"
);
}
}
//票据快递情况反馈
async
confirmPaperPost
(
pobj
,
qobj
,
req
)
{
var
param
=
{
bizNo
:
pobj
.
customer_id
,
//需要根据客户id获取服务示例号
accountDate
:
pobj
.
current_period
,
status
:
pobj
.
status
,
errorStatus
:
-
1
}
if
(
pobj
.
remark
)
{
param
.
remark
=
pobj
.
remark
;
if
(
pobj
.
remark
.
includes
(
"进销项发票不全"
))
{
param
.
errorStatus
=
1
;
var
deliverInfo
=
await
this
.
service
.
findByClientId
({
"vftClientId"
:
pobj
.
customer_id
});
if
(
deliverInfo
)
{
var
param
=
{
bizNo
:
pobj
.
customer_id
,
//需要根据客户id获取服务示例号
accountDate
:
pobj
.
current_period
,
status
:
pobj
.
status
,
errorStatus
:
-
1
}
if
(
pobj
.
remark
)
{
param
.
remark
=
pobj
.
remark
;
if
(
pobj
.
remark
.
includes
(
"进销项发票不全"
))
{
param
.
errorStatus
=
1
;
}
}
var
pushObj
=
{
pushUrl
:
this
.
rysUrl
+
"service/paperPost/confirm"
,
actionType
:
"confirm"
,
messageBody
:
param
,
headData
:
{
'Source'
:
'GSB'
},
requestId
:
uuidv4
()
}
return
system
.
queueOper
(
pushObj
);
}
var
pushObj
=
{
pushUrl
:
this
.
rysUrl
+
"service/paperPost/confirm"
,
actionType
:
"confirm"
,
messageBody
:
param
,
headData
:
{
'Source'
:
'GSB'
},
requestId
:
uuidv4
()
else
{
return
system
.
getResultError
(
"没有交付单信息"
);
}
return
system
.
queueOper
(
pushObj
);
}
}
}
...
...
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
43309873
...
...
@@ -152,5 +152,12 @@ class DeliverybillDao extends Dao {
var
oid
=
pobj
.
bizId
;
return
await
this
.
findOne
({
biz_id
:
oid
});
}
/**
* 根据客户ID(帐套)查找服务所有信息
*/
async
findByClientId
(
pobj
)
{
var
oid
=
pobj
.
vftClientId
;
return
await
this
.
findOne
({
v_ftClientId
:
oid
});
}
}
module
.
exports
=
DeliverybillDao
;
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
View file @
43309873
...
...
@@ -289,6 +289,54 @@ class DeliverybillService extends ServiceBase {
salesmanName
:
deliveryBillInfo
.
salesman_name
,
//业务员名称
salesmanPhone
:
deliveryBillInfo
.
salesman_phone
,
//业务员联系方式
sourceName
:
deliveryBillInfo
.
source_name
,
//渠道名称
vftClientId
:
deliveryBillInfo
.
v_ftClientId
,
// 客户ID(帐套)
createdAt
:
deliveryBillInfo
.
created_at
,
//创建时间
updatedAt
:
deliveryBillInfo
.
updated_at
,
//更新时间
version
:
deliveryBillInfo
.
version
,
//o
masterSourceNumber
:
deliveryBillInfo
.
master_source_number
,
//主来源单
settleStatus
:
deliveryBillInfo
.
settle_status
,
//结算状态
settlebillId
:
deliveryBillInfo
.
settlebill_id
,
//结算单id
deliveryManId
:
deliveryBillInfo
.
delivery_man_id
,
//销售员id
deliveryManName
:
deliveryBillInfo
.
delivery_man_name
,
//销售员姓名
deliveryManOpcode
:
deliveryBillInfo
.
delivery_man_opcode
,
//销售员opcode
bizId
:
pobj
.
bizId
//融易算-服务实例id
}
return
result
;
}
//根据客户ID(帐套)查询deliverybill表中的所有信息
async
getInfobyClientId
(
pobj
){
let
result
=
{};
let
deliveryBillInfo
=
await
this
.
dao
.
findByClientId
(
pobj
);
// console.log("gggg"+deliveryBillInfo+pobj.bizId)
if
(
!
deliveryBillInfo
)
{
throw
new
Error
(
"没有服务信息"
);
}
//封装deliverybill表数据
result
.
deliveryBillInfo
=
{
deliveryCode
:
deliveryBillInfo
.
delivery_code
,
//交付单编号
sourceNumber
:
deliveryBillInfo
.
source_number
,
//渠道来源编号
demandCode
:
deliveryBillInfo
.
demand_code
,
//商机编号
skuCode
:
deliveryBillInfo
.
sku_code
,
//sku编号
schemeNumber
:
deliveryBillInfo
.
scheme_number
,
//方案编号
productCode
:
deliveryBillInfo
.
product_code
,
//产品编码
productName
:
deliveryBillInfo
.
product_name
,
//产品名称
serviceAddress
:
deliveryBillInfo
.
service_address
,
//服务地区
deliveryInfo
:
deliveryBillInfo
.
delivery_info
,
//交付单详情
payStatus
:
deliveryBillInfo
.
pay_status
,
//交付状态-虚拟字段
vConame
:
deliveryBillInfo
.
v_coname
,
//联系人-虚拟字段
vCophone
:
deliveryBillInfo
.
v_cophone
,
//联系电话-虚拟字段
delivery_status
:
deliveryBillInfo
.
delivery_status
,
//交付单状态
sellingPrice
:
deliveryBillInfo
.
selling_price
,
//交付单价格
costPrice
:
deliveryBillInfo
.
cost_price
,
//成本价
closeReason
:
deliveryBillInfo
.
close_reason
,
//状态为关闭原因
facilitatorId
:
deliveryBillInfo
.
facilitator_id
,
//服务商id
facilitatorName
:
deliveryBillInfo
.
facilitator_name
,
//服务商名称
salesmanOpcode
:
deliveryBillInfo
.
salesman_opcode
,
//业务员opcode
salesmanId
:
deliveryBillInfo
.
salesman_id
,
//业务员id
salesmanName
:
deliveryBillInfo
.
salesman_name
,
//业务员名称
salesmanPhone
:
deliveryBillInfo
.
salesman_phone
,
//业务员联系方式
sourceName
:
deliveryBillInfo
.
source_name
,
//渠道名称
vftClientId
:
deliveryBillInfo
.
v_ftClientId
,
// 客户ID(帐套)
createdAt
:
deliveryBillInfo
.
created_at
,
//创建时间
updatedAt
:
deliveryBillInfo
.
updated_at
,
//更新时间
version
:
deliveryBillInfo
.
version
,
//o
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment