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
0dd1f60c
Commit
0dd1f60c
authored
Dec 28, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laolan
parent
e0390119
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
center-order/app/base/service/impl/qcutils/regCenterOrderSve.js
+24
-18
No files found.
center-order/app/base/service/impl/qcutils/regCenterOrderSve.js
View file @
0dd1f60c
...
@@ -813,6 +813,7 @@ class RegCenterOrderService{
...
@@ -813,6 +813,7 @@ class RegCenterOrderService{
console
.
log
(
"regNeedClose+++"
,
pobj
)
console
.
log
(
"regNeedClose+++"
,
pobj
)
var
ab
=
pobj
.
actionBody
;
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
app
=
pobj
.
appInfo
;
var
uappId
;
if
(
!
app
||
!
app
.
uapp_id
)
{
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
}
...
@@ -826,52 +827,57 @@ class RegCenterOrderService{
...
@@ -826,52 +827,57 @@ class RegCenterOrderService{
});
});
if
(
!
needinfo
||
!
needinfo
.
id
)
{
if
(
!
needinfo
||
!
needinfo
.
id
)
{
return
system
.
getResultFail
(
-
201
,
"未知需求信息"
);
return
system
.
getResultFail
(
-
201
,
"未知需求信息"
);
}
else
{
uappId
=
needinfo
.
uapp_id
}
}
if
(
needinfo
.
status
==
"ygb"
||
needinfo
.
status
==
"ycd"
)
{
if
(
needinfo
.
status
==
"ygb"
||
needinfo
.
status
==
"ycd"
)
{
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
}
//获取方案信息
//获取方案信息
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
var
ns
=
await
this
.
needsolutionDao
.
model
.
findA
ndCountA
ll
({
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
raw
:
true
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
raw
:
true
});
});
console
.
log
(
'nnnsss-----'
,
ns
)
console
.
log
(
'nnnsss-----'
,
ns
)
var
i
;
var
i
;
var
needObj
=
{};
var
needObj
=
{};
var
nsLength
=
ns
.
length
var
updateSolution
=
{}
if
(
ns
.
length
>
0
)
{
var
nsLength
=
ns
.
rows
.
length
if
(
nsLength
>
0
)
{
for
(
i
=
0
;
i
<
nsLength
;
i
++
)
{
for
(
i
=
0
;
i
<
nsLength
;
i
++
)
{
if
(
ns
[
i
].
id
)
{
if
(
ns
.
rows
[
i
].
id
)
{
if
(
ns
[
i
].
status
==
"ywc"
)
{
ns
.
rows
[
i
][
'uapp_id'
]
=
uappId
;
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能废弃"
+
ns
[
i
].
statusName
+
"方案"
);
if
(
ns
.
rows
[
i
].
status
==
"ywc"
)
{
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能废弃"
+
ns
.
rows
[
i
].
statusName
+
"方案"
);
}
}
var
flowStatus
=
ns
[
i
].
solutionContent
&&
ns
[
i
].
solutionContent
.
status
?
n
s
[
i
].
solutionContent
.
status
:
""
;
var
flowStatus
=
ns
.
rows
[
i
].
solutionContent
&&
ns
.
rows
[
i
].
solutionContent
.
status
?
ns
.
row
s
[
i
].
solutionContent
.
status
:
""
;
if
(
flowStatus
&&
[
"SUCCESS"
].
indexOf
(
flowStatus
)
==
0
)
{
if
(
flowStatus
&&
[
"SUCCESS"
].
indexOf
(
flowStatus
)
==
0
)
{
return
system
.
getResultFail
(
-
104
,
"方案状态为已完成,不能关闭需求"
);
return
system
.
getResultFail
(
-
104
,
"方案状态为已完成,不能关闭需求"
);
}
}
var
self
=
this
var
self
=
this
updateSolution
=
{
status
:
"yzf"
,
isInvalid
:
1
}
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
needObj
=
{
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
status
:
"ygb"
,
notes
:
ab
.
note
};
};
await
this
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
self
.
needinfoDao
.
updateByWhere
(
needObj
,
{
where
:{
id
:
needinfo
.
id
},
t
}
);
//关闭需求
await
self
.
needsolutionDao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
id
:
ns
.
id
},
transaction
:
t
});
//方案废弃
// await self.needsolutionDao.update({ status: "yzf", isInvalid: 1 }, { where: { id: ns.rows[i]
.id }, transaction: t });//方案废弃
// return system.getResultSuccess(ns.orderNo);
var
a
=
await
self
.
needsolutionDao
.
updateByWhere
(
updateSolution
,
{
where
:
{
id
:
ns
.
rows
[
i
].
id
},
t
});
//方案废弃
console
.
log
(
"aaaa---"
,
a
)
})
})
return
system
.
getResultSuccess
(
ns
);
}
}
}
}
}
else
{
}
else
{
needObj
=
{
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
};
await
this
.
needinfoDao
.
update
(
needObj
)
await
this
.
needinfoDao
.
updateByWhere
(
needObj
,{
where
:{
id
:
needinfo
.
id
}})
console
.
log
(
'needObj----'
,
ns
)
return
system
.
getResultSuccess
(
needinfo
);
ns
[
'uapp_id'
]
=
needinfo
.
uapp_id
;
console
.
log
(
'guanbi ns -----'
,
ns
)
}
}
return
system
.
getResultSuccess
(
ns
);
}
}
//交付商通知状态变更
//交付商通知状态变更
...
...
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