Commit 245c3992e231500bf7a1eb9bc6844b4374e93206
1 parent
77968f06bc
Exists in
master
and in
2 other branches
解决空指针问题
Showing 1 changed file with 10 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/ReferralApplyScreeningQuery.java
View file @
245c399
| ... | ... | @@ -420,7 +420,7 @@ | 
| 420 | 420 | } | 
| 421 | 421 | if (null != birthEnd) { | 
| 422 | 422 | if (null != c) { | 
| 423 | - c = c.lte(birthEnd); | |
| 423 | + c = c.where("birth").lte(birthEnd); | |
| 424 | 424 | } else { | 
| 425 | 425 | c = Criteria.where("birth").lte(birthEnd); | 
| 426 | 426 | } | 
| 427 | 427 | |
| 428 | 428 | |
| ... | ... | @@ -435,18 +435,23 @@ | 
| 435 | 435 | } | 
| 436 | 436 | if (null != dueDateEnd) { | 
| 437 | 437 | if (c != null) { | 
| 438 | - c = c.lte(dueDateEnd); | |
| 438 | + c = c.and("days").lte(dueDateEnd); | |
| 439 | 439 | } else { | 
| 440 | 440 | c = Criteria.where("days").lte(dueDateEnd); | 
| 441 | 441 | } | 
| 442 | 442 | } | 
| 443 | 443 | //高危评分 | 
| 444 | 444 | if (null != scoreStart) { | 
| 445 | - c = c.and("score").gte(scoreStart); | |
| 445 | + if (null != c) { | |
| 446 | + c = c.and("score").gte(scoreStart); | |
| 447 | + }else{ | |
| 448 | + c = Criteria.where("score").gte(scoreStart); | |
| 449 | + } | |
| 450 | + | |
| 446 | 451 | } | 
| 447 | 452 | if (null != scoreEnd) { | 
| 448 | 453 | if (null != c) { | 
| 449 | - c = c.lte(scoreEnd); | |
| 454 | + c = c.and("score").lte(scoreEnd); | |
| 450 | 455 | } else { | 
| 451 | 456 | c = Criteria.where("score").lte(scoreEnd); | 
| 452 | 457 | } | 
| ... | ... | @@ -477,7 +482,7 @@ | 
| 477 | 482 | } | 
| 478 | 483 | if (null != transferredEnd) { | 
| 479 | 484 | if (c != null) { | 
| 480 | - c = c.lte(transferredEnd); | |
| 485 | + c = c.and("created").lte(transferredEnd); | |
| 481 | 486 | } else { | 
| 482 | 487 | c = Criteria.where("created").lte(transferredEnd); | 
| 483 | 488 | } |