Commit ff726f2af0123c6192bbff887513f72ad923a8d9
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/ConnTools.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdTyInterface.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsConfigFacade.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java
View file @
ff726f2
| ... | ... | @@ -664,10 +664,26 @@ |
| 664 | 664 | }else{ |
| 665 | 665 | ps.setNull(12,Types.DATE); |
| 666 | 666 | } |
| 667 | - ps.setInt(13, antExChuModel.getPregnancyTimes()); | |
| 668 | - ps.setInt(14, antExChuModel.getProdTime()); | |
| 669 | - ps.setInt(15, antExChuModel.getDelivery()); | |
| 670 | - ps.setInt(16, antExChuModel.getPlanedProd()); | |
| 667 | + if(antExChuModel.getPregnancyTimes() != null){ | |
| 668 | + ps.setInt(13, antExChuModel.getPregnancyTimes()); | |
| 669 | + }else{ | |
| 670 | + ps.setNull(13,Types.INTEGER); | |
| 671 | + } | |
| 672 | + if(antExChuModel.getProdTime() != null){ | |
| 673 | + ps.setInt(14, antExChuModel.getProdTime()); | |
| 674 | + }else{ | |
| 675 | + ps.setNull(14,Types.INTEGER); | |
| 676 | + } | |
| 677 | + if(antExChuModel.getDelivery() != null){ | |
| 678 | + ps.setInt(15, antExChuModel.getDelivery()); | |
| 679 | + }else{ | |
| 680 | + ps.setNull(15,Types.INTEGER); | |
| 681 | + } | |
| 682 | + if(antExChuModel.getPlanedProd() != null){ | |
| 683 | + ps.setInt(16, antExChuModel.getPlanedProd()); | |
| 684 | + }else{ | |
| 685 | + ps.setNull(16,Types.INTEGER); | |
| 686 | + } | |
| 671 | 687 | ps.setString(17, "1"); |
| 672 | 688 | ps.setDate(18, new Date(antExChuModel.getLastMenses().getTime())); |
| 673 | 689 | if(patients.getDueDate() != null){ |
| ... | ... | @@ -678,11 +694,31 @@ |
| 678 | 694 | ps.setString(20, "0"); |
| 679 | 695 | ps.setString(21, "无"); |
| 680 | 696 | ps.setString(22, "无"); |
| 681 | - ps.setInt(23, antExChuModel.getAbortion()); | |
| 682 | - ps.setInt(24, antExChuModel.getStillChan()); | |
| 683 | - ps.setInt(25, antExChuModel.getStillbirth()); | |
| 684 | - ps.setInt(26, antExChuModel.getNeoDeath()); | |
| 685 | - ps.setInt(27, antExChuModel.getBirthDefect()); | |
| 697 | + if(antExChuModel.getAbortion() != null){ | |
| 698 | + ps.setInt(23, antExChuModel.getAbortion()); | |
| 699 | + }else{ | |
| 700 | + ps.setNull(23,Types.INTEGER); | |
| 701 | + } | |
| 702 | + if(antExChuModel.getStillChan() != null){ | |
| 703 | + ps.setInt(24, antExChuModel.getStillChan()); | |
| 704 | + }else{ | |
| 705 | + ps.setNull(24,Types.INTEGER); | |
| 706 | + } | |
| 707 | + if(antExChuModel.getStillbirth() != null){ | |
| 708 | + ps.setInt(25, antExChuModel.getStillbirth()); | |
| 709 | + }else{ | |
| 710 | + ps.setNull(25,Types.INTEGER); | |
| 711 | + } | |
| 712 | + if(antExChuModel.getNeoDeath() != null){ | |
| 713 | + ps.setInt(26, antExChuModel.getNeoDeath()); | |
| 714 | + }else{ | |
| 715 | + ps.setNull(26,Types.INTEGER); | |
| 716 | + } | |
| 717 | + if(antExChuModel.getBirthDefect() != null){ | |
| 718 | + ps.setInt(27, antExChuModel.getBirthDefect()); | |
| 719 | + }else{ | |
| 720 | + ps.setNull(27,Types.INTEGER); | |
| 721 | + } | |
| 686 | 722 | if(antExChuModel.getHeight() != null){ |
| 687 | 723 | ps.setDouble(28, Double.parseDouble(antExChuModel.getHeight())); |
| 688 | 724 | }else{ |
| 689 | 725 | |
| ... | ... | @@ -756,14 +792,26 @@ |
| 756 | 792 | ps.setNull(50,Types.INTEGER); |
| 757 | 793 | } |
| 758 | 794 | if(antExChuModel.getNdb() != null){ |
| 759 | - ps.setDouble(51, Double.parseDouble(antExChuModel.getNdb())); | |
| 795 | + boolean b = false; | |
| 796 | + b = isDouble(antExChuModel.getNdb()); | |
| 797 | + if(b){ | |
| 798 | + ps.setDouble(51, Double.parseDouble(antExChuModel.getNdb())); | |
| 799 | + }else{ | |
| 800 | + ps.setNull(51, Types.DOUBLE); | |
| 801 | + } | |
| 760 | 802 | }else{ |
| 761 | 803 | ps.setNull(51,Types.DOUBLE); |
| 762 | 804 | } |
| 763 | 805 | ps.setString(52, null); |
| 764 | 806 | ps.setString(53, null); |
| 765 | 807 | if(antExChuModel.getNt() != null){ |
| 766 | - ps.setDouble(54, Double.parseDouble(antExChuModel.getNt())); | |
| 808 | + boolean bo =false; | |
| 809 | + bo = isDouble(antExChuModel.getNt()); | |
| 810 | + if(bo){ | |
| 811 | + ps.setDouble(54, Double.parseDouble(antExChuModel.getNt())); | |
| 812 | + }else{ | |
| 813 | + ps.setNull(54,Types.DOUBLE); | |
| 814 | + } | |
| 767 | 815 | }else{ |
| 768 | 816 | ps.setNull(54,Types.DOUBLE); |
| 769 | 817 | } |
| 770 | 818 | |
| 771 | 819 | |
| 772 | 820 | |
| 773 | 821 | |
| 774 | 822 | |
| ... | ... | @@ -802,19 +850,19 @@ |
| 802 | 850 | ps.setNull(59,Types.DOUBLE); |
| 803 | 851 | } |
| 804 | 852 | if(antExChuModel.getXqgbzam() != null){ |
| 805 | - ps.setInt(60, Integer.parseInt(antExChuModel.getXqgbzam())); | |
| 853 | + ps.setDouble(60, Double.parseDouble(antExChuModel.getXqgbzam())); | |
| 806 | 854 | }else{ |
| 807 | - ps.setNull(60,Types.INTEGER); | |
| 855 | + ps.setNull(60,Types.DOUBLE); | |
| 808 | 856 | } |
| 809 | 857 | if(antExChuModel.getXqgczam() != null){ |
| 810 | - ps.setInt(61, Integer.parseInt(antExChuModel.getXqgczam())); | |
| 858 | + ps.setDouble(61, Double.parseDouble(antExChuModel.getXqgczam())); | |
| 811 | 859 | }else{ |
| 812 | - ps.setNull(61,Types.INTEGER); | |
| 860 | + ps.setNull(61,Types.DOUBLE); | |
| 813 | 861 | } |
| 814 | 862 | if(antExChuModel.getAlbumin() != null){ |
| 815 | - ps.setInt(62, Integer.parseInt(antExChuModel.getAlbumin())); | |
| 863 | + ps.setDouble(62, Double.parseDouble(antExChuModel.getAlbumin())); | |
| 816 | 864 | }else{ |
| 817 | - ps.setNull(62,Types.INTEGER); | |
| 865 | + ps.setNull(62,Types.DOUBLE); | |
| 818 | 866 | } |
| 819 | 867 | if(antExChuModel.getTotalBilirubin() != null){ |
| 820 | 868 | ps.setDouble(63, Double.parseDouble(antExChuModel.getTotalBilirubin())); |
| ... | ... | @@ -4563,6 +4611,20 @@ |
| 4563 | 4611 | saveEtDa(startDate, endDate); |
| 4564 | 4612 | saveXsrFs(startDate, endDate); |
| 4565 | 4613 | saveEb(startDate, endDate); |
| 4614 | + } | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + public boolean isDouble(String str) | |
| 4618 | + { | |
| 4619 | + try | |
| 4620 | + { | |
| 4621 | + Double.parseDouble(str); | |
| 4622 | + return true; | |
| 4623 | + } | |
| 4624 | + catch(NumberFormatException ex){ | |
| 4625 | + return false; | |
| 4626 | + } | |
| 4627 | + | |
| 4566 | 4628 | } |
| 4567 | 4629 | |
| 4568 | 4630 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/ConnTools.java
View file @
ff726f2
| ... | ... | @@ -60,6 +60,13 @@ |
| 60 | 60 | private static String jbgwPassword = "LYMS_QHD_JBGW"; |
| 61 | 61 | |
| 62 | 62 | |
| 63 | + private static String tyDirverClassName = "oracle.jdbc.driver.OracleDriver"; | |
| 64 | + private static String tyUrl = "jdbc:oracle:thin:@13.14.12.82:1526:orcl"; | |
| 65 | + private static String tyUser = "dzhy"; | |
| 66 | + private static String tyPassword = "sjzDzhy975"; | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 63 | 70 | public static Connection makeHisConnection() { |
| 64 | 71 | Connection conn = null; |
| 65 | 72 | try { |
| ... | ... | @@ -130,6 +137,23 @@ |
| 130 | 137 | } |
| 131 | 138 | try { |
| 132 | 139 | conn = DriverManager.getConnection(jbgwUrl, jbgwUser, jbgwPassword); |
| 140 | + } catch (SQLException e) { | |
| 141 | + e.printStackTrace(); | |
| 142 | + } | |
| 143 | + return conn; | |
| 144 | + } | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + public static Connection makeQhdTyConnection() { | |
| 149 | + Connection conn = null; | |
| 150 | + try { | |
| 151 | + Class.forName(tyDirverClassName); | |
| 152 | + } catch (ClassNotFoundException e) { | |
| 153 | + e.printStackTrace(); | |
| 154 | + } | |
| 155 | + try { | |
| 156 | + conn = DriverManager.getConnection(tyUrl, tyUser, tyPassword); | |
| 133 | 157 | } catch (SQLException e) { |
| 134 | 158 | e.printStackTrace(); |
| 135 | 159 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdTyInterface.java
View file @
ff726f2
| 1 | +package com.lyms.hospitalapi.qhdfy; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
| 4 | +import com.lyms.platform.biz.service.PatientsService; | |
| 5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 6 | +import com.lyms.platform.common.enums.YnEnums; | |
| 7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 8 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 9 | +import com.lyms.platform.operate.web.utils.CommonsHelper; | |
| 10 | +import com.lyms.platform.operate.web.utils.ResolveUtils; | |
| 11 | +import com.lyms.platform.permission.model.Organization; | |
| 12 | +import com.lyms.platform.permission.model.Users; | |
| 13 | +import com.lyms.platform.permission.service.OrganizationService; | |
| 14 | +import com.lyms.platform.permission.service.UsersService; | |
| 15 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 16 | +import com.lyms.platform.pojo.Patients; | |
| 17 | +import org.apache.commons.collections.MapUtils; | |
| 18 | +import org.apache.commons.lang.StringUtils; | |
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 20 | +import org.springframework.stereotype.Service; | |
| 21 | + | |
| 22 | +import java.sql.*; | |
| 23 | +import java.util.Map; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * Created by Administrator on 2018/8/27. | |
| 27 | + */ | |
| 28 | +@Service("qhdTyInterface") | |
| 29 | +public class QhdTyInterface { | |
| 30 | + | |
| 31 | + @Autowired | |
| 32 | + private BasicConfigService basicConfigService; | |
| 33 | + @Autowired | |
| 34 | + private PatientsService patientsService; | |
| 35 | + @Autowired | |
| 36 | + private UsersService usersService; | |
| 37 | + @Autowired | |
| 38 | + private OrganizationService organizationService; | |
| 39 | + | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 基本信息 | |
| 43 | + * @param patient | |
| 44 | + * @return | |
| 45 | + */ | |
| 46 | + public BaseObjectResponse savePERSONS(Patients patient){ | |
| 47 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 48 | + Connection conn = ConnTools.makeQhdTyConnection(); | |
| 49 | + PreparedStatement ps = null; | |
| 50 | + ResultSet rs = null; | |
| 51 | + int result = 0; | |
| 52 | + try{ | |
| 53 | + if(patient != null){ | |
| 54 | + String selSql = "select count(*) from PERSONS where PK='"+patient.getId()+"'"; | |
| 55 | + ps = conn.prepareStatement(selSql); | |
| 56 | + rs = ps.executeQuery(); | |
| 57 | + while(rs.next()){ | |
| 58 | + result = rs.getInt(1); | |
| 59 | + } | |
| 60 | + if(result > 0){ | |
| 61 | + String delSql = "delete from PERSONS where PK='"+patient.getId()+"'"; | |
| 62 | + ps = conn.prepareStatement(delSql); | |
| 63 | + int delCount = ps.executeUpdate(); | |
| 64 | + if(delCount > 0){ | |
| 65 | + System.out.print("基本信息数据删除完毕,请重新插入数据!"); | |
| 66 | + } | |
| 67 | + } | |
| 68 | + //户籍地址 | |
| 69 | + String hjSheng = CommonsHelper.getName1(patient.getProvinceId(), basicConfigService); | |
| 70 | + String hjShi = CommonsHelper.getName1(patient.getCityId(), basicConfigService); | |
| 71 | + String hjXian = CommonsHelper.getName1(patient.getAreaId(), basicConfigService); | |
| 72 | + String hjXiang = CommonsHelper.getName1(patient.getStreetId(), basicConfigService); | |
| 73 | + String hQuan = hjSheng+hjShi+hjXian+hjXiang; | |
| 74 | + //插入数据 | |
| 75 | + String inSql = "insert into PERSONS(PK,XM,XB_DM,CSRQ,SFZJLB,SFZHM,MZ_DM,HKXZ_DM,HYZK_DM,DWXZ_DM,GZDW,HJDDZ,\n" + | |
| 76 | + "HJDDM,HYS,SYS,XYZNS,CREATEDATE,SOURCE,MODIFYDATE) " + | |
| 77 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
| 78 | + ps = conn.prepareStatement(inSql); | |
| 79 | + ps.setString(1,patient.getId()); | |
| 80 | + ps.setString(2,patient.getUsername()); | |
| 81 | + ps.setString(3,"1"); | |
| 82 | + ps.setDate(4, new Date(patient.getBirth().getTime())); | |
| 83 | + ps.setString(5, "1"); | |
| 84 | + ps.setString(6, patient.getCardNo()); | |
| 85 | + ps.setString(7, null); | |
| 86 | + ps.setString(8, null); | |
| 87 | + ps.setString(9, null); | |
| 88 | + ps.setString(10, null); | |
| 89 | + ps.setString(11,null); | |
| 90 | + ps.setString(12,hQuan); | |
| 91 | + ps.setString(13,null); | |
| 92 | + ps.setString(14,null); | |
| 93 | + ps.setString(15,null); | |
| 94 | + ps.setString(16,null); | |
| 95 | + ps.setDate(17,new Date(patient.getCreated().getTime())); | |
| 96 | + ps.setString(18,null); | |
| 97 | + if(patient.getModified() != null){ | |
| 98 | + ps.setDate(19,new Date(patient.getModified().getTime())); | |
| 99 | + }else{ | |
| 100 | + ps.setNull(19, Types.DATE); | |
| 101 | + } | |
| 102 | + int inCount = ps.executeUpdate(); | |
| 103 | + if(inCount > 0){ | |
| 104 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 105 | + br.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
| 106 | + return br; | |
| 107 | + } | |
| 108 | + } | |
| 109 | + }catch (Exception e){ | |
| 110 | + e.printStackTrace(); | |
| 111 | + }finally { | |
| 112 | + try{ | |
| 113 | + if(conn != null){ | |
| 114 | + conn.close(); | |
| 115 | + } | |
| 116 | + if(ps != null){ | |
| 117 | + ps.close(); | |
| 118 | + } | |
| 119 | + if(rs != null){ | |
| 120 | + rs.close(); | |
| 121 | + } | |
| 122 | + }catch (Exception e){ | |
| 123 | + e.printStackTrace(); | |
| 124 | + } | |
| 125 | + } | |
| 126 | + return null; | |
| 127 | + } | |
| 128 | + | |
| 129 | + | |
| 130 | + //初诊 | |
| 131 | + public BaseObjectResponse saveCHUZHENJIANCHA(AntExChuModel antExChuModel){ | |
| 132 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 133 | + Connection conn = ConnTools.makeQhdTyConnection(); | |
| 134 | + PreparedStatement ps = null; | |
| 135 | + ResultSet rs = null; | |
| 136 | + int result = 0; | |
| 137 | + try{ | |
| 138 | + if(antExChuModel != null){ | |
| 139 | + String selSql = "select count(*) from CHUZHENJIANCHA where ID='"+antExChuModel.getId()+"'"; | |
| 140 | + ps =conn.prepareStatement(selSql); | |
| 141 | + rs = ps.executeQuery(); | |
| 142 | + while(rs.next()){ | |
| 143 | + result = rs.getInt(1); | |
| 144 | + } | |
| 145 | + if(result > 0){ | |
| 146 | + String delSql = "delete from CHUZHENJIANCHA where ID='"+antExChuModel.getId()+"'"; | |
| 147 | + ps = conn.prepareStatement(delSql); | |
| 148 | + int delCount = ps.executeUpdate(); | |
| 149 | + if(delCount > 0){ | |
| 150 | + System.out.print("初诊数据删除完毕,请重新插入数据!"); | |
| 151 | + } | |
| 152 | + } | |
| 153 | + | |
| 154 | + Patients patients = patientsService.findOnePatientById(antExChuModel.getParentId()); | |
| 155 | + if(patients != null){ | |
| 156 | + //插入数据 | |
| 157 | + String inSql = "insert into CHUZHENJIANCHA(ID,DOCID,IDCARD,JCRQ,YZZS,YZTS,MCYJ,YCQ,JWSWU,JWSXZB,JWSSZJB,JWSGZJB,\n" + | |
| 158 | + "JWSGXY,JWSPX,JWSTNB,JWSQT,JWSQTNR,JZSWU,JZSYCXBS,JZSJSJB,JZSQT,JZSQTNR,GRSWU,GRSXY,GRSHJ,GRSFYYW,GRSJCYDYHWZ,\n" + | |
| 159 | + "GRSJCFSX,GRSQT,GRSQTNR,YMJZSWU,YMJZSFZYM,YMJZSYGYM,YMJZSMZYM,YMJZSPSFDS,YMJZSQT,YMJZSQTNR,YSFYWU,YSFYYOU,\n" + | |
| 160 | + "YSFYYQ1GY,YSFYYQ2GY,YSFYYQ3GY,YSFYYZQ1GY,YSFYYZQ2GY,YSFYYZQ3GY,BCRSYCQKWU,BCRSYCQKEX,BCRSYCQKOT,BCRSYCQKTT,\n" + | |
| 161 | + "BCRSYCQKYH,BCRSYCQKXM,BCRSYCQKFZ,BCRSYCQKYDCX,BCRSYCQKFT,BCRSYCQKGNYST,BCRSYCQKQT,BCRSYCQKQTNR,YWGMS,\n" + | |
| 162 | + "YWGMSBZ,FKSSS,YUNCI,CHANCI,YDFM,PGCCS,LIUCHAN,SITAI,SICHAN,XSESW,CSQX,SHENGAO,TIZHONG,BMI,XUEYADY,XUEYAGY,\n" + | |
| 163 | + "TZXZYCQK,TZFBYCQK,FKJCWYYCQK,FKJCYDYCQK,FKJCGJYCQK,FKJCZGYCQK,FKJCFJ,GDGD,FW,TAIXINLV,TAIFANGWEI,TAIXIANLU,\n" + | |
| 164 | + "XHDBZ,BXBJSZ,XXBJSZ,NDB,NT,NTT,NQX,NCGQT,XXABO,XXRH,XUETANG,BCHAO,XQGBZAM,XQGCZAM,BDB,ZDHS,JHDHS,YGBMKY,\n" + | |
| 165 | + "YGBMKT,YGEKY,YGEKT,YGHXKT,XQJG,XNSD,MDXQXSY,HIVKTJC,YDFMWWJYC,YDFMWDC,YDFMWJSJMJ,YDFMWQT,YDFMWQTNR,YDQJD,\n" + | |
| 166 | + "GWPF,GWYS,ZTPG,BJZDWU,JKZDGRWS,JKZDXL,JKZDYY,JKZDBLYX,JKZDXCGZ,JKZDQT,JKZDQTNR,ZHENDUAN,CHULIYIJIAN,ZZYUANYIN,\n" + | |
| 167 | + "ZZJGJKS,YSQM,YYJCRQ,JCJGMC) " + | |
| 168 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\n" + | |
| 169 | + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\n" + | |
| 170 | + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
| 171 | + String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), antExChuModel.getCheckTime()); | |
| 172 | + int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); | |
| 173 | + int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); | |
| 174 | + ps.setString(1,antExChuModel.getId()); | |
| 175 | + ps.setString(2,patients.getId()); | |
| 176 | + ps.setString(3, patients.getCardNo()); | |
| 177 | + ps.setDate(4, new Date(antExChuModel.getCheckTime().getTime())); | |
| 178 | + ps.setInt(5, week); | |
| 179 | + ps.setInt(6, day); | |
| 180 | + ps.setDate(7, new Date(patients.getLastMenses().getTime())); | |
| 181 | + ps.setDate(8, new Date(patients.getDueDate().getTime())); | |
| 182 | + ps.setString(9, null); | |
| 183 | + ps.setString(10, null); | |
| 184 | + ps.setString(11, null); | |
| 185 | + ps.setString(12, null); | |
| 186 | + ps.setString(13, null); | |
| 187 | + ps.setString(14, null); | |
| 188 | + ps.setString(15, null); | |
| 189 | + ps.setString(16, null); | |
| 190 | + ps.setString(17, null); | |
| 191 | + ps.setString(18, null); | |
| 192 | + ps.setString(19, null); | |
| 193 | + ps.setString(20, null); | |
| 194 | + ps.setString(21, null); | |
| 195 | + ps.setString(22, null); | |
| 196 | + ps.setString(23, null); | |
| 197 | + ps.setString(24, null); | |
| 198 | + ps.setString(25, null); | |
| 199 | + ps.setString(26, null); | |
| 200 | + ps.setString(27, null); | |
| 201 | + ps.setString(28, null); | |
| 202 | + ps.setString(29, null); | |
| 203 | + ps.setString(30, null); | |
| 204 | + ps.setString(31, null); | |
| 205 | + ps.setString(32, null); | |
| 206 | + ps.setString(33, null); | |
| 207 | + ps.setString(34, null); | |
| 208 | + ps.setString(35, null); | |
| 209 | + ps.setString(36, null); | |
| 210 | + ps.setString(37, null); | |
| 211 | + ps.setString(38, null); | |
| 212 | + ps.setString(39, null); | |
| 213 | + ps.setString(40, null); | |
| 214 | + ps.setString(41, null); | |
| 215 | + ps.setString(42, null); | |
| 216 | + ps.setString(43, null); | |
| 217 | + ps.setString(44, null); | |
| 218 | + ps.setString(45, null); | |
| 219 | + ps.setString(46, null); | |
| 220 | + ps.setString(47, null); | |
| 221 | + ps.setString(48, null); | |
| 222 | + ps.setString(49, null); | |
| 223 | + ps.setString(50, null); | |
| 224 | + ps.setString(51, null); | |
| 225 | + ps.setString(52, null); | |
| 226 | + ps.setString(53, null); | |
| 227 | + ps.setString(54, null); | |
| 228 | + ps.setString(55, null); | |
| 229 | + ps.setString(56, null); | |
| 230 | + ps.setString(57, null); | |
| 231 | + ps.setString(58, null); | |
| 232 | + ps.setString(59, null); | |
| 233 | + ps.setString(60,null); | |
| 234 | + if(antExChuModel.getPregnancyTimes() != null){ | |
| 235 | + ps.setString(61,String.valueOf(antExChuModel.getPregnancyTimes())); | |
| 236 | + }else{ | |
| 237 | + ps.setString(61,null); | |
| 238 | + } | |
| 239 | + if(antExChuModel.getProdTime() != null){ | |
| 240 | + ps.setString(62,String.valueOf(antExChuModel.getProdTime())); | |
| 241 | + }else{ | |
| 242 | + ps.setString(62,null); | |
| 243 | + } | |
| 244 | + if(antExChuModel.getDelivery() != null){ | |
| 245 | + ps.setString(63,String.valueOf(antExChuModel.getDelivery())); | |
| 246 | + }else{ | |
| 247 | + ps.setString(63,null); | |
| 248 | + } | |
| 249 | + if(antExChuModel.getPlanedProd() != null){ | |
| 250 | + ps.setString(64,String.valueOf(antExChuModel.getPlanedProd())); | |
| 251 | + }else{ | |
| 252 | + ps.setString(64,null); | |
| 253 | + } | |
| 254 | + if(antExChuModel.getAbortion() != null){ | |
| 255 | + ps.setString(65,String.valueOf(antExChuModel.getAbortion())); | |
| 256 | + }else{ | |
| 257 | + ps.setString(65,null); | |
| 258 | + } | |
| 259 | + if(antExChuModel.getStillbirth() != null){ | |
| 260 | + ps.setString(66,String.valueOf(antExChuModel.getStillbirth())); | |
| 261 | + }else{ | |
| 262 | + ps.setString(66,null); | |
| 263 | + } | |
| 264 | + if(antExChuModel.getStillChan() != null){ | |
| 265 | + ps.setString(67,String.valueOf(antExChuModel.getStillChan())); | |
| 266 | + }else{ | |
| 267 | + ps.setString(67,null); | |
| 268 | + } | |
| 269 | + if(antExChuModel.getNeoDeath() != null){ | |
| 270 | + ps.setString(68,String.valueOf(antExChuModel.getNeoDeath())); | |
| 271 | + }else{ | |
| 272 | + ps.setString(68,null); | |
| 273 | + } | |
| 274 | + if(antExChuModel.getBirthDefect() != null){ | |
| 275 | + ps.setString(69,String.valueOf(antExChuModel.getBirthDefect())); | |
| 276 | + }else{ | |
| 277 | + ps.setString(69,null); | |
| 278 | + } | |
| 279 | + if(antExChuModel.getHeight() != null){ | |
| 280 | + ps.setString(70,String.valueOf(antExChuModel.getHeight())); | |
| 281 | + }else{ | |
| 282 | + ps.setString(70,null); | |
| 283 | + } | |
| 284 | + if(antExChuModel.getWeight() != null){ | |
| 285 | + ps.setString(71,String.valueOf(antExChuModel.getWeight())); | |
| 286 | + }else{ | |
| 287 | + ps.setString(71,null); | |
| 288 | + } | |
| 289 | + if(antExChuModel.getHeight() != null && antExChuModel.getWeight() != null){ | |
| 290 | + Double wh = Double.parseDouble(antExChuModel.getHeight()) / 100; | |
| 291 | + Double shen = wh * wh; | |
| 292 | + Double bmi = Double.parseDouble(antExChuModel.getWeight()) / shen; | |
| 293 | + ps.setString(72,String.valueOf(bmi)); | |
| 294 | + }else{ | |
| 295 | + ps.setString(72,null); | |
| 296 | + } | |
| 297 | + String ssy = null; | |
| 298 | + String szy = null; | |
| 299 | + if(antExChuModel.getBp() != null){ | |
| 300 | + Map<String, String> chBpMap = JsonUtil.getMap(antExChuModel.getBp()); | |
| 301 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
| 302 | + ssy = chBpMap.get("ssy"); | |
| 303 | + szy = chBpMap.get("szy"); | |
| 304 | + } | |
| 305 | + ps.setString(73,ssy); | |
| 306 | + ps.setString(74,szy); | |
| 307 | + }else{ | |
| 308 | + ps.setString(73,ssy); | |
| 309 | + ps.setString(74,szy); | |
| 310 | + } | |
| 311 | + ps.setString(75,antExChuModel.getHeart()); | |
| 312 | + ps.setString(76,antExChuModel.getLungs()); | |
| 313 | + ps.setString(77,antExChuModel.getVulva()); | |
| 314 | + ps.setString(78,antExChuModel.getVagina()); | |
| 315 | + ps.setString(79,antExChuModel.getCervical()); | |
| 316 | + ps.setString(80,antExChuModel.getUterus()); | |
| 317 | + ps.setString(81,antExChuModel.getFujian()); | |
| 318 | + ps.setString(82,antExChuModel.getGonggao()); | |
| 319 | + ps.setString(83,antExChuModel.getFuwei()); | |
| 320 | + ps.setString(84,null); | |
| 321 | + ps.setString(85,null); | |
| 322 | + ps.setString(86,null); | |
| 323 | + ps.setString(87,antExChuModel.getXhdb()); | |
| 324 | + ps.setString(88,antExChuModel.getBxbjs()); | |
| 325 | + ps.setString(89,antExChuModel.getPlatelet()); | |
| 326 | + ps.setString(90,antExChuModel.getNdb()); | |
| 327 | + ps.setString(91,antExChuModel.getNt()); | |
| 328 | + ps.setString(92,antExChuModel.getUrineKetone()); | |
| 329 | + ps.setString(93,antExChuModel.getBld()); | |
| 330 | + ps.setString(94,antExChuModel.getNcgOther()); | |
| 331 | + ps.setString(95,antExChuModel.getAbo()); | |
| 332 | + ps.setString(96,antExChuModel.getRh()); | |
| 333 | + ps.setString(97,antExChuModel.getBloodSugar()); | |
| 334 | + ps.setString(98,antExChuModel.getbChao()); | |
| 335 | + ps.setString(99,antExChuModel.getXqgbzam()); | |
| 336 | + ps.setString(100,antExChuModel.getXqgczam()); | |
| 337 | + ps.setString(101,antExChuModel.getAlbumin()); | |
| 338 | + ps.setString(102,antExChuModel.getTotalBilirubin()); | |
| 339 | + ps.setString(103,antExChuModel.getJhBilirubin()); | |
| 340 | + ps.setString(104,antExChuModel.getYgbmky()); | |
| 341 | + ps.setString(105,antExChuModel.getYgbmkt()); | |
| 342 | + ps.setString(106,antExChuModel.getYgeky()); | |
| 343 | + ps.setString(107,antExChuModel.getYgekt()); | |
| 344 | + ps.setString(108,antExChuModel.getYghxkt()); | |
| 345 | + ps.setString(109,antExChuModel.getXqjq()); | |
| 346 | + ps.setString(110,antExChuModel.getXnsd()); | |
| 347 | + ps.setString(111,antExChuModel.getSyjg()); | |
| 348 | + ps.setString(112,antExChuModel.getHivkt()); | |
| 349 | + String ydfmw = ""; | |
| 350 | + String ydqjd = ""; | |
| 351 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getYdfmw())) | |
| 352 | + | |
| 353 | + { | |
| 354 | + Map ydfmwMap = JsonUtil.str2Obj(antExChuModel.getYdfmw(), Map.class); | |
| 355 | + ydfmw = ResolveUtils.replaceYDFMW(ydfmwMap, 1); | |
| 356 | + ydqjd = ResolveUtils.replaceYDFMW(ydfmwMap, 2); | |
| 357 | + } | |
| 358 | + | |
| 359 | + ps.setString(113,null); | |
| 360 | + ps.setString(114,null); | |
| 361 | + ps.setString(115,null); | |
| 362 | + ps.setString(116,null); | |
| 363 | + ps.setString(117,null); | |
| 364 | + ps.setString(118,ydqjd); | |
| 365 | + ps.setNull(119, Types.INTEGER); | |
| 366 | + ps.setString(120, null); | |
| 367 | + ps.setString(121, null); | |
| 368 | + ps.setString(122, null); | |
| 369 | + ps.setString(123, null); | |
| 370 | + ps.setString(124, null); | |
| 371 | + ps.setString(125, null); | |
| 372 | + ps.setString(126, null); | |
| 373 | + ps.setString(127, null); | |
| 374 | + ps.setString(128, null); | |
| 375 | + ps.setString(129, null); | |
| 376 | + ps.setString(130,antExChuModel.getDiagnosis()); | |
| 377 | + ps.setString(131,antExChuModel.getTreatOpinion()); | |
| 378 | + ps.setString(132,null); | |
| 379 | + ps.setString(133,null); | |
| 380 | + String checkDoctor = ""; | |
| 381 | + | |
| 382 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getProdDoctor())) { | |
| 383 | + Users users = usersService.getUsers(Integer.parseInt(antExChuModel.getProdDoctor())); | |
| 384 | + if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 385 | + checkDoctor = users.getName(); | |
| 386 | + } | |
| 387 | + } | |
| 388 | + ps.setString(134, checkDoctor); | |
| 389 | + if(antExChuModel.getNextCheckTime() != null){ | |
| 390 | + ps.setDate(135,new Date(antExChuModel.getNextCheckTime().getTime())); | |
| 391 | + }else{ | |
| 392 | + ps.setNull(135,Types.DATE); | |
| 393 | + } | |
| 394 | + String hospital = ""; | |
| 395 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getHospitalId())) { | |
| 396 | + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getHospitalId())); | |
| 397 | + if (organization != null && organization.getYn() == YnEnums.YES.getId()) { | |
| 398 | + hospital = organization.getName(); | |
| 399 | + } | |
| 400 | + } | |
| 401 | + ps.setString(136, hospital); | |
| 402 | + int inCount = ps.executeUpdate(); | |
| 403 | + if(inCount > 0){ | |
| 404 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 405 | + br.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
| 406 | + return br; | |
| 407 | + } | |
| 408 | + } | |
| 409 | + } | |
| 410 | + }catch (Exception e){ | |
| 411 | + e.printStackTrace(); | |
| 412 | + } | |
| 413 | + | |
| 414 | + | |
| 415 | + return null; | |
| 416 | + } | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
ff726f2
| ... | ... | @@ -726,8 +726,16 @@ |
| 726 | 726 | |
| 727 | 727 | Integer serviceType = 0; |
| 728 | 728 | Integer serviceStatus = 0; |
| 729 | + | |
| 730 | + if (patient.getServiceStatus() == null || (patient.getServiceStatus() == ServiceStatusEnums.NO_OPEN.getId() | |
| 731 | + && patient.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId())) | |
| 732 | + { | |
| 733 | + serviceType = ServiceTypeEnums.ALL_SERVICE.getId(); | |
| 734 | + serviceStatus = ServiceStatusEnums.ALL_NO_OPEN.getId(); | |
| 735 | + } | |
| 736 | + | |
| 729 | 737 | //根据服务状态和服务类型获取可以发送的模板 |
| 730 | - List<SmsTemplateModel> sendList = smsConfigFacade.getSendTemplateByServiceStatus(temps, serviceType, serviceStatus); | |
| 738 | + List<SmsTemplateModel> sendList = smsConfigFacade.getSendTemplateEqServiceStatus(temps, serviceType, serviceStatus); | |
| 731 | 739 | |
| 732 | 740 | if (CollectionUtils.isNotEmpty(temps)) { |
| 733 | 741 | if (CollectionUtils.isNotEmpty(sendList)) { |
| ... | ... | @@ -785,7 +793,6 @@ |
| 785 | 793 | mr.setServiceType((templateModel.getTemplateType() == null || templateModel.getTemplateType() == 0) ? 1 : 3); //判断发送类型 |
| 786 | 794 | |
| 787 | 795 | mr.setTypeId(templateModel.getHealthType()); |
| 788 | - System.out.println("patient.getLastCheckEmployeeId()=" +doctorId); | |
| 789 | 796 | |
| 790 | 797 | |
| 791 | 798 | mr.setKeyword2(DateUtil.getymd()); |
| 792 | 799 | |
| ... | ... | @@ -847,8 +854,15 @@ |
| 847 | 854 | Integer serviceType = 0; |
| 848 | 855 | Integer serviceStatus = 0; |
| 849 | 856 | |
| 857 | + if (patient.getServiceStatus() == null || (patient.getServiceStatus() == ServiceStatusEnums.NO_OPEN.getId() | |
| 858 | + && patient.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId())) | |
| 859 | + { | |
| 860 | + serviceType = ServiceTypeEnums.ALL_SERVICE.getId(); | |
| 861 | + serviceStatus = ServiceStatusEnums.ALL_NO_OPEN.getId(); | |
| 862 | + } | |
| 863 | + | |
| 850 | 864 | //根据服务状态和服务类型获取可以发送的模板 |
| 851 | - List<SmsTemplateModel> sendList = smsConfigFacade.getSendTemplateByServiceStatus(temps, serviceType, serviceStatus); | |
| 865 | + List<SmsTemplateModel> sendList = smsConfigFacade.getSendTemplateEqServiceStatus(temps, serviceType, serviceStatus); | |
| 852 | 866 | |
| 853 | 867 | if (CollectionUtils.isNotEmpty(temps)) { |
| 854 | 868 | if (CollectionUtils.isNotEmpty(sendList)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsConfigFacade.java
View file @
ff726f2
| ... | ... | @@ -903,6 +903,20 @@ |
| 903 | 903 | } |
| 904 | 904 | |
| 905 | 905 | |
| 906 | + public List<SmsTemplateModel> getSendTemplateEqServiceStatus(List<SmsTemplateModel> temps,Integer serviceType,Integer serviceStatus) | |
| 907 | + { | |
| 908 | + List<SmsTemplateModel> sendList = new ArrayList<>(); | |
| 909 | + if (CollectionUtils.isNotEmpty(temps) && serviceStatus != null && serviceType != null) { | |
| 910 | + for (SmsTemplateModel temp : temps) { | |
| 911 | + if (temp.getServiceType() == serviceType && temp.getServiceStatus() == serviceStatus) { | |
| 912 | + sendList.add(temp); | |
| 913 | + } | |
| 914 | + } | |
| 915 | + } | |
| 916 | + return sendList; | |
| 917 | + } | |
| 918 | + | |
| 919 | + | |
| 906 | 920 | /** |
| 907 | 921 | * 判断对应服务是否启动 |
| 908 | 922 | * return 1 推送服务, 2 推送和短信服务 3短信服务, |