Commit a3e652bac065c196fd951c307119759ca1d87e24

Authored by cfl
1 parent 245c3992e2
Exists in master and in 2 other branches dev, luanping

解决空指针问题

Showing 1 changed file with 6 additions and 7 deletions

platform-dal/src/main/java/com/lyms/platform/query/ReferralApplyScreeningQuery.java View file @ a3e652b
... ... @@ -420,7 +420,7 @@
420 420 }
421 421 if (null != birthEnd) {
422 422 if (null != c) {
423   - c = c.where("birth").lte(birthEnd);
  423 + c = c.lte(birthEnd);
424 424 } else {
425 425 c = Criteria.where("birth").lte(birthEnd);
426 426 }
... ... @@ -435,7 +435,7 @@
435 435 }
436 436 if (null != dueDateEnd) {
437 437 if (c != null) {
438   - c = c.and("days").lte(dueDateEnd);
  438 + c = c.lte(dueDateEnd);
439 439 } else {
440 440 c = Criteria.where("days").lte(dueDateEnd);
441 441 }
442 442  
443 443  
... ... @@ -443,15 +443,14 @@
443 443 //高危评分
444 444 if (null != scoreStart) {
445 445 if (null != c) {
446   - c = c.and("score").gte(scoreStart);
447   - }else{
  446 + c = c.gte(scoreStart);
  447 + } else {
448 448 c = Criteria.where("score").gte(scoreStart);
449 449 }
450   -
451 450 }
452 451 if (null != scoreEnd) {
453 452 if (null != c) {
454   - c = c.and("score").lte(scoreEnd);
  453 + c = c.lte(scoreEnd);
455 454 } else {
456 455 c = Criteria.where("score").lte(scoreEnd);
457 456 }
... ... @@ -482,7 +481,7 @@
482 481 }
483 482 if (null != transferredEnd) {
484 483 if (c != null) {
485   - c = c.and("created").lte(transferredEnd);
  484 + c = c.lte(transferredEnd);
486 485 } else {
487 486 c = Criteria.where("created").lte(transferredEnd);
488 487 }