Commit afe610be41195f2dda774bcaad19900adc4aa014

Authored by liquanyu
1 parent c3ff908106

优惠劵

Showing 2 changed files with 66 additions and 41 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ afe610b
... ... @@ -531,7 +531,8 @@
531 531 restMap.put("vcCardNo", baby.getVcCardNo()); /** 就诊卡号 */
532 532 // restMap.put("cardNo", baby.getCardNo()); /** 证件号 */
533 533 restMap.put("cardNo", person.getCardNo()); /** 证件号 */
534   -
  534 + restMap.put("name", baby.getName()); /** 姓名 */
  535 + restMap.put("phone", baby.getMphone()); /** 手机号码 */
535 536 List<Patients> list = mongoTemplate.find(Query.query(Criteria.where("cardNo").is(person.getCardNo())).with(new Sort(Sort.Direction.DESC, "created")), Patients.class);
536 537 if (CollectionUtils.isNotEmpty(list)) {
537 538 restMap.put("pcerteTypeId", list.get(0).getPcerteTypeId()); /** 证件类型id */
... ... @@ -544,6 +545,9 @@
544 545 restMap.put("vcCardNo", patients.getVcCardNo()); /** 就诊卡号 */
545 546 restMap.put("cardNo", patients.getCardNo()); /** 证件号 */
546 547 restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */
  548 +
  549 + restMap.put("name", patients.getUsername()); /** 姓名 */
  550 + restMap.put("phone", patients.getPhone()); /** 手机号码 */
547 551 }
548 552 }
549 553 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java View file @ afe610b
... ... @@ -195,13 +195,14 @@
195 195  
196 196  
197 197 BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patient.getTownOrgId());
198   - String hospitalName = basicConfig == null ? "" : basicConfig.getName();
  198 + //String hospitalName = basicConfig == null ? "" : basicConfig.getName();
199 199  
200   - String code = getCodeByHospital(hospitalName);
  200 + String code = basicConfig.getCode();//getCodeByHospital(hospitalName);
201 201  
202 202 MaternalInfo maternalInfo = new MaternalInfo();
203 203 getNation(patient.getPnationId(),maternalInfo);
204 204  
  205 +
205 206 //执行插入个人基本信息表(BASEINFO)
206 207 ps = conn.prepareStatement(inBaseInfoSql);
207 208 ps.setString(1,code);
208 209  
... ... @@ -560,9 +561,10 @@
560 561  
561 562  
562 563 //智业中间库的医疗机构编码
563   - String hospital = basicConfigService.getOneBasicConfigById(patients.getTownOrgId()).getName();
  564 + BasicConfig basic = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
  565 + //String hospital =basic.getName();
564 566  
565   - String code = getCodeByHospital(hospital);
  567 + String code = basic.getCode();//getCodeByHospital(hospital);
566 568  
567 569 Map<String,String> gxMap = findGxHospitalById(patients.getId());
568 570 if(gxMap != null){
... ... @@ -817,7 +819,11 @@
817 819 ps.setNull(49,Types.DOUBLE);
818 820 }
819 821 if(antExChuModel.getPlatelet() != null){
820   - ps.setInt(50, Integer.parseInt(antExChuModel.getPlatelet()));
  822 + if (StringUtils.isNumeric(antExChuModel.getPlatelet()))
  823 + {
  824 + ps.setDouble(50, Double.parseDouble(antExChuModel.getPlatelet()));
  825 + }
  826 +
821 827 }else{
822 828 ps.setNull(50,Types.INTEGER);
823 829 }
824 830  
825 831  
826 832  
827 833  
828 834  
... ... @@ -1055,27 +1061,33 @@
1055 1061 ps.setString(90,creatorId);
1056 1062 ps.executeUpdate();
1057 1063  
  1064 + try {
1058 1065 //个人史
1059   - if (!"无".equals(map.get("personalHistory").toString()) && StringUtils.isNotEmpty(antExChuModel.getPersonalHistory())
1060   - && !"".equals(antExChuModel.getPersonalHistory())) {
  1066 + if (!"无".equals(map.get("personalHistory").toString()) && StringUtils.isNotEmpty(antExChuModel.getPersonalHistory())
  1067 + && !"".equals(antExChuModel.getPersonalHistory())) {
1061 1068  
1062   - String inPerSql = "insert into WOMAN_PREFIRST_PERSONAL(LAST_UPDATE_DTIME,ORG_CODE,PREN_VISIT_FORM_NO,\n" +
1063   - "ID,HARM_FACTOR_CODE) \n" +
1064   - "values(?,?,?,?,?)";
  1069 + String inPerSql = "insert into WOMAN_PREFIRST_PERSONAL(LAST_UPDATE_DTIME,ORG_CODE,PREN_VISIT_FORM_NO,\n" +
  1070 + "ID,HARM_FACTOR_CODE) \n" +
  1071 + "values(?,?,?,?,?)";
1065 1072  
1066   - ps = conn.prepareStatement(inPerSql);
1067   - ps.setDate(1, new Date(antExChuModel.getModified().getTime()));
1068   - ps.setString(2, code);
1069   - ps.setString(3, antExChuModel.getId());
1070   - ps.setString(4, antExChuModel.getId());
1071   - if(map.get("personalHistory") != null){
1072   - ps.setString(5, map.get("personalHistory").toString());
1073   - }else{
1074   - ps.setString(5, null);
  1073 + ps = conn.prepareStatement(inPerSql);
  1074 + ps.setDate(1, new Date(antExChuModel.getModified().getTime()));
  1075 + ps.setString(2, code);
  1076 + ps.setString(3, antExChuModel.getId());
  1077 + ps.setString(4, antExChuModel.getId());
  1078 + if(map.get("personalHistory") != null){
  1079 + ps.setString(5, map.get("personalHistory").toString());
  1080 + }else{
  1081 + ps.setString(5, "");
  1082 + }
  1083 + ps.executeUpdate();
1075 1084 }
1076   - ps.executeUpdate();
  1085 + }catch (Exception e)
  1086 + {
  1087 +
1077 1088 }
1078 1089  
  1090 + try {
1079 1091 //既往史
1080 1092 if (!"无".equals(map.get("pastHistory").toString()) && StringUtils.isNotEmpty(antExChuModel.getPastHistory())
1081 1093 && !"".equals(antExChuModel.getPastHistory())) {
1082 1094  
1083 1095  
1084 1096  
1085 1097  
1086 1098  
... ... @@ -1088,33 +1100,42 @@
1088 1100 ps.setString(2, code);
1089 1101 ps.setString(3, antExChuModel.getId());
1090 1102 ps.setString(4, antExChuModel.getId());
1091   - ps.setString(5, null);
  1103 + ps.setString(5, "");
1092 1104 ps.setDate(6, null);
1093   - if(map.get("pastHistory") != null){
  1105 + if (map.get("pastHistory") != null) {
1094 1106 ps.setString(7, map.get("pastHistory").toString());
1095   - }else{
  1107 + } else {
1096 1108 ps.setString(7, null);
1097 1109 }
1098 1110 ps.executeUpdate();
1099 1111  
1100 1112 }
  1113 + }catch (Exception e)
  1114 + {
1101 1115  
1102   - //家族史
1103   - if (!"无".equals(map.get("familyHistory").toString()) && StringUtils.isNotEmpty(antExChuModel.getFamilyHistory())
1104   - && !"".equals(antExChuModel.getFamilyHistory())) {
  1116 + }
1105 1117  
1106   - String inFamSql = "insert into WOMAN_PREFIRSTVISIT_FAMHIS(LAST_UPDATE_DTIME,ORG_CODE,PREN_VISIT_FORM_NO,\n" +
1107   - "ID,PATIENT_RELATION_CODE,FAMILY_DISEASE_HISTORY_CODE,FAMILY_PAST_DISEASE_CODE) \n" +
1108   - "values(?,?,?,?,?,?,?)";
1109   - ps = conn.prepareStatement(inFamSql);
1110   - ps.setDate(1, new Date(antExChuModel.getModified().getTime()));
1111   - ps.setString(2, code);
1112   - ps.setString(3, antExChuModel.getId());
1113   - ps.setString(4, antExChuModel.getId());
1114   - ps.setString(5, null);
1115   - ps.setString(6, null);
1116   - ps.setString(7, null);
1117   - ps.executeUpdate();
  1118 + try {
  1119 + //家族史
  1120 + if (!"无".equals(map.get("familyHistory").toString()) && StringUtils.isNotEmpty(antExChuModel.getFamilyHistory())
  1121 + && !"".equals(antExChuModel.getFamilyHistory())) {
  1122 +
  1123 + String inFamSql = "insert into WOMAN_PREFIRSTVISIT_FAMHIS(LAST_UPDATE_DTIME,ORG_CODE,PREN_VISIT_FORM_NO,\n" +
  1124 + "ID,PATIENT_RELATION_CODE,FAMILY_DISEASE_HISTORY_CODE,FAMILY_PAST_DISEASE_CODE) \n" +
  1125 + "values(?,?,?,?,?,?,?)";
  1126 + ps = conn.prepareStatement(inFamSql);
  1127 + ps.setDate(1, new Date(antExChuModel.getModified().getTime()));
  1128 + ps.setString(2, code);
  1129 + ps.setString(3, antExChuModel.getId());
  1130 + ps.setString(4, antExChuModel.getId());
  1131 + ps.setString(5, "");
  1132 + ps.setString(6, null);
  1133 + ps.setString(7, null);
  1134 + ps.executeUpdate();
  1135 +
  1136 + }
  1137 + }catch (Exception e)
  1138 + {
1118 1139  
1119 1140 }
1120 1141 return br;