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
47ecc6d8
Commit
47ecc6d8
authored
Nov 05, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 360,百度接入
parent
f49a324e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
27 deletions
+45
-27
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
+21
-0
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+9
-9
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
+14
-17
ic-deliver/app/config/settings.js
+1
-1
No files found.
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
47ecc6d8
...
...
@@ -745,6 +745,27 @@ class DeliverybillCtl extends CtlBase {
}
}
async
createOrderByPush
(
pobj
)
{
let
data
=
pobj
.
d
;
try
{
if
(
!
data
.
deliverNumber
)
{
throw
new
Error
(
"参数错误"
)
}
let
res
=
await
this
.
service
.
findInfoByDeliverCode
(
data
);
if
(
res
)
{
return
system
.
getResult
(
"已存在"
);
}
else
{
await
this
.
service
.
insertInfo
(
data
);
return
system
.
getResult
(
"SUCCESS"
);
}
}
catch
(
err
)
{
console
.
log
(
err
)
return
system
.
getResult
(
null
,
err
.
message
)
}
}
/*根据商机编号插入交付单信息*/
async
insertInfo
(
nobj
,
qobj
,
req
)
{
//队列的时候用
var
pobj
=
nobj
.
d
;
...
...
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
47ecc6d8
...
...
@@ -4,7 +4,7 @@ class DeliverybillDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
DeliverybillDao
));
}
convertAggResult
(
aggresult
)
{
convertAggResult
(
aggresult
)
{
if
(
aggresult
)
{
Object
.
keys
(
aggresult
).
forEach
((
k
)
=>
{
if
(
k
.
indexOf
(
"sum"
)
>=
0
)
{
...
...
@@ -14,10 +14,10 @@ class DeliverybillDao extends Dao {
}
return
aggresult
}
extraModelFilter
(
pobj
)
{
extraModelFilter
(
pobj
)
{
return
{
"key"
:
"include"
,
"value"
:
{
model
:
this
.
db
.
models
.
settlebill
,
raw
:
true
,
attributes
:
[
'memo'
]
}
};
}
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
//qc.raw = true;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qw
[
"delivery_status"
]
==
"handling"
)
{
//解决首页多状态查询
...
...
@@ -62,13 +62,13 @@ class DeliverybillDao extends Dao {
}
/*根据交付单编号获取订单详情*/
async
findInfoByDeliverCode
(
qobj
)
{
async
findInfoByDeliverCode
(
qobj
)
{
var
qcwhere
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
return
await
this
.
findOne
(
qcwhere
);
}
/*根据交付单编号更新状态信息*/
async
updateStatusByDeliverCode
(
qobj
,
t
)
{
async
updateStatusByDeliverCode
(
qobj
,
t
)
{
var
setobj
=
{
"delivery_status"
:
qobj
.
deliverStatus
};
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
setobj
.
close_reason
=
qobj
.
statusReason
;
...
...
@@ -94,7 +94,7 @@ class DeliverybillDao extends Dao {
}
/*更新业务员/交付员信息*/
async
updateSalesmanInfoByDeliverCode
(
qobj
,
t
)
{
async
updateSalesmanInfoByDeliverCode
(
qobj
,
t
)
{
var
setobj
=
{};
if
(
qobj
.
type
==
"salesman"
)
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
...
...
@@ -132,7 +132,7 @@ class DeliverybillDao extends Dao {
}
/*根据交付单更新交付材料信息*/
async
updateInfoByDeliverCode
(
qobj
,
t
)
{
//公司注册、云上园区注册时填写交付材料
async
updateInfoByDeliverCode
(
qobj
,
t
)
{
//公司注册、云上园区注册时填写交付材料
var
whereobj
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
var
setobj
=
{
"delivery_info"
:
qobj
.
baseInfo
};
if
(
qobj
.
deliverStatus
&&
qobj
.
deliverStatus
!=
'undefined'
)
{
...
...
@@ -148,7 +148,7 @@ class DeliverybillDao extends Dao {
}
/*插入交付单信息*/
async
insertInfo
(
qobj
,
t
)
{
//到时候看交付单信息后再确定
async
insertInfo
(
qobj
)
{
//到时候看交付单信息后再确定
var
obj
=
{
"delivery_code"
:
qobj
.
deliverNumber
,
"delivery_status"
:
qobj
.
deliverStatus
,
...
...
@@ -221,7 +221,7 @@ class DeliverybillDao extends Dao {
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
statusReason
;
}
return
await
this
.
create
(
obj
,
t
);
return
await
this
.
create
(
obj
);
}
...
...
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
View file @
47ecc6d8
...
...
@@ -10,7 +10,7 @@ class DeliverybillService extends ServiceBase {
this
.
cacheDao
=
system
.
getObject
(
"db.bizchance.cacheinfoDao"
);
}
async
updateCostBySkuCode
()
{
async
updateCostBySkuCode
()
{
let
bills
=
await
this
.
dao
.
model
.
findAll
()
bills
.
forEach
(
async
b
=>
{
//远程调用去查询成本按照skucode
...
...
@@ -26,7 +26,7 @@ class DeliverybillService extends ServiceBase {
return
"ok"
}
async
statBizDeliverySettleAmountBySp
(
settleStatus
)
{
async
statBizDeliverySettleAmountBySp
(
settleStatus
)
{
let
params
=
{}
let
where
=
settleStatus
!=
""
?
`where settle_status='
${
settleStatus
}
'`
:
''
...
...
@@ -42,7 +42,7 @@ class DeliverybillService extends ServiceBase {
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
return
s
}
async
statBizDeliveryCountBySp
(
deliverStatus
,
betweenTime
)
{
async
statBizDeliveryCountBySp
(
deliverStatus
,
betweenTime
)
{
let
params
=
{}
let
where
=
deliverStatus
!=
""
?
`where delivery_status='
${
deliverStatus
}
'`
:
''
if
(
deliverStatus
==
"handling"
)
{
...
...
@@ -63,7 +63,7 @@ class DeliverybillService extends ServiceBase {
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
return
s
}
async
statBizDelivery
(
companyId
,
opath
,
username
,
userid
,
betweenTime
)
{
async
statBizDelivery
(
companyId
,
opath
,
username
,
userid
,
betweenTime
)
{
// 时间 筛选
let
andWhere
=
[];
if
(
betweenTime
.
length
>
0
)
{
...
...
@@ -141,7 +141,7 @@ class DeliverybillService extends ServiceBase {
}
//为租户自己给交付打标记,表示中台已经给予结算,自己记账用
//租户自己临时记录结算情况
async
settleApplyForTacent
(
ids
,
uid
,
uname
,
spname
,
spid
)
{
async
settleApplyForTacent
(
ids
,
uid
,
uname
,
spname
,
spid
)
{
var
self
=
this
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//先按照ids查询出交付单的合计服务成本
...
...
@@ -177,7 +177,7 @@ class DeliverybillService extends ServiceBase {
});
}
async
settleApply
(
ids
,
uid
,
uname
,
spname
,
spid
)
{
async
settleApply
(
ids
,
uid
,
uname
,
spname
,
spid
)
{
var
self
=
this
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//先按照ids查询出交付单的合计服务成本
...
...
@@ -206,30 +206,30 @@ class DeliverybillService extends ServiceBase {
return
newentity
});
}
async
findAndCountAll
(
obj
)
{
async
findAndCountAll
(
obj
)
{
var
self
=
this
;
const
apps
=
await
self
.
dao
.
findAndCountAll
(
obj
);
return
apps
;
}
async
findInfoByDeliverCode
(
qobj
)
{
//*根据交付单编号获取交付单详情*/
async
findInfoByDeliverCode
(
qobj
)
{
//*根据交付单编号获取交付单详情*/
return
await
this
.
dao
.
findInfoByDeliverCode
(
qobj
);
}
async
updateStatusByDeliverCode
(
qobj
)
{
//* 根据交付单编号更新交付单状态 */
async
updateStatusByDeliverCode
(
qobj
)
{
//* 根据交付单编号更新交付单状态 */
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateStatusByDeliverCode
(
qobj
,
t
);
});
}
/*更新业务员/交付员信息*/
async
updateSalesmanInfoByDeliverCode
(
qobj
)
{
async
updateSalesmanInfoByDeliverCode
(
qobj
)
{
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSalesmanInfoByDeliverCode
(
qobj
,
t
);
});
}
async
updateInfoByDeliverCode
(
qobj
)
{
//*更新交付单信息 */
async
updateInfoByDeliverCode
(
qobj
)
{
//*更新交付单信息 */
console
.
log
(
"--------------------------------------------------------------------------------------------------------------------------------------"
);
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
...
...
@@ -237,14 +237,11 @@ class DeliverybillService extends ServiceBase {
});
}
async
insertInfo
(
qobj
)
{
//*插入交付单信息*/从队列取数据的时候用
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
async
insertInfo
(
qobj
)
{
//*插入交付单信息*/从队列取数据的时候用
return
await
this
.
dao
.
insertInfo
(
qobj
);
}
async
insertInfoall
(
pobj
)
{
//*插入交付单信息,大事务*/从队列取数据的时候用
async
insertInfoall
(
pobj
)
{
//*插入交付单信息,大事务*/从队列取数据的时候用
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
res
=
await
self
.
dao
.
insertInfo
(
pobj
);
//插入交付单列表
...
...
ic-deliver/app/config/settings.js
View file @
47ecc6d8
...
...
@@ -54,7 +54,7 @@ var settings = {
},
logUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://
43.247.184.94:7200
/api/queueAction/producer/springBoard"
;
return
"http://
192.168.18.101:4019
/api/queueAction/producer/springBoard"
;
}
else
{
return
"http://logs-sytxpublic-msgq-service.chaolai/api/queueAction/producer/springBoard"
;
}
...
...
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