Commit 960d943e27f44277087be26c01681e9ae20f345b
1 parent
a4cdaccd0d
Exists in
master
and in
6 other branches
承德冠新接口修改
Showing 1 changed file with 31 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java
View file @
960d943
| ... | ... | @@ -586,14 +586,38 @@ |
| 586 | 586 | ps.setNull(9, Types.DOUBLE); |
| 587 | 587 | } |
| 588 | 588 | ps.setDate(10,new Date(antExChuModel.getLastMenses().getTime())); |
| 589 | - ps.setDate(11,new Date(patients.getDueDate().getTime())); | |
| 590 | - ps.setInt(12, antExChuModel.getPregnancyTimes()); | |
| 591 | - ps.setInt(13, antExChuModel.getProdTime()); | |
| 592 | - ps.setInt(14, antExChuModel.getAbortionZR()); | |
| 593 | - ps.setInt(15, antExChuModel.getAbortionRG()); | |
| 589 | + ps.setDate(11, new Date(patients.getDueDate().getTime())); | |
| 590 | + if(antExChuModel.getPregnancyTimes() != null){ | |
| 591 | + ps.setInt(12, antExChuModel.getPregnancyTimes()); | |
| 592 | + }else{ | |
| 593 | + ps.setNull(12,Types.INTEGER); | |
| 594 | + } | |
| 595 | + if(antExChuModel.getProdTime() != null){ | |
| 596 | + ps.setInt(13, antExChuModel.getProdTime()); | |
| 597 | + }else{ | |
| 598 | + ps.setNull(13,Types.INTEGER); | |
| 599 | + } | |
| 600 | + if(antExChuModel.getAbortionZR() != null){ | |
| 601 | + ps.setInt(14, antExChuModel.getAbortionZR()); | |
| 602 | + }else{ | |
| 603 | + ps.setNull(14,Types.INTEGER); | |
| 604 | + } | |
| 605 | + if(antExChuModel.getAbortionRG() != null){ | |
| 606 | + ps.setInt(15, antExChuModel.getAbortionRG()); | |
| 607 | + }else{ | |
| 608 | + ps.setNull(15,Types.INTEGER); | |
| 609 | + } | |
| 594 | 610 | ps.setString(16, patients.getHusbandName()); |
| 595 | - ps.setDate(17, new Date(antExChuModel.getCheckTime().getTime())); | |
| 596 | - ps.setDate(18,new Date(antExChuModel.getCreated().getTime())); | |
| 611 | + if(antExChuModel.getCheckTime() != null){ | |
| 612 | + ps.setDate(17, new Date(antExChuModel.getCheckTime().getTime())); | |
| 613 | + }else{ | |
| 614 | + ps.setNull(17,Types.DATE); | |
| 615 | + } | |
| 616 | + if(antExChuModel.getCreated() != null){ | |
| 617 | + ps.setDate(18,new Date(antExChuModel.getCreated().getTime())); | |
| 618 | + }else{ | |
| 619 | + ps.setNull(18,Types.DATE); | |
| 620 | + } | |
| 597 | 621 | ps.setString(19,createOrgId); |
| 598 | 622 | ps.setString(20,orgName); |
| 599 | 623 | ps.setString(21,creator); |