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
bd8923e7
Commit
bd8923e7
authored
Jun 01, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 筛选范围补充
parent
ce4c87d3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
icp-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+6
-3
icp-deliver/app/base/db/impl/bizchance/bizoptDao.js
+17
-1
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
+3
-2
No files found.
icp-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
bd8923e7
...
@@ -19,11 +19,11 @@ class BizOptCtl extends CtlBase {
...
@@ -19,11 +19,11 @@ class BizOptCtl extends CtlBase {
val
.
customer_name
=
val
.
business_info
.
person
;
val
.
customer_name
=
val
.
business_info
.
person
;
val
.
updated_at
=
moment
(
val
.
updated_at
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
val
.
updated_at
=
moment
(
val
.
updated_at
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
val
.
created_at
=
moment
(
val
.
created_at
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
val
.
created_at
=
moment
(
val
.
created_at
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
val
.
schemeStatus
=
val
[
"scheme.status"
];
result
.
push
(
val
);
result
.
push
(
val
);
}
}
rs
.
results
.
rows
=
result
;
rs
.
results
.
rows
=
result
;
console
.
log
(
result
[
0
]);
}
}
return
system
.
getResult
(
rs
);
return
system
.
getResult
(
rs
);
}
}
...
@@ -40,8 +40,11 @@ class BizOptCtl extends CtlBase {
...
@@ -40,8 +40,11 @@ class BizOptCtl extends CtlBase {
if
(
!
pobj
.
bizId
)
{
if
(
!
pobj
.
bizId
)
{
return
system
.
getResult
(
null
,
"bizId can not be empty,100290"
);
return
system
.
getResult
(
null
,
"bizId can not be empty,100290"
);
}
}
if
(
!
pobj
.
close_reason
)
{
return
system
.
getResult
(
null
,
"close_reason can not be empty,100290"
);
}
try
{
try
{
await
this
.
service
.
closeBiz
({
bizId
:
pobj
.
bizId
});
await
this
.
service
.
closeBiz
({
bizId
:
pobj
.
bizId
,
close_reason
:
pobj
.
close_reason
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
err
)
{
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
return
system
.
getResult
(
null
,
err
.
message
)
...
...
icp-deliver/app/base/db/impl/bizchance/bizoptDao.js
View file @
bd8923e7
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
const
url
=
require
(
"url"
);
class
BizoptDao
extends
Dao
{
class
BizoptDao
extends
Dao
{
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
BizoptDao
));
super
(
Dao
.
getModelName
(
BizoptDao
));
}
}
extraWhere
(
qobj
,
qw
,
qc
)
{
extraWhere
(
qobj
,
qw
,
qc
)
{
qc
.
raw
=
true
;
qc
.
raw
=
true
;
qc
.
where
.
business_type
=
qc
.
where
.
business_type
||
{
qc
.
where
.
business_type
=
qc
.
where
.
business_type
&&
[
system
.
SERVICECODE
.
EDI
,
system
.
SERVICECODE
.
ICP
].
includes
(
qc
.
where
.
business_type
)
?
qc
.
where
.
business_type
:
{
[
this
.
db
.
Op
.
in
]:
[
system
.
SERVICECODE
.
EDI
,
system
.
SERVICECODE
.
ICP
]
[
this
.
db
.
Op
.
in
]:
[
system
.
SERVICECODE
.
EDI
,
system
.
SERVICECODE
.
ICP
]
}
}
switch
(
qobj
.
bizpath
)
{
case
"/businessManagement/wailt"
:
qc
.
where
.
business_status
=
qc
.
where
.
business_status
||
{
[
this
.
db
.
Op
.
in
]:
[
system
.
BUSSTATUS
.
WAITINGSCHEME
,
system
.
BUSSTATUS
.
WAITINGCONFIRM
]
}
break
case
"businessManagement/all"
:
break
}
qc
.
include
=
[
{
model
:
this
.
db
.
models
.
scheme
,
attributes
:
[
"status"
]
}
]
return
qw
;
return
qw
;
}
}
async
findBizAndSheme
(
id
)
{
async
findBizAndSheme
(
id
)
{
...
...
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
bd8923e7
...
@@ -77,7 +77,8 @@ class BizoptService extends ServiceBase {
...
@@ -77,7 +77,8 @@ class BizoptService extends ServiceBase {
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
await
this
.
dao
.
updateByWhere
({
await
this
.
dao
.
updateByWhere
({
business_status
:
system
.
BUSSTATUS
.
CLOSED
business_status
:
system
.
BUSSTATUS
.
CLOSED
,
close_reason
:
pobj
.
close_reason
},
{
},
{
id
:
pobj
.
bizId
id
:
pobj
.
bizId
},
t
);
},
t
);
...
@@ -87,7 +88,7 @@ class BizoptService extends ServiceBase {
...
@@ -87,7 +88,7 @@ class BizoptService extends ServiceBase {
status
:
system
.
BUSSTATUS
.
CLOSED
status
:
system
.
BUSSTATUS
.
CLOSED
});
});
if
(
schemeResult
)
{
if
(
schemeResult
)
{
await
this
.
d
ao
.
updateByWhere
({
await
this
.
schemeD
ao
.
updateByWhere
({
status
:
system
.
SCHEMESTATUS
.
CLOSED
status
:
system
.
SCHEMESTATUS
.
CLOSED
},
{
},
{
id
:
schemeResult
.
id
id
:
schemeResult
.
id
...
...
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