|
|
|
@ -2343,7 +2343,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批200条记录 |
|
|
|
for (int i = 0; i < subDetailValues.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, subDetailValues.size()); |
|
|
|
List<SubDetailValues> subList = subDetailValues.subList(i, end); |
|
|
|
@ -2918,7 +2918,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批200条记录 |
|
|
|
for (int i = 0; i < subDetailValues.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, subDetailValues.size()); |
|
|
|
List<SubDetailValues> subList = subDetailValues.subList(i, end); |
|
|
|
@ -3540,7 +3540,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批200条记录 |
|
|
|
for (int i = 0; i < subDetailValues.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, subDetailValues.size()); |
|
|
|
List<SubDetailValues> subList = subDetailValues.subList(i, end); |
|
|
|
@ -4285,7 +4285,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
|
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批200条记录 |
|
|
|
for (int i = 0; i < subDetailValues.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, subDetailValues.size()); |
|
|
|
List<SubDetailValues> subList = subDetailValues.subList(i, end); |
|
|
|
@ -5116,6 +5116,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
EquipmentDataAcquisitionData tempAcquisitionData = new EquipmentDataAcquisitionData(); |
|
|
|
BeanUtils.copyProperties(acquisitionData,tempAcquisitionData); |
|
|
|
// 循环数据采集来源 |
|
|
|
int type = 0; |
|
|
|
for (int i = 0; i < acquisitionData.getCollectionSource().split(",").length; i++) { |
|
|
|
// 数据采集来源 |
|
|
|
tempAcquisitionData.setCollectionSource(acquisitionData.getCollectionSource().split(",")[i]); |
|
|
|
@ -5137,7 +5138,10 @@ public class QcServiceImpl implements QcService { |
|
|
|
tempAcquisitionData.setEquipmentNo(acquisitionData.getEquipmentNo()); |
|
|
|
if ("file".equals(tempAcquisitionData.getCollectionMethod()) || "plc".equals(tempAcquisitionData.getCollectionMethod()) || "RS232".equals(tempAcquisitionData.getCollectionMethod())) { |
|
|
|
// 文件数据采集 |
|
|
|
tempAcquisitionData.setSubDetailValueType(i); |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value")) { |
|
|
|
tempAcquisitionData.setSubDetailValueType(type); |
|
|
|
type++; |
|
|
|
} |
|
|
|
List<SubDetailValues> dataList = qcMapper.dataAcquisition(tempAcquisitionData); |
|
|
|
subDetailList.addAll(dataList); |
|
|
|
} else if ("image".equals(tempAcquisitionData.getCollectionMethod()) || "fileUrl".equals(tempAcquisitionData.getCollectionMethod())) { |
|
|
|
@ -5174,7 +5178,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批200条记录 |
|
|
|
for (int i = 0; i < groupCannotBeEmpty.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, groupCannotBeEmpty.size()); |
|
|
|
List<SubDetailValues> subList = groupCannotBeEmpty.subList(i, end); |
|
|
|
@ -5192,7 +5196,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
|
|
|
|
// 新增图片采集信息 |
|
|
|
if (!fileList.isEmpty()) { |
|
|
|
int batchSize2 = 200; |
|
|
|
int batchSize2 = 150; |
|
|
|
for (int i = 0; i < fileList.size(); i += batchSize2) { |
|
|
|
int end = Math.min(i + batchSize2, fileList.size()); |
|
|
|
List<SysOssEntity> subFileList = fileList.subList(i, end); |
|
|
|
@ -5297,6 +5301,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
EquipmentDataAcquisitionData tempAcquisitionData = new EquipmentDataAcquisitionData(); |
|
|
|
BeanUtils.copyProperties(acquisitionData,tempAcquisitionData); |
|
|
|
// 循环数据采集来源 |
|
|
|
int type = 0; |
|
|
|
for (int i = 0; i < acquisitionData.getCollectionSource().split(",").length; i++) { |
|
|
|
// 数据采集来源 |
|
|
|
tempAcquisitionData.setCollectionSource(acquisitionData.getCollectionSource().split(",")[i]); |
|
|
|
@ -5318,7 +5323,10 @@ public class QcServiceImpl implements QcService { |
|
|
|
tempAcquisitionData.setEquipmentNo(acquisitionData.getEquipmentNo()); |
|
|
|
if ("file".equals(tempAcquisitionData.getCollectionMethod()) || "plc".equals(tempAcquisitionData.getCollectionMethod()) || "RS232".equals(tempAcquisitionData.getCollectionMethod())) { |
|
|
|
// 文件数据采集 |
|
|
|
tempAcquisitionData.setSubDetailValueType(i); |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value")) { |
|
|
|
tempAcquisitionData.setSubDetailValueType(type); |
|
|
|
type++; |
|
|
|
} |
|
|
|
List<SubDetailValues> dataList = qcMapper.dataAcquisition(tempAcquisitionData); |
|
|
|
subDetailList.addAll(dataList); |
|
|
|
} else if ("image".equals(tempAcquisitionData.getCollectionMethod()) || "fileUrl".equals(tempAcquisitionData.getCollectionMethod())) { |
|
|
|
@ -5355,7 +5363,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分批插入 |
|
|
|
int batchSize = 200; // 假设每批200条记录 |
|
|
|
int batchSize = 150; // 假设每批150条记录 |
|
|
|
for (int i = 0; i < groupCannotBeEmpty.size(); i += batchSize) { |
|
|
|
int end = Math.min(i + batchSize, groupCannotBeEmpty.size()); |
|
|
|
List<SubDetailValues> subList = groupCannotBeEmpty.subList(i, end); |
|
|
|
@ -5373,7 +5381,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
|
|
|
|
// 新增图片采集信息 |
|
|
|
if (!fileList.isEmpty()) { |
|
|
|
int batchSize2 = 200; |
|
|
|
int batchSize2 = 150; |
|
|
|
for (int i = 0; i < fileList.size(); i += batchSize2) { |
|
|
|
int end = Math.min(i + batchSize2, fileList.size()); |
|
|
|
List<SysOssEntity> subFileList = fileList.subList(i, end); |
|
|
|
|