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
40ffc754
Commit
40ffc754
authored
Jun 13, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 排序顺序
parent
4acfb3ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
13 deletions
+31
-13
icp-deliver/app/base/db/impl/bizchance/bizoptDao.js
+3
-0
icp-deliver/app/base/db/impl/delivery/deliverDao.js
+4
-1
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
+2
-2
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+22
-10
No files found.
icp-deliver/app/base/db/impl/bizchance/bizoptDao.js
View file @
40ffc754
...
...
@@ -5,6 +5,9 @@ class BizoptDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
BizoptDao
));
}
orderBy
()
{
return
[[
"updated_at"
,
"DESC"
]];
}
extraWhere
(
qobj
,
qw
,
qc
)
{
qc
.
raw
=
true
;
qc
.
where
.
business_type
=
qc
.
where
.
business_type
&&
[
system
.
SERVICECODE
.
EDI
,
system
.
SERVICECODE
.
ICP
].
includes
(
qc
.
where
.
business_type
)
?
qc
.
where
.
business_type
:
{
...
...
icp-deliver/app/base/db/impl/delivery/deliverDao.js
View file @
40ffc754
...
...
@@ -5,6 +5,9 @@ class DeliverDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
DeliverDao
));
}
orderBy
()
{
return
[[
"updated_at"
,
"DESC"
]];
}
extraWhere
(
qobj
,
qw
,
qc
)
{
qc
.
raw
=
true
;
qc
.
where
.
product_code
=
qc
.
where
.
product_code
&&
[
system
.
SERVICECODE
.
EDI
,
system
.
SERVICECODE
.
ICP
].
includes
(
qc
.
where
.
product_code
)
?
qc
.
where
.
product_code
:
{
...
...
@@ -15,7 +18,7 @@ class DeliverDao extends Dao {
case
"/deliveryManagement/wait"
:
qc
.
where
.
delivery_status
=
qc
.
where
.
delivery_status
||
{
[
this
.
db
.
Op
.
in
]:
[
system
.
SERVERSESTATUS
.
RECEIVED
,
system
.
SERVERSESTATUS
.
COLLECTING
,
system
.
SERVERSESTATUS
.
SUBMITING
,
system
.
SERVERSESTATUS
.
DISPOSEING
system
.
SERVERSESTATUS
.
SUBMITING
,
system
.
SERVERSESTATUS
.
DISPOSEING
,
system
.
SERVERSESTATUS
.
POSTING
]
}
break
...
...
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
40ffc754
...
...
@@ -85,7 +85,7 @@ class BizoptService extends ServiceBase {
flow_type
:
system
.
FLOWCODE
.
BIZ
,
flow_id
:
pobj
.
bizId
,
status_code
:
system
.
BUSSTATUS
.
CLOSED
}
,
t
);
});
if
(
schemeResult
)
{
await
this
.
schemeDao
.
updateByWhere
({
scheme_status
:
system
.
SCHEMESTATUS
.
CLOSED
...
...
@@ -96,7 +96,7 @@ class BizoptService extends ServiceBase {
flow_type
:
system
.
FLOWCODE
.
SCHEME
,
flow_id
:
schemeResult
.
id
,
status_code
:
system
.
SCHEMESTATUS
.
CLOSED
}
,
t
);
});
}
return
"success"
})
...
...
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
40ffc754
...
...
@@ -59,7 +59,7 @@ class DeliverService extends ServiceBase {
flow_type
:
system
.
FLOWCODE
.
DELIVERY
,
flow_id
:
pobj
.
deliver_id
,
status_code
:
system
.
SERVERSESTATUS
.
SUBMITING
}
,
t
);
});
}
return
"SUCCESS"
...
...
@@ -151,32 +151,44 @@ class DeliverService extends ServiceBase {
}
async
addMail
(
pobj
)
{
/**
* 判断状态
* 保存 邮寄信息
* 更改流转状态
*/
let
result
=
await
this
.
dao
.
findInfo
(
pobj
);
if
(
!
result
)
{
throw
new
Error
(
"交付单不可查看"
);
}
if
(
result
.
qualification
)
{
if
(
!
result
.
qualification
)
{
throw
new
Error
(
"请先上传资质信息"
);
}
if
(
result
.
delivery_status
!==
system
.
SERVERSESTATUS
.
DISPOSEING
)
{
throw
new
Error
(
"该状态下不可填写邮寄信息"
);
}
const
{
material
:
{
proposerInfo
}
}
=
result
;
const
{
material
}
=
result
;
let
{
proposerInfo
}
=
material
proposerInfo
.
recipientInfo
=
pobj
.
recipientInfo
;
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
await
this
.
materialDao
.
updateByWhere
({
proposerInfo
},
{
id
:
material
.
id
},
t
)
},
t
)
;
});
/**
* 保存 邮寄信息
* 更改流转状态
*/
await
this
.
dao
.
updateByWhere
({
delivery_status
:
system
.
SERVERSESTATUS
.
POSTING
,
},
{
id
:
pobj
.
id
},
t
);
this
.
statuslogDao
.
create
({
flow_type
:
system
.
FLOWCODE
.
DELIVERY
,
flow_id
:
pobj
.
id
,
status_code
:
system
.
SERVERSESTATUS
.
POSTING
});
return
"success"
});
}
}
...
...
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