Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
486d206b61
  1. 7
      api/app/lib/schedule/workOrder.js

7
api/app/lib/schedule/workOrder.js

@ -72,6 +72,7 @@ module.exports = function (app, opts,ctx) {
.set('Content-Type', 'application/json')
.send({processInstanceIdIn: procinstIds})
console.log('formRes2',procinstsVariables)
if(procinstsVariables.body&&procinstsVariables.body.length){
for (let f of formRes) {
const parseData = parseProcessData({
formSchema: JSON.parse(f.formSchema),
@ -79,7 +80,7 @@ module.exports = function (app, opts,ctx) {
})
const res=await models.Workorder.create({
projectId:parseData.pomsProjectId.value || null,
formname:procinstsVariables.body.find(item=>item.id===f.procinstId).name||null,
formname:procinstsVariables.body.find(t => t.name == 'fsEmisBusinessName') ? procinstsVariables.body.find(t => t.name == 'fsEmisBusinessName').value : '',
state: f.state||null,
endTime:f.endTime||null,
startTime:f.createTime||null
@ -88,6 +89,10 @@ module.exports = function (app, opts,ctx) {
console.log('工单数据抽取结束')
}
}else{
console.log('未查询到数据')
}
}
}catch(error){

Loading…
Cancel
Save