| | |
| | | import com.dji.sample.patches.model.Param.PatchesParam; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | | import com.dji.sample.patches.service.GetPatchesService; |
| | | import com.dji.sample.patches.utils.DistrictCodeUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | .eq(LotInfo::getIsPlan, param.getIsPlan())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .peek(lotInfo -> { |
| | | // 修改 xzqdm 字段的值 |
| | | lotInfo.setXzqdm(DistrictCodeUtils.codeToName(lotInfo.getXzqdm())); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } else { |
| | |
| | | .like(LotInfo::getXzqdm, param.getXzqdm())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .peek(lotInfo -> { |
| | | // 修改 xzqdm 字段的值 |
| | | lotInfo.setXzqdm(DistrictCodeUtils.codeToName(lotInfo.getXzqdm())); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } |