/decodeDetail接口中进行数据去重
This commit is contained in:
@@ -1799,6 +1799,7 @@ public class TodoTaskController extends BaseAction {
|
|||||||
Map<String,JSONObject> msgData =new HashMap<>();
|
Map<String,JSONObject> msgData =new HashMap<>();
|
||||||
List<String> idData=new ArrayList<>();
|
List<String> idData=new ArrayList<>();
|
||||||
List<BusProcessNew> listData = iBusProcessNewService.list(q.eq("P_ID", pId));
|
List<BusProcessNew> listData = iBusProcessNewService.list(q.eq("P_ID", pId));
|
||||||
|
//取出此任务中所有审核mesg数据
|
||||||
for (BusProcessNew bpn:listData) {
|
for (BusProcessNew bpn:listData) {
|
||||||
String mesg = bpn.getMesg();
|
String mesg = bpn.getMesg();
|
||||||
JSONObject object = JSONObject.parseObject(mesg);
|
JSONObject object = JSONObject.parseObject(mesg);
|
||||||
@@ -1809,10 +1810,20 @@ public class TodoTaskController extends BaseAction {
|
|||||||
msgData.put(bpn.getTaskId(),object);
|
msgData.put(bpn.getTaskId(),object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//将所有mesg数据进行整合
|
||||||
JSONArray jsonArray=new JSONArray();
|
JSONArray jsonArray=new JSONArray();
|
||||||
for (String id:idData) {
|
for (String id:idData) {
|
||||||
jsonArray.addAll(msgData.get(id).getJSONArray("itemList"));
|
jsonArray.addAll(msgData.get(id).getJSONArray("itemList"));
|
||||||
}
|
}
|
||||||
|
//将mesg数据进行去重
|
||||||
|
// for (int i = 0; i < jsonArray.size()-1; i++) {
|
||||||
|
// for (int j = i+1; j < jsonArray.size(); j++) {
|
||||||
|
// if(jsonArray.get(i).equals(jsonArray.get(j))){
|
||||||
|
// jsonArray.remove(j);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//将mesg数据进行排序
|
||||||
boolean f=false;
|
boolean f=false;
|
||||||
for (int i = 0; i < jsonArray.size()-1; i++) {
|
for (int i = 0; i < jsonArray.size()-1; i++) {
|
||||||
for (int j = 0; j < jsonArray.size()-1-i; j++) {
|
for (int j = 0; j < jsonArray.size()-1-i; j++) {
|
||||||
@@ -1827,6 +1838,7 @@ public class TodoTaskController extends BaseAction {
|
|||||||
}
|
}
|
||||||
if(!f){break;}
|
if(!f){break;}
|
||||||
}
|
}
|
||||||
|
//后处理
|
||||||
List<String> taskIdList = new ArrayList<>(Arrays.asList(taskIds.split(",")));
|
List<String> taskIdList = new ArrayList<>(Arrays.asList(taskIds.split(",")));
|
||||||
List<BusProcessNew> list = iBusProcessNewService.findNoExecuteBusProcessNewForEnd(taskIdList);
|
List<BusProcessNew> list = iBusProcessNewService.findNoExecuteBusProcessNewForEnd(taskIdList);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user