Commit d8132035474e3f2182900dcb94d130be7ac1142b
1 parent
f88462b534
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 15 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
d813203
| ... | ... | @@ -379,9 +379,9 @@ |
| 379 | 379 | @RequestMapping(value = "/importSerologySieve") |
| 380 | 380 | @ResponseBody |
| 381 | 381 | @TokenRequired |
| 382 | - public void importSerologySieve(@RequestParam MultipartFile file, HttpServletRequest request, HttpServletResponse response) { | |
| 382 | + public BaseResponse importSerologySieve(@RequestParam MultipartFile file, HttpServletRequest request, HttpServletResponse response) { | |
| 383 | 383 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 384 | - sieveFacade.importSerologySieve(file, loginState.getId(), response); | |
| 384 | + return sieveFacade.importSerologySieve(file, loginState.getId(), response); | |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
d813203
| ... | ... | @@ -2543,6 +2543,9 @@ |
| 2543 | 2543 | if (CollectionUtils.isNotEmpty(list)) { |
| 2544 | 2544 | for (SieveListResult2 sive : list) { |
| 2545 | 2545 | Map<String, Object> data = new HashMap<>(); |
| 2546 | + if(StringUtils.isEmpty(sive.getNumber())){ | |
| 2547 | + continue; | |
| 2548 | + } | |
| 2546 | 2549 | data.put("SampleID", sive.getNumber());//样本号(标本号) |
| 2547 | 2550 | data.put("PatientID", sive.getPatientID());//孕妇编号 |
| 2548 | 2551 | data.put("LastName", sive.getName());//姓名 |
| ... | ... | @@ -2642,7 +2645,8 @@ |
| 2642 | 2645 | * @author 武涛涛 |
| 2643 | 2646 | * @date 2020/6/15 |
| 2644 | 2647 | */ |
| 2645 | - public void importSerologySieve(MultipartFile file, Integer id, HttpServletResponse response) { | |
| 2648 | + public BaseResponse importSerologySieve(MultipartFile file, Integer id, HttpServletResponse response) { | |
| 2649 | + | |
| 2646 | 2650 | Workbook wb = null; |
| 2647 | 2651 | try { |
| 2648 | 2652 | //把MultipartFile转化为File 第一种 |
| 2649 | 2653 | |
| 2650 | 2654 | |
| ... | ... | @@ -2785,11 +2789,12 @@ |
| 2785 | 2789 | |
| 2786 | 2790 | |
| 2787 | 2791 | } |
| 2788 | - } catch (IOException e) { | |
| 2792 | + } catch (Exception e) { | |
| 2789 | 2793 | e.printStackTrace(); |
| 2790 | - } catch (BiffException e) { | |
| 2791 | - e.printStackTrace(); | |
| 2794 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION); | |
| 2792 | 2795 | } |
| 2796 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 2797 | + | |
| 2793 | 2798 | } |
| 2794 | 2799 | |
| 2795 | 2800 | private void switchMth(ImportResult importResult, int j, String str) { |
pom.xml
View file @
d813203
| ... | ... | @@ -583,11 +583,11 @@ |
| 583 | 583 | <artifactId>velocity-tools</artifactId> |
| 584 | 584 | <version>2.0</version> |
| 585 | 585 | </dependency> |
| 586 | - <dependency> | |
| 586 | + <!-- <dependency> | |
| 587 | 587 | <groupId>com.oracle</groupId> |
| 588 | 588 | <artifactId>ojdbc14</artifactId> |
| 589 | 589 | <version>11.2.0.1.0</version> |
| 590 | - </dependency> | |
| 590 | + </dependency>--> | |
| 591 | 591 | <dependency> |
| 592 | 592 | <groupId>commons-dbutils</groupId> |
| 593 | 593 | <artifactId>commons-dbutils</artifactId> |
| 594 | 594 | |
| ... | ... | @@ -604,11 +604,11 @@ |
| 604 | 604 | <version>1.2.8</version> |
| 605 | 605 | </dependency> |
| 606 | 606 | |
| 607 | - <dependency> | |
| 607 | + <!--<dependency> | |
| 608 | 608 | <groupId>com.aspose</groupId> |
| 609 | 609 | <artifactId>aspose-words</artifactId> |
| 610 | 610 | <version>15.8.0</version> |
| 611 | - </dependency> | |
| 611 | + </dependency>--> | |
| 612 | 612 | |
| 613 | 613 | </dependencies> |
| 614 | 614 | </project> |