Commit f162c09e17d6192d996ba37b41781c1bdb0c4f4a

Authored by liquanyu
1 parent 76714c917b

update

Showing 9 changed files with 108 additions and 94 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ f162c09
... ... @@ -295,6 +295,18 @@
295 295 //辅助建档医生id
296 296 private String assistUserId;
297 297  
  298 +
  299 + //乡镇卫生机构id
  300 + private String townOrgId;
  301 +
  302 + public String getTownOrgId() {
  303 + return townOrgId;
  304 + }
  305 +
  306 + public void setTownOrgId(String townOrgId) {
  307 + this.townOrgId = townOrgId;
  308 + }
  309 +
298 310 public String getAssistUserId() {
299 311 return assistUserId;
300 312 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java View file @ f162c09
... ... @@ -9,9 +9,7 @@
9 9 import com.lyms.platform.common.enums.YnEnums;
10 10 import com.lyms.platform.common.result.BaseObjectResponse;
11 11 import com.lyms.platform.common.result.BaseResponse;
12   -import com.lyms.platform.common.utils.DateUtil;
13   -import com.lyms.platform.common.utils.JsonUtil;
14   -import com.lyms.platform.common.utils.PropertiesUtil;
  12 +import com.lyms.platform.common.utils.*;
15 13 import com.lyms.platform.operate.web.facade.ViewFacade;
16 14 import com.lyms.platform.operate.web.result.MatdeliverFollowResult;
17 15 import com.lyms.platform.operate.web.utils.CommonsHelper;
18 16  
... ... @@ -371,14 +369,8 @@
371 369  
372 370 } catch (Exception e) {
373 371  
374   - /*try{
375   - conn.rollback();//出现错误回滚事务
376   - }catch (SQLException exc){
377   - exc.printStackTrace();
378   - }*/
  372 + ExceptionUtils.catchException(e, "saveBaseInfo error.");
379 373  
380   - e.printStackTrace();
381   -
382 374 } finally {
383 375 try{
384 376 if(conn != null){
... ... @@ -1095,13 +1087,7 @@
1095 1087 }
1096 1088  
1097 1089 }catch (Exception e){
1098   - /*try{
1099   - conn.rollback();//出现错误回滚事务
1100   - }catch (SQLException exc){
1101   - exc.printStackTrace();
1102   - }*/
1103   -
1104   - e.printStackTrace();
  1090 + ExceptionUtils.catchException(e, "saveWoman_Prefirstvisit error.");
1105 1091 }finally {
1106 1092 try{
1107 1093 if(conn != null){
... ... @@ -1383,7 +1369,7 @@
1383 1369 }
1384 1370  
1385 1371 }catch (Exception e){
1386   - e.printStackTrace();
  1372 + ExceptionUtils.catchException(e, "saveWoman_Preothervisit error.");
1387 1373 }finally {
1388 1374 try{
1389 1375 if(conn != null){
... ... @@ -2249,7 +2235,7 @@
2249 2235  
2250 2236 }
2251 2237 }catch (Exception e){
2252   - e.printStackTrace();
  2238 + ExceptionUtils.catchException(e, "saveWomen_Delivery error.");
2253 2239 }finally {
2254 2240 try{
2255 2241 if(conn != null){
... ... @@ -2480,7 +2466,7 @@
2480 2466 }
2481 2467  
2482 2468 }catch (Exception e){
2483   - e.printStackTrace();
  2469 + ExceptionUtils.catchException(e, "saveWoman_Delivery_Infant error.");
2484 2470 }finally {
2485 2471 try{
2486 2472 if(conn != null){
... ... @@ -2702,7 +2688,7 @@
2702 2688  
2703 2689  
2704 2690 }catch (Exception e){
2705   - e.printStackTrace();
  2691 + ExceptionUtils.catchException(e, "saveWoman_Postvisit error.");
2706 2692 }finally {
2707 2693 try{
2708 2694 if(conn != null){
... ... @@ -2932,7 +2918,7 @@
2932 2918  
2933 2919  
2934 2920 }catch (Exception e){
2935   - e.printStackTrace();
  2921 + ExceptionUtils.catchException(e, "saveWoman_Post42Exam error.");
2936 2922 }finally {
2937 2923 try{
2938 2924 if(conn != null){
... ... @@ -3186,7 +3172,7 @@
3186 3172  
3187 3173 }
3188 3174 }catch (Exception e){
3189   - e.printStackTrace();
  3175 + ExceptionUtils.catchException(e, "saveChild_Info error.");
3190 3176 }finally {
3191 3177 try{
3192 3178 if(conn != null){
... ... @@ -3640,7 +3626,7 @@
3640 3626 }
3641 3627  
3642 3628 }catch (Exception e){
3643   - e.printStackTrace();
  3629 + ExceptionUtils.catchException(e, "saveChild_HomeVisit_Memo error.");
3644 3630 }finally {
3645 3631 try{
3646 3632 if(conn != null){
... ... @@ -4070,7 +4056,7 @@
4070 4056  
4071 4057  
4072 4058 }catch (Exception e){
4073   - e.printStackTrace();
  4059 + ExceptionUtils.catchException(e, "saveChild_HealthExam error.");
4074 4060 }finally {
4075 4061 try{
4076 4062 if(conn != null){
... ... @@ -4092,19 +4078,6 @@
4092 4078 }
4093 4079  
4094 4080  
4095   -
4096   -
4097   -
4098   -
4099   -
4100   -
4101   -
4102   -
4103   -
4104   -
4105   -
4106   -
4107   -
4108 4081 /**
4109 4082 * 数据转换
4110 4083 *
... ... @@ -4119,7 +4092,7 @@
4119 4092 matdeliverFollowResult.setMakeCreateUser(users.getName());
4120 4093 }
4121 4094 } catch (Exception e) {
4122   - e.printStackTrace();
  4095 + ExceptionUtils.catchException(e, "convertToResult error.");
4123 4096 }
4124 4097 }
4125 4098 //访视医生
... ... @@ -4130,7 +4103,7 @@
4130 4103 matdeliverFollowResult.setVisitDoctorStr(users.getName());
4131 4104 }
4132 4105 } catch (Exception e) {
4133   - e.printStackTrace();
  4106 + ExceptionUtils.catchException(e, "convertToResult error.");
4134 4107 }
4135 4108 }
4136 4109  
... ... @@ -4141,7 +4114,7 @@
4141 4114 matdeliverFollowResult.setReferHospitalStr(og.getName());
4142 4115 }
4143 4116 } catch (Exception e) {
4144   -
  4117 + ExceptionUtils.catchException(e, "convertToResult error.");
4145 4118 }
4146 4119 }
4147 4120  
... ... @@ -4153,7 +4126,7 @@
4153 4126 matdeliverFollowResult.setVisitCreateUserStr(users.getName());
4154 4127 }
4155 4128 } catch (Exception e) {
4156   - e.printStackTrace();
  4129 + ExceptionUtils.catchException(e, "convertToResult error.");
4157 4130 }
4158 4131 }
4159 4132 //修改人
... ... @@ -4164,7 +4137,7 @@
4164 4137 matdeliverFollowResult.setUpdateUserStr(users.getName());
4165 4138 }
4166 4139 } catch (Exception e) {
4167   - e.printStackTrace();
  4140 + ExceptionUtils.catchException(e, "convertToResult error.");
4168 4141 }
4169 4142 }
4170 4143 }
... ... @@ -4177,7 +4150,7 @@
4177 4150 */
4178 4151 public String findPersonInfoId(String JSONstr){
4179 4152  
4180   - //String url = "http://gxgg.greatsoft.net:8082/maternal/maternalFollowup/findPersonIsExist";
  4153 +// String url = "http://gxgg.greatsoft.net:8082/maternal/maternalFollowup/findPersonIsExist";
4181 4154 String url = "http://192.168.100.3:7076/maternal/test/findPersonIsExist";
4182 4155 DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
4183 4156 if(JSONstr != null){
4184 4157  
4185 4158  
... ... @@ -4201,13 +4174,10 @@
4201 4174  
4202 4175 return id;
4203 4176 }
4204   -
4205   -
4206 4177 }
4207 4178  
4208   -
4209 4179 }catch (Exception e){
4210   - e.printStackTrace();
  4180 + ExceptionUtils.catchException(e, "findPersonInfoId error.");
4211 4181 }finally {
4212 4182 client.close();
4213 4183 }
... ... @@ -4226,7 +4196,7 @@
4226 4196 */
4227 4197 public String saveMaternalInfo(String JSONstr){
4228 4198  
4229   - //String url = "http://gxgg.greatsoft.net:8082/ph-s-report/fyPerson/savePersonInfo";
  4199 +// String url = "http://gxgg.greatsoft.net:8082/ph-s-report/fyPerson/savePersonInfo";
4230 4200 String url = "http://192.168.100.3:7076/maternal/personInfo/savePersonInfo";
4231 4201 DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
4232 4202 if(JSONstr != null){
4233 4203  
... ... @@ -4249,14 +4219,13 @@
4249 4219 if(data != null){
4250 4220 JSONObject object = JSONObject.parseObject(data);
4251 4221 String id = object.getString("personInfoId");
4252   -
4253 4222 return id;
4254 4223 }
4255 4224  
4256 4225 }
4257 4226  
4258 4227 }catch (Exception e){
4259   - e.printStackTrace();
  4228 + ExceptionUtils.catchException(e,"saveMaternalInfo error.");
4260 4229 }
4261 4230  
4262 4231 }
... ... @@ -4264,7 +4233,6 @@
4264 4233 return null;
4265 4234 }
4266 4235  
4267   -
4268 4236 /**
4269 4237 *根据妇幼医院机构查询冠新对应的机构ID和名称和录入人ID姓名
4270 4238 * @param fyName
... ... @@ -4278,6 +4246,7 @@
4278 4246 Map<String,String> map = new HashMap<String,String>();
4279 4247  
4280 4248 if(fyName != null){
  4249 +
4281 4250 try{
4282 4251  
4283 4252 String sql = "select createOrgId,orgName,creator,creatorId from hospital where fyname = \'"+fyName+"\'";
... ... @@ -4287,7 +4256,7 @@
4287 4256 map.put("createOrgId",rs.getString("createOrgId"));
4288 4257 map.put("orgName",rs.getString("orgName"));
4289 4258 map.put("creator",rs.getString("creator"));
4290   - map.put("creatorId",rs.getString("creatorid"));
  4259 + map.put("creatorId",rs.getString("creatorId"));
4291 4260 }
4292 4261  
4293 4262 if(map.get("createOrgId") != null){
4294 4263  
4295 4264  
4296 4265  
4297 4266  
... ... @@ -4300,25 +4269,23 @@
4300 4269 }
4301 4270  
4302 4271 }catch (Exception e){
4303   - e.printStackTrace();
  4272 + ExceptionUtils.catchException(e,"get org info " + fyName +" error.");
4304 4273 }finally {
4305 4274 try{
4306   - if(conn != null){
4307   - conn.close();
  4275 + if(rs != null){
  4276 + rs.close();
4308 4277 }
4309 4278 if(ps != null){
4310 4279 ps.close();
4311 4280 }
4312   - if(rs != null){
4313   - rs.close();
  4281 + if(conn != null){
  4282 + conn.close();
4314 4283 }
4315 4284 }catch (Exception e){
4316 4285 e.printStackTrace();
4317 4286 }
4318 4287 }
4319   -
4320 4288 }
4321   -
4322 4289 return map;
4323 4290  
4324 4291 }
... ... @@ -4357,7 +4324,7 @@
4357 4324 try{
4358 4325 br = saveBaseInfo(patients);
4359 4326 }catch (Exception e){
4360   - e.printStackTrace();
  4327 + ExceptionUtils.catchException(e, "saveYf error.");
4361 4328 continue;
4362 4329 }
4363 4330  
... ... @@ -4386,7 +4353,7 @@
4386 4353 try{
4387 4354 br = saveWoman_Prefirstvisit(antExChuModel);
4388 4355 }catch (Exception e){
4389   - e.printStackTrace();
  4356 + ExceptionUtils.catchException(e, "saveChuZhen error.");
4390 4357 continue;
4391 4358 }
4392 4359  
... ... @@ -4414,7 +4381,7 @@
4414 4381 try{
4415 4382 br = saveWoman_Preothervisit(antenatalExaminationModel);
4416 4383 }catch (Exception e){
4417   - e.printStackTrace();
  4384 + ExceptionUtils.catchException(e, "saveFuZhen error.");
4418 4385 continue;
4419 4386 }
4420 4387  
... ... @@ -4442,7 +4409,8 @@
4442 4409 try{
4443 4410 br = saveWomen_Delivery(maternalDeliverModel);
4444 4411 }catch (Exception e){
4445   - e.printStackTrace();
  4412 + ExceptionUtils.catchException(e, "saveFm error.");
  4413 + continue;
4446 4414 }
4447 4415  
4448 4416 }
... ... @@ -4469,7 +4437,7 @@
4469 4437 try{
4470 4438 br = saveWoman_Postvisit(matdeliverFollowModel);
4471 4439 }catch (Exception e){
4472   - e.printStackTrace();
  4440 + ExceptionUtils.catchException(e, "saveChFs error.");
4473 4441 continue;
4474 4442 }
4475 4443  
... ... @@ -4496,7 +4464,7 @@
4496 4464 try{
4497 4465 br = saveWoman_Post42Exam(postReviewModel);
4498 4466 }catch (Exception e){
4499   - e.printStackTrace();
  4467 + ExceptionUtils.catchException(e, "saveChFc error.");
4500 4468 continue;
4501 4469 }
4502 4470  
... ... @@ -4524,7 +4492,7 @@
4524 4492 try{
4525 4493 br = saveChild_Info(babyModel);
4526 4494 }catch (Exception e){
4527   - e.printStackTrace();
  4495 + ExceptionUtils.catchException(e, "saveEtDa error.");
4528 4496 continue;
4529 4497 }
4530 4498  
... ... @@ -4551,7 +4519,7 @@
4551 4519 try{
4552 4520 br = saveChild_HomeVisit_Memo(newbornVisit);
4553 4521 }catch (Exception e){
4554   - e.printStackTrace();
  4522 + ExceptionUtils.catchException(e, "saveXsrFs error.");
4555 4523 continue;
4556 4524 }
4557 4525  
... ... @@ -4578,7 +4546,7 @@
4578 4546 try{
4579 4547 br = saveChild_HealthExam(babyCheckModel);
4580 4548 }catch (Exception e){
4581   - e.printStackTrace();
  4549 + ExceptionUtils.catchException(e, "saveEb error.");
4582 4550 continue;
4583 4551 }
4584 4552  
4585 4553  
... ... @@ -4592,26 +4560,9 @@
4592 4560  
4593 4561 public void handleWork() {
4594 4562 java.util.Date date = new java.util.Date();
  4563 + String startDate = DateUtil.getYyyyMmDd(date)+" 00:00:00";
  4564 + String endDate = DateUtil.getYyyyMmDd(date)+" 23:59:59";
4595 4565  
4596   - /*Calendar ca = Calendar.getInstance();
4597   - ca.setTime(end);
4598   - ca.add(Calendar.DATE,-1);
4599   - java.util.Date start = ca.getTime();*/
4600   - //java.util.Date start = new java.util.Date(end.getTime()-1000*60*60);
4601   -
4602   -
4603   - /*Calendar c = Calendar.getInstance();
4604   - c.setTime(new java.util.Date());
4605   - c.add(Calendar.DATE, -1);
4606   - java.util.Date before = c.getTime();*/
4607   - String start = DateUtil.getYyyyMmDd(date)+" 00:00:00";
4608   - String end = DateUtil.getYyyyMmDd(date)+" 23:59:59";
4609   -
4610   - /*String startDate = DateUtil.getyyyy_MM_dd_hms(start);
4611   - String endDate = DateUtil.getyyyy_MM_dd_hms(end);*/
4612   -
4613   - String startDate = start;
4614   - String endDate = end;
4615 4566 System.out.println("start=" + startDate + "end=" + endDate);
4616 4567 saveYf(startDate, endDate);
4617 4568 saveChuZhen(startDate, endDate);
... ... @@ -4625,10 +4576,7 @@
4625 4576 }
4626 4577  
4627 4578  
4628   - public void test(String start,String end) {
4629   -
4630   - String startDate = start;
4631   - String endDate = end;
  4579 + public void test(String startDate,String endDate) {
4632 4580 System.out.println("start=" + startDate + "end=" + endDate);
4633 4581 saveYf(startDate, endDate);
4634 4582 saveChuZhen(startDate, endDate);
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/MaternalInfo.java View file @ f162c09
  1 +package com.lyms.hospitalapi.Cdfy;
  2 +
  3 +/**
  4 + * Created by Administrator on 2019-04-22.
  5 + */
  6 +public class MaternalInfo {
  7 +}
platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/RcGlxtService.java View file @ f162c09
... ... @@ -1222,8 +1222,8 @@
1222 1222  
1223 1223 //孕妇分娩信息
1224 1224 String fmInfoSql = "insert into PUERPERANT_RECORD(ID,PUERPERANT_NAME,PUERPERANT_ID_CARD,PREGNANT_TIMES,PUERPERANT_TIMES,BIRTH_TYPE,PREGNANCY,HIGH_RISK_FLAG" +
1225   - ",FETUS_NUMBER,REPORTER_DATE,DELIVER_DOCTOR,HOSPITAL,OPERATOR,OPERAT_TIME,CREATE_TIME,UPDATE_TIME) " +
1226   - " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  1225 + ",FETUS_NUMBER,REPORTER_DATE,DELIVER_DOCTOR,HOSPITAL,OPERATOR,OPERAT_TIME,CREATE_TIME,UPDATE_TIME,DELIVERY_DATE) " +
  1226 + " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
1227 1227 ps = conn.prepareStatement(fmInfoSql);
1228 1228 ps.setString(1,model.getId());
1229 1229 ps.setString(2,patients.getUsername());
... ... @@ -1310,6 +1310,7 @@
1310 1310 ps.setTimestamp(14, new Timestamp(model.getCreated().getTime()));
1311 1311 ps.setTimestamp(15, new Timestamp(model.getCreated().getTime()));
1312 1312 ps.setTimestamp(16, new Timestamp(model.getModified().getTime()));
  1313 + ps.setTimestamp(17, new Timestamp(model.getDueDate1().getTime()));
1313 1314  
1314 1315 int saveFmCount = ps.executeUpdate();
1315 1316 System.out.println("saveFmCount="+saveFmCount);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ f162c09
... ... @@ -1335,6 +1335,7 @@
1335 1335 patient.setHospitalId(yunRequest.getHospitalId());
1336 1336 patient.setYn(YnEnums.YES.getId());
1337 1337 patient.setSendCoupon(yunRequest.getSendCoupon());
  1338 + patient.setTownOrgId(yunRequest.getTownOrgId());
1338 1339  
1339 1340 return patient;
1340 1341 }
... ... @@ -1487,6 +1488,8 @@
1487 1488  
1488 1489 result.setPid(p.getPid());
1489 1490 result.setDueStatus(p.getDueStatus());
  1491 +
  1492 + result.setTownOrgId(p.getTownOrgId());
1490 1493 return result;
1491 1494 }
1492 1495  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ f162c09
... ... @@ -180,6 +180,26 @@
180 180 map.put("assistBuildUsers", list);
181 181  
182 182  
  183 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  184 + basicConfigQuery.setEnable(1);
  185 + basicConfigQuery.setTypeId("5cbd67f5f29960ef73349a70");
  186 +
  187 + List<Map> towns = new ArrayList<>();
  188 +
  189 + //所有数据
  190 + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
  191 +
  192 + if (CollectionUtils.isNotEmpty(basicConfigList)) {
  193 + for (BasicConfig model : basicConfigList) {
  194 + Map data = new HashMap();
  195 + data.put("id", model.getId());
  196 + data.put("name", model.getName());
  197 + towns.add(data);
  198 + }
  199 + }
  200 +
  201 + map.put("towns", towns);
  202 +
183 203 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
184 204 }
185 205  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ f162c09
... ... @@ -270,6 +270,8 @@
270 270  
271 271 map.put("filePath", filePath);
272 272  
  273 + map.put("townOrgName", getBasicConfig(data.getTownOrgId()));
  274 +
273 275 return map;
274 276 }
275 277  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java View file @ f162c09
... ... @@ -372,6 +372,17 @@
372 372 @NotEmpty(message = "填写日期")
373 373 private String fillDate;
374 374  
  375 + //乡镇卫生机构id
  376 + private String townOrgId;
  377 +
  378 + public String getTownOrgId() {
  379 + return townOrgId;
  380 + }
  381 +
  382 + public void setTownOrgId(String townOrgId) {
  383 + this.townOrgId = townOrgId;
  384 + }
  385 +
375 386 public List<String> getChildExtAddrs() {
376 387 return childExtAddrs;
377 388 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PregnantInfoResult.java View file @ f162c09
... ... @@ -32,6 +32,16 @@
32 32 private List<PatientSerResult> patientSerResults;
33 33  
34 34 private FilePathModel filePath;
  35 + //乡镇卫生机构id
  36 + private String townOrgId;
  37 +
  38 + public String getTownOrgId() {
  39 + return townOrgId;
  40 + }
  41 +
  42 + public void setTownOrgId(String townOrgId) {
  43 + this.townOrgId = townOrgId;
  44 + }
35 45  
36 46 public FilePathModel getFilePath() {
37 47 return filePath;