| | |
| | | |
| | | |
| | | @Override |
| | | public Set<Integer> importBatchForSolutions(MultipartFile file , Integer insuranceId){ |
| | | public Set<Map<String,Object>> importBatchForSolutions(MultipartFile file , Integer insuranceId){ |
| | | ExcelImporter ie = null; |
| | | List<WorktypeImport> dataList =null; |
| | | try { |
| | |
| | | if(dataList == null || dataList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,录入数据为空!"); |
| | | } |
| | | List<Integer> result = new ArrayList<>(); |
| | | List<Map<String,Object>> result = new ArrayList<>(); |
| | | List<Worktype> inWorkTypeList = null; |
| | | if(Objects.nonNull(insuranceId)){ |
| | | inWorkTypeList = worktypeMapper.selectList(new QueryWrapper<Worktype>().lambda().eq(Worktype::getIsdeleted,Constants.ZERO) |
| | | .eq(Worktype::getInsuranceId,insuranceId).eq(Worktype::getDataType,Constants.TWO) |
| | | .eq(Worktype::getInsuranceId,insuranceId) |
| | | .eq(Worktype::getDataType,Constants.TWO) |
| | | ); |
| | | } |
| | | for(WorktypeImport model : dataList){ |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(inWorkTypeList)){ |
| | | Integer workTypeId = getHasWorkTypeByName(model.getName(),inWorkTypeList); |
| | | if(Objects.nonNull(workTypeId)){ |
| | | result.add(workTypeId); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("id",workTypeId); |
| | | map.put("name",model.getName()); |
| | | result.add(map); |
| | | } |
| | | } |
| | | } |
| | | Set<Integer> resultSet = new HashSet<>(result); |
| | | Set<Map<String,Object>> resultSet = new HashSet<>(result); |
| | | return resultSet; |
| | | } |
| | | |