feat: There is no way the,buss

This commit is contained in:
super_liu
2021-12-26 18:08:28 +08:00
parent 4bd9b583ef
commit a02539dd25
2 changed files with 21 additions and 0 deletions
@@ -1,5 +1,6 @@
package com.ydw.bat.wkflow.listener.bussLibrary;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessName;
@@ -39,6 +40,14 @@ public class BussLibrary2After implements TaskListener{
List<String> nextUserList = new ArrayList();
JSONArray fileList =delegateTask.getVariable("fileModelList", JSONArray.class);
if (fileList==null) {
fileList=new JSONArray();
}
fileList.addAll(object.getJSONArray("fileModelList"));
delegateTask.setVariable("fileModelList",fileList);
if(StringUtils.isNotBlank(object.getString("hzUserId"))){
delegateTask.setVariable("hzUserId",object.getString("hzUserId"));
nextUserList.add(object.getString("hzUserId"));
@@ -1,5 +1,8 @@
package com.ydw.bat.wkflow.listener.bussLibrary;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
@@ -25,6 +28,15 @@ public class BussLibrary3Before implements TaskListener{
List<BusProcessNew> list = busBean.list(queryWrapper1);
if(!list.isEmpty()){
BusProcessNew one1 = list.get(0);
/**
* 汇总企标编写文件列表
*/
String msg = one1.getMesg();
JSONObject jsonObject = JSON.parseObject(msg);
JSONArray fileList=delegateTask.getVariable("fileModelList",JSONArray.class);
jsonObject.put("fileModelList",fileList);
one1.setMesg(jsonObject.toJSONString());
one1.setTaskId(delegateTask.getId());
busBean.saveOrUpdate(one1);