|
@@ -1487,84 +1487,85 @@ public class SmsCheckCustomerInfoController extends JeecgController<SmsCheckCust
|
|
|
List<SmsCheckCustomerInfo> list = customerInfoService.list(checkCustomerInfoLambdaQueryWrapper);
|
|
List<SmsCheckCustomerInfo> list = customerInfoService.list(checkCustomerInfoLambdaQueryWrapper);
|
|
|
|
|
|
|
|
List<String> ids = list.stream().map(SmsCheckCustomerInfo::getId).collect(Collectors.toList());
|
|
List<String> ids = list.stream().map(SmsCheckCustomerInfo::getId).collect(Collectors.toList());
|
|
|
-
|
|
|
|
|
- LambdaQueryWrapper<SmsLotCustomerData> lambdaQueryWrapper = new LambdaQueryWrapper<SmsLotCustomerData>()
|
|
|
|
|
- .in(SmsLotCustomerData::getInfoId, ids);
|
|
|
|
|
- List<SmsLotCustomerData> smsLotCustomerDataList = smsLotCustomerService.list(lambdaQueryWrapper);
|
|
|
|
|
-
|
|
|
|
|
- LambdaQueryWrapper<SmsTruckCustomerData> truckCustomerDataLambdaQueryWrapper = new LambdaQueryWrapper<SmsTruckCustomerData>()
|
|
|
|
|
- .in(SmsTruckCustomerData::getInfoId, ids);
|
|
|
|
|
- List<SmsTruckCustomerData> truckCustomerData = smsTruckCustomerDataService.list(truckCustomerDataLambdaQueryWrapper);
|
|
|
|
|
-
|
|
|
|
|
- LambdaQueryWrapper<SmsCheckCustomerData> smsCustomerInfoGroupByCheckStates = new LambdaQueryWrapper<SmsCheckCustomerData>()
|
|
|
|
|
- .in(SmsCheckCustomerData::getInfoId, ids);
|
|
|
|
|
- List<SmsCheckCustomerData> checkCustomerData = customerDataService.list(smsCustomerInfoGroupByCheckStates);
|
|
|
|
|
-
|
|
|
|
|
- LambdaQueryWrapper<SpecialExamination> specialExaminationLambdaQueryWrapper = new LambdaQueryWrapper<SpecialExamination>()
|
|
|
|
|
- .in(SpecialExamination::getInfoId, ids);
|
|
|
|
|
- List<SpecialExamination> specialExaminations = specialExaminationService.list(specialExaminationLambdaQueryWrapper);
|
|
|
|
|
-
|
|
|
|
|
List<FilesDataVo> filesDataVos =new ArrayList<>();
|
|
List<FilesDataVo> filesDataVos =new ArrayList<>();
|
|
|
- for (SmsLotCustomerData lotCustomerData : smsLotCustomerDataList) {
|
|
|
|
|
- Class<? extends SmsLotCustomerData> aClass = lotCustomerData.getClass();
|
|
|
|
|
- Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
- for (Field declaredField : declaredFields) {
|
|
|
|
|
- declaredField.setAccessible(true);
|
|
|
|
|
- Object value = declaredField.get(lotCustomerData);
|
|
|
|
|
- if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
- if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
- List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
- filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
|
|
+ if (ids.size()>0){
|
|
|
|
|
+ LambdaQueryWrapper<SmsLotCustomerData> lambdaQueryWrapper = new LambdaQueryWrapper<SmsLotCustomerData>()
|
|
|
|
|
+ .in(SmsLotCustomerData::getInfoId, ids);
|
|
|
|
|
+ List<SmsLotCustomerData> smsLotCustomerDataList = smsLotCustomerService.list(lambdaQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<SmsTruckCustomerData> truckCustomerDataLambdaQueryWrapper = new LambdaQueryWrapper<SmsTruckCustomerData>()
|
|
|
|
|
+ .in(SmsTruckCustomerData::getInfoId, ids);
|
|
|
|
|
+ List<SmsTruckCustomerData> truckCustomerData = smsTruckCustomerDataService.list(truckCustomerDataLambdaQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<SmsCheckCustomerData> smsCustomerInfoGroupByCheckStates = new LambdaQueryWrapper<SmsCheckCustomerData>()
|
|
|
|
|
+ .in(SmsCheckCustomerData::getInfoId, ids);
|
|
|
|
|
+ List<SmsCheckCustomerData> checkCustomerData = customerDataService.list(smsCustomerInfoGroupByCheckStates);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<SpecialExamination> specialExaminationLambdaQueryWrapper = new LambdaQueryWrapper<SpecialExamination>()
|
|
|
|
|
+ .in(SpecialExamination::getInfoId, ids);
|
|
|
|
|
+ List<SpecialExamination> specialExaminations = specialExaminationService.list(specialExaminationLambdaQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ for (SmsLotCustomerData lotCustomerData : smsLotCustomerDataList) {
|
|
|
|
|
+ Class<? extends SmsLotCustomerData> aClass = lotCustomerData.getClass();
|
|
|
|
|
+ Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
+ for (Field declaredField : declaredFields) {
|
|
|
|
|
+ declaredField.setAccessible(true);
|
|
|
|
|
+ Object value = declaredField.get(lotCustomerData);
|
|
|
|
|
+ if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
+ List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
+ filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (SmsTruckCustomerData smsTruckCustomerData : truckCustomerData) {
|
|
|
|
|
- Class<? extends SmsTruckCustomerData> aClass = smsTruckCustomerData.getClass();
|
|
|
|
|
- Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
- for (Field declaredField : declaredFields) {
|
|
|
|
|
- declaredField.setAccessible(true);
|
|
|
|
|
- Object value = declaredField.get(smsTruckCustomerData);
|
|
|
|
|
- if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
- if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
- List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
- filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
|
|
+ for (SmsTruckCustomerData smsTruckCustomerData : truckCustomerData) {
|
|
|
|
|
+ Class<? extends SmsTruckCustomerData> aClass = smsTruckCustomerData.getClass();
|
|
|
|
|
+ Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
+ for (Field declaredField : declaredFields) {
|
|
|
|
|
+ declaredField.setAccessible(true);
|
|
|
|
|
+ Object value = declaredField.get(smsTruckCustomerData);
|
|
|
|
|
+ if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
+ List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
+ filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (SmsCheckCustomerData customerData : checkCustomerData) {
|
|
|
|
|
- Class<? extends SmsCheckCustomerData> aClass = customerData.getClass();
|
|
|
|
|
- Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
- for (Field declaredField : declaredFields) {
|
|
|
|
|
- declaredField.setAccessible(true);
|
|
|
|
|
- Object value = declaredField.get(customerData);
|
|
|
|
|
- if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")&& !value.toString().isEmpty()) {
|
|
|
|
|
- if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
- List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
- filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
|
|
+ for (SmsCheckCustomerData customerData : checkCustomerData) {
|
|
|
|
|
+ Class<? extends SmsCheckCustomerData> aClass = customerData.getClass();
|
|
|
|
|
+ Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
+ for (Field declaredField : declaredFields) {
|
|
|
|
|
+ declaredField.setAccessible(true);
|
|
|
|
|
+ Object value = declaredField.get(customerData);
|
|
|
|
|
+ if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")&& !value.toString().isEmpty()) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
+ List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
+ filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (SpecialExamination specialExamination : specialExaminations) {
|
|
|
|
|
- Class<? extends SpecialExamination> aClass = specialExamination.getClass();
|
|
|
|
|
- Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
- for (Field declaredField : declaredFields) {
|
|
|
|
|
- declaredField.setAccessible(true);
|
|
|
|
|
- Object value = declaredField.get(specialExamination);
|
|
|
|
|
- if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
- if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
- List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
- filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
|
|
+ for (SpecialExamination specialExamination : specialExaminations) {
|
|
|
|
|
+ Class<? extends SpecialExamination> aClass = specialExamination.getClass();
|
|
|
|
|
+ Field[] declaredFields = aClass.getDeclaredFields();
|
|
|
|
|
+ for (Field declaredField : declaredFields) {
|
|
|
|
|
+ declaredField.setAccessible(true);
|
|
|
|
|
+ Object value = declaredField.get(specialExamination);
|
|
|
|
|
+ if (declaredField.isAnnotationPresent(MyCustomAnnotation.class)&& value!=null && !value.toString().equals("[{}]")) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(stepsId) && declaredField.getName().equals(stepsId)){
|
|
|
|
|
+ List<FilesDataVo> filesDataVos1 = JSONArray.parseArray(value.toString(), FilesDataVo.class);
|
|
|
|
|
+ filesDataVos.addAll(filesDataVos1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ for (FilesDataVo filesDataVo : filesDataVos) {
|
|
|
|
|
+ filesDataVo.setUid(filesDataVo.getId());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- for (FilesDataVo filesDataVo : filesDataVos) {
|
|
|
|
|
- filesDataVo.setUid(filesDataVo.getId());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
return Result.ok(JSON.toJSONString(filesDataVos));
|
|
return Result.ok(JSON.toJSONString(filesDataVos));
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|