|
|
|
@ -4927,15 +4927,17 @@ public class QcServiceImpl implements QcService { |
|
|
|
|
|
|
|
/** |
|
|
|
* 文件上传 |
|
|
|
* @param file |
|
|
|
* @param list |
|
|
|
* @param inData |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public SysOssEntity upload(MultipartFile file, GetParamInData inData) { |
|
|
|
if (file.isEmpty()) { |
|
|
|
public List<SysOssEntity> upload(MultipartFile[] list, GetParamInData inData) { |
|
|
|
if (Objects.isNull(list) || list.length == 0) { |
|
|
|
throw new XJException("上传文件不能为空"); |
|
|
|
} |
|
|
|
List<SysOssEntity> ossEntityList = new ArrayList<>(); |
|
|
|
for (MultipartFile file : list) { |
|
|
|
// 保存文件信息 |
|
|
|
SysOssEntity ossEntity = new SysOssEntity(); |
|
|
|
// 处理文件后缀 |
|
|
|
@ -4972,7 +4974,9 @@ public class QcServiceImpl implements QcService { |
|
|
|
ossEntity.setOrderRef3(inData.getOrderRef3()); |
|
|
|
ossEntity.setOrderRef4(inData.getOrderRef4()); |
|
|
|
sysOssService.save(ossEntity); |
|
|
|
return ossEntity; |
|
|
|
ossEntityList.add(ossEntity); |
|
|
|
} |
|
|
|
return ossEntityList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -5111,10 +5115,12 @@ public class QcServiceImpl implements QcService { |
|
|
|
// 数据采集来源 |
|
|
|
tempAcquisitionData.setCollectionSource(acquisitionData.getCollectionSource().split(",")[i]); |
|
|
|
// 数据采集方式 |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value") && "file".equals(tempAcquisitionData.getCollectionMethod())) { // 如果采集来源是以"value"开头则采集方式使用文件数据采集(file) |
|
|
|
tempAcquisitionData.setCollectionMethod("file"); |
|
|
|
} else if (tempAcquisitionData.getCollectionSource().startsWith("value") && "plc".equals(tempAcquisitionData.getCollectionMethod())) { // plc 数据采集 |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value")) { // 如果采集来源是以"value"开头则采集方式使用文件数据采集(file) |
|
|
|
if (tempAcquisitionData.getCollectionMethod().contains("plc")) { |
|
|
|
tempAcquisitionData.setCollectionMethod("plc"); |
|
|
|
} else { |
|
|
|
tempAcquisitionData.setCollectionMethod("file"); |
|
|
|
} |
|
|
|
} else if ("photo_value1".equals(tempAcquisitionData.getCollectionSource())){ // // 如果采集来源是"photo_value1"开头则采集方式使用文件数据采集(image) |
|
|
|
tempAcquisitionData.setCollectionMethod("image"); |
|
|
|
} else if ("file_value1".equals(tempAcquisitionData.getCollectionSource())){ // // 如果采集来源是"file_value1"开头则采集方式使用文件数据采集(fileUrl) |
|
|
|
@ -5338,10 +5344,12 @@ public class QcServiceImpl implements QcService { |
|
|
|
// 数据采集来源 |
|
|
|
tempAcquisitionData.setCollectionSource(acquisitionData.getCollectionSource().split(",")[i]); |
|
|
|
// 数据采集方式 |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value") && "file".equals(tempAcquisitionData.getCollectionMethod())) { // 如果采集来源是以"value"开头则采集方式使用文件数据采集(file) |
|
|
|
tempAcquisitionData.setCollectionMethod("file"); |
|
|
|
} else if (tempAcquisitionData.getCollectionSource().startsWith("value") && "plc".equals(tempAcquisitionData.getCollectionMethod())) { // plc 数据采集 |
|
|
|
if (tempAcquisitionData.getCollectionSource().startsWith("value")) { // 如果采集来源是以"value"开头则采集方式使用文件数据采集(file) |
|
|
|
if (tempAcquisitionData.getCollectionMethod().contains("plc")) { |
|
|
|
tempAcquisitionData.setCollectionMethod("plc"); |
|
|
|
} else { |
|
|
|
tempAcquisitionData.setCollectionMethod("file"); |
|
|
|
} |
|
|
|
} else if ("photo_value1".equals(tempAcquisitionData.getCollectionSource())){ // // 如果采集来源是"photo_value1"开头则采集方式使用文件数据采集(image) |
|
|
|
tempAcquisitionData.setCollectionMethod("image"); |
|
|
|
} else if ("file_value1".equals(tempAcquisitionData.getCollectionSource())){ // // 如果采集来源是"file_value1"开头则采集方式使用文件数据采集(fileUrl) |
|
|
|
|