|
@@ -3,6 +3,7 @@ package com.shanghaichengdi.ghjgitem.controller;
|
|
|
|
|
|
import cn.hutool.json.JSON;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -89,7 +90,7 @@ public class SIPGDataTransportController extends CommonController {
|
|
|
Map<List<Object>, List<TransportSgDwNzxBoat>> updata = transportSgDwNzxBoats.stream().collect(Collectors.groupingBy(compositeKey, Collectors.toList()));
|
|
|
|
|
|
Function<TransportSgBaseNumber, List<Object>> lockDataKey = boats ->
|
|
|
- Arrays.asList(boats.getBaseType(), boats.getBaseLine(), boats.getBaseBoatName(), boats.getBaseCompyName());
|
|
|
+ Arrays.asList(boats.getBaseType(), boats.getBaseBoatName(), boats.getBaseCompyName());
|
|
|
Map<List<Object>, List<TransportSgBaseNumber>> lockData = islocks.stream().collect(Collectors.groupingBy(lockDataKey, Collectors.toList()));
|
|
|
|
|
|
if (updata != null && updata.keySet() != null && updata.keySet().size() > 0) {
|
|
@@ -99,7 +100,7 @@ public class SIPGDataTransportController extends CommonController {
|
|
|
if (lockData.keySet().contains(i)) //如果过滤数据一致
|
|
|
{
|
|
|
List<Long> stringsFilter = updata.get(i).stream().map(TransportSgDwNzxBoat::getNzxSchPkid).collect(Collectors.toList());
|
|
|
- stringBuilder.append("【" + stringsFilter.toString() + "]");
|
|
|
+ stringBuilder.append("[" + stringsFilter.toString() + "]");
|
|
|
} else {
|
|
|
needSaves.addAll(updata.get(i));
|
|
|
}
|
|
@@ -110,9 +111,13 @@ public class SIPGDataTransportController extends CommonController {
|
|
|
});
|
|
|
boolean a = boatService.saveOrUpdateBatch(needSaves);
|
|
|
if (a) {
|
|
|
- return ReturnMsg.success("存储成功,且部分数据已锁,无法修改,无法修改的pkId列表为:" + stringBuilder.toString());
|
|
|
+ String jsonString = JSONArray.toJSONString(stringBuilder.toString());
|
|
|
+ String encodedData = resultEncode(jsonString);
|
|
|
+ return ReturnMsg.success("存储成功,且部分数据已锁,无法修改,无法修改的pkId列表为data",encodedData);
|
|
|
} else {
|
|
|
- return ReturnMsg.error("存储失败且部分数据已锁,无法修改,无法修改的pkId列表为:" + stringBuilder.toString());
|
|
|
+ String jsonString = JSONArray.toJSONString(stringBuilder.toString());
|
|
|
+ String encodedData = resultEncode(jsonString);
|
|
|
+ return ReturnMsg.error("存储失败且部分数据已锁,无法修改,无法修改的pkId列表为data",encodedData);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -368,7 +373,7 @@ public class SIPGDataTransportController extends CommonController {
|
|
|
//先分组
|
|
|
Map<Integer,List<TransportSgBaseNumber>> listMap=new HashMap<>();
|
|
|
sgBaseNumberList.stream().forEach(i->{
|
|
|
- String hashKey=i.getBaseBoatName()+i.getBaseCompyName()+i.getBaseLine()+i.getBaseType();
|
|
|
+ String hashKey=i.getBaseBoatName()+i.getBaseCompyName()+i.getBaseType();
|
|
|
List<TransportSgBaseNumber> baseNumbers= listMap.get(hashKey.hashCode());
|
|
|
if (baseNumbers!=null && baseNumbers.size()>0) {
|
|
|
baseNumbers.add(i);
|