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
95980f00
Commit
95980f00
authored
Aug 21, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax
parents
7e12d33d
ec700c4c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
105 deletions
+107
-105
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
+2
-1
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
+105
-104
No files found.
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
95980f00
...
@@ -62,7 +62,8 @@ class DeliverybillDao extends Dao {
...
@@ -62,7 +62,8 @@ class DeliverybillDao extends Dao {
/**
/**
* 筛选 条件 TODO: 筛选功能字段(filter)
* 筛选 条件 TODO: 筛选功能字段
* company_name、v_coname、v_cophone
*/
*/
qc
.
where
[
"$and"
]
=
filters
;
qc
.
where
[
"$and"
]
=
filters
;
return
qw
;
return
qw
;
...
...
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
View file @
95980f00
...
@@ -128,110 +128,111 @@ class DeliverybillService extends ServiceBase {
...
@@ -128,110 +128,111 @@ class DeliverybillService extends ServiceBase {
}
}
async
distributionPerson
(
pobj
)
{
async
distributionPerson
(
pobj
)
{
// let { numbers, nickName, userId, opCode, phone, type } = pobj;
let
{
numbers
,
nickName
,
userId
,
opCode
,
phone
,
type
}
=
pobj
;
// switch (type) {
switch
(
type
)
{
// case System.FLOWCODE.DELIVERY:
case
System
.
FLOWCODE
.
DELIVERY
:
// let datas = await this.dao.findAll({
let
bizDatas
=
await
this
.
dao
.
findAll
({
// delivery_code: {
delivery_code
:
{
// $in: numbers
$in
:
numbers
// }
}
// });
});
// if (datas.length !== numbers.length) {
if
(
bizDatas
.
length
!==
numbers
.
length
)
{
// throw new Error("请检查单号是否正确");
throw
new
Error
(
"请检查单号是否正确"
);
// }
}
// await this.dao.updateByWhere({
await
this
.
dao
.
updateByWhere
({
// salesman_id: userId,
salesman_id
:
userId
,
// salesman_opcode: opCode,
salesman_opcode
:
opCode
,
// salesman_phone: phone,
salesman_phone
:
phone
,
// salesman_name: nickName
salesman_name
:
nickName
// }, {
},
{
// delivery_code: {
delivery_code
:
{
// $in: numbers
$in
:
numbers
// }
}
// });
});
// // 插入 流转 记录
// 插入 流转 记录
// let logs = [];
let
logs
=
[];
// for (let val of datas) {
for
(
let
val
of
bizDatas
)
{
// logs.push({
logs
.
push
({
// demand_code: val.delivery_code,
demand_code
:
val
.
delivery_code
,
// operator: {
operator
:
{
// id: pobj.userid,
id
:
pobj
.
userid
,
// username: pobj.username
username
:
pobj
.
username
// },
},
// operation_type: "distribution",
operation_type
:
"distribution"
,
// operation_details: {
operation_details
:
{
// isFirst: val.salesman_id ? true : false,
isFirst
:
val
.
salesman_id
?
true
:
false
,
// fromUserId: val.salesman_id,
fromUserId
:
val
.
salesman_id
,
// fromUserName: val.salesman_name,
fromUserName
:
val
.
salesman_name
,
// toUserId: userId,
toUserId
:
userId
,
// toUserName: nickName
toUserName
:
nickName
// },
},
// order_type: System.FLOWCODE.DELIVERY
order_type
:
System
.
FLOWCODE
.
DELIVERY
// })
})
// }
}
// this.operationrecordDao.bulkCreate(logs);
this
.
operationrecordDao
.
bulkCreate
(
logs
);
// break
break
// case System.FLOWCODE.BIZ:
case
System
.
FLOWCODE
.
BIZ
:
// let datas = await this.bizoptDao.findAll({
let
delDatas
=
await
this
.
bizoptDao
.
findAll
({
// demand_code: {
demand_code
:
{
// $in: numbers
$in
:
numbers
// }
}
// });
});
// if (datas.length !== datas.length) {
if
(
delDatas
.
length
!==
numbers
.
length
)
{
// throw new Error("请检查单号是否正确");
throw
new
Error
(
"请检查单号是否正确"
);
// }
}
// return this.db.transaction(async (t) => {
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
// // 更新 操作人
// 更新 操作人
// await this.bizoptDao.updateByWhere({
await
this
.
bizoptDao
.
updateByWhere
({
// salesman_id: userId,
salesman_id
:
userId
,
// salesman_opcode: opCode,
salesman_opcode
:
opCode
,
// salesman_phone: phone,
salesman_phone
:
phone
,
// salesman_name: nickName
salesman_name
:
nickName
// }, {
},
{
// demand_code: {
demand_code
:
{
// $in: numbers
$in
:
numbers
// }
}
// }, t);
},
t
);
// // 更新 状态
// 更新 状态
// await this.bizoptDao.updateByWhere({
await
this
.
bizoptDao
.
updateByWhere
({
// business_status: "beforeFollowUp"
business_status
:
"beforeFollowUp"
// }, {
},
{
// $and: [
$and
:
[
// {
{
// demand_code: {
demand_code
:
{
// $in: numbers
$in
:
numbers
// }
}
// }, {
},
{
// business_status: "received"
business_status
:
"received"
// }
}
// ]
]
// }, t);
},
t
);
// // 插入 流转 记录
// 插入 流转 记录
// let logs = [];
let
logs
=
[];
// for (let val of datas) {
for
(
let
val
of
delDatas
)
{
// logs.push({
logs
.
push
({
// demand_code: val.demand_code,
demand_code
:
val
.
demand_code
,
// operator: {
operator
:
{
// id: pobj.userid,
id
:
pobj
.
userid
,
// username: pobj.username
username
:
pobj
.
username
// },
},
// operation_type: "distribution",
operation_type
:
"distribution"
,
// operation_details: {
operation_details
:
{
// isFirst: val.salesman_id ? true : false,
isFirst
:
val
.
salesman_id
?
true
:
false
,
// fromUserId: val.salesman_id,
fromUserId
:
val
.
salesman_id
,
// fromUserName: val.salesman_name,
fromUserName
:
val
.
salesman_name
,
// toUserId: userId,
toUserId
:
userId
,
// toUserName: nickName
toUserName
:
nickName
// },
},
// order_type: System.FLOWCODE.BIZ
order_type
:
System
.
FLOWCODE
.
BIZ
// })
})
// }
}
// this.operationrecordDao.bulkCreate(logs);
this
.
operationrecordDao
.
bulkCreate
(
logs
);
// return "success"
return
"success"
// });
});
// break
break
// }
}
// return "SUCCESS"
return
"SUCCESS"
}
}
async
insertInfo
(
qobj
)
{
async
insertInfo
(
qobj
)
{
...
...
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