Commit 0f3f62b4b816779451a936e5c60f0d68990c0c68
1 parent
d9b41e4da8
Exists in
master
and in
6 other branches
工位统计
Showing 3 changed files with 208 additions and 24 deletions
platform-common/src/main/java/com/lyms/platform/common/Test.java
View file @
0f3f62b
| ... | ... | @@ -13,29 +13,55 @@ |
| 13 | 13 | public class Test { |
| 14 | 14 | |
| 15 | 15 | public static void main(String[] args) throws UnsupportedEncodingException { |
| 16 | - System.out.println("河北省承德市宽城满族自治".substring(0,50)); | |
| 17 | -// Socket socket=null; | |
| 18 | -// PrintWriter out=null; | |
| 19 | -// BufferedReader in=null; | |
| 20 | -// String serverIP="127.0.0.1"; //服务器端ip地址 | |
| 21 | -// int port=9999; //服务器端端口号 | |
| 22 | -// try | |
| 23 | -// { | |
| 24 | -// socket=new Socket(serverIP,port); | |
| 25 | -// in=new BufferedReader(new InputStreamReader(socket.getInputStream())); | |
| 26 | -// out=new PrintWriter(socket.getOutputStream(),true); | |
| 27 | -// | |
| 28 | -// int number=(int)(Math.random()*10)+1; | |
| 29 | -// System.out.println("客户端正在发送的内容为:"+number); | |
| 30 | -// | |
| 31 | -// out.println(number); | |
| 32 | -// Thread.sleep(20L); | |
| 33 | -// } | |
| 34 | -// catch(IOException | InterruptedException e) | |
| 35 | -// { | |
| 36 | -// // TODO 自动生成的 catch 块 | |
| 37 | -// e.printStackTrace(); | |
| 38 | -// } | |
| 16 | + | |
| 17 | + String content = "R+1.5DS-0.75DCx19° L不出值 骨密度:标准值"; | |
| 18 | + | |
| 19 | + String rValue = null; | |
| 20 | + String rdsValue = null; | |
| 21 | + String rdcValue = null; | |
| 22 | + String lValue = null; | |
| 23 | + String ldsValue = null; | |
| 24 | + String ldcValue = null; | |
| 25 | + try | |
| 26 | + { | |
| 27 | + String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则 | |
| 28 | + if (StringUtils.isNotEmpty(content)) | |
| 29 | + { | |
| 30 | + content = content.toUpperCase(); | |
| 31 | + content = content.replaceAll(REGEX_CHINESE, ""); | |
| 32 | + if (content.contains("R+") && content.contains("DS") && content.contains("DCX") && content.contains("L+") ) | |
| 33 | + { | |
| 34 | + String[] arrays = content.split("L"); | |
| 35 | + if (arrays.length == 2) | |
| 36 | + { | |
| 37 | + String rds = arrays[0].trim(); | |
| 38 | + String[] rs = rds.split("DS"); | |
| 39 | + rValue = rs[0].replace("R",""); | |
| 40 | + String[] rdsx = rs[1].split("DCX"); | |
| 41 | + rdsValue = rdsx[0]; | |
| 42 | + rdcValue = rdsx[1].replace("°",""); | |
| 43 | + | |
| 44 | + | |
| 45 | + String lds = arrays[1].trim(); | |
| 46 | + String[] ls = lds.split("DS"); | |
| 47 | + lValue = ls[0]; | |
| 48 | + String[] ldsx = ls[1].split("DCX"); | |
| 49 | + ldsValue = ldsx[0]; | |
| 50 | + ldcValue = ldsx[1].replace("°",""); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + | |
| 54 | + } | |
| 55 | + }catch (Exception e) | |
| 56 | + { | |
| 57 | + | |
| 58 | + } | |
| 59 | + System.out.println(rValue); | |
| 60 | + System.out.println(rdsValue); | |
| 61 | + System.out.println(rdcValue); | |
| 62 | + System.out.println(lValue); | |
| 63 | + System.out.println(ldsValue); | |
| 64 | + System.out.println(ldcValue); | |
| 39 | 65 | } |
| 40 | 66 | |
| 41 | 67 | private static Date getStartTime() { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdPuerService.java
View file @
0f3f62b
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | PatientsQuery patientsQuery1 = new PatientsQuery(); |
| 94 | 94 | patientsQuery1.setYn(YnEnums.YES.getId()); |
| 95 | 95 | patientsQuery1.setType(1); // |
| 96 | - patientsQuery1.setCardNo(cardNo); | |
| 96 | + patientsQuery1.setCardNo(cardNo.toUpperCase()); | |
| 97 | 97 | List<Patients> pats = patientsService.queryPatient(patientsQuery1); |
| 98 | 98 | model.put("isBuild","未建档"); |
| 99 | 99 | model.put("buildHospital",""); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
0f3f62b
| ... | ... | @@ -5614,6 +5614,164 @@ |
| 5614 | 5614 | } |
| 5615 | 5615 | |
| 5616 | 5616 | |
| 5617 | + /** | |
| 5618 | + * 儿童检查页面其他里面填的听力筛查同步到检查页面增加的筛查字段 | |
| 5619 | + * @return | |
| 5620 | + */ | |
| 5621 | + @RequestMapping(value = "/addBabyTlscjg", method = RequestMethod.GET) | |
| 5622 | + @ResponseBody | |
| 5623 | + public String addBabyTlscjg() { | |
| 5624 | + | |
| 5625 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("2100001605") | |
| 5626 | + .and("babyCheckOther").regex(Pattern.compile("^.*DS.*$")).regex(Pattern.compile("^.*DC.*$")); | |
| 5627 | + List<BabyCheckModel> checkModels = mongoTemplate.find(new Query(criteria),BabyCheckModel.class); | |
| 5628 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 5629 | + { | |
| 5630 | + for (BabyCheckModel checkModel : checkModels) | |
| 5631 | + { | |
| 5632 | + String content = checkModel.getBabyCheckOther(); | |
| 5633 | + String rValue = null; | |
| 5634 | + String rdsValue = null; | |
| 5635 | + String rdcValue = null; | |
| 5636 | + String lValue = null; | |
| 5637 | + String ldsValue = null; | |
| 5638 | + String ldcValue = null; | |
| 5639 | + try | |
| 5640 | + { | |
| 5641 | + String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则 | |
| 5642 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(content)) | |
| 5643 | + { | |
| 5644 | + content = content.toUpperCase(); | |
| 5645 | + content = content.replaceAll(REGEX_CHINESE, ""); | |
| 5646 | + if (content.contains("R+") && content.contains("DS") && content.contains("DCX") && content.contains("L+") ) | |
| 5647 | + { | |
| 5648 | + String[] arrays = content.split("L"); | |
| 5649 | + if (arrays.length == 2) | |
| 5650 | + { | |
| 5651 | + String rds = arrays[0].trim(); | |
| 5652 | + String[] rs = rds.split("DS"); | |
| 5653 | + rValue = rs[0].replace("R",""); | |
| 5654 | + String[] rdsx = rs[1].split("DCX"); | |
| 5655 | + rdsValue = rdsx[0]; | |
| 5656 | + rdcValue = rdsx[1].replace("°",""); | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + String lds = arrays[1].trim(); | |
| 5660 | + String[] ls = lds.split("DS"); | |
| 5661 | + lValue = ls[0]; | |
| 5662 | + String[] ldsx = ls[1].split("DCX"); | |
| 5663 | + ldsValue = ldsx[0]; | |
| 5664 | + ldcValue = ldsx[1].replace("°",""); | |
| 5665 | + } | |
| 5666 | + } | |
| 5667 | + | |
| 5668 | + } | |
| 5669 | + }catch (Exception e) | |
| 5670 | + { | |
| 5671 | + | |
| 5672 | + } | |
| 5673 | + checkModel.setLhdsr(rValue); | |
| 5674 | + checkModel.setLhdcr(rdsValue); | |
| 5675 | + checkModel.setLhaxisr(rdcValue); | |
| 5676 | + checkModel.setLhdsl(lValue); | |
| 5677 | + checkModel.setLhdcl(ldsValue); | |
| 5678 | + checkModel.setLhaxisl(ldcValue); | |
| 5679 | + | |
| 5680 | + System.out.println("听力筛查 update "+checkModel.getId()); | |
| 5681 | + Update update = MongoConvertHelper | |
| 5682 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel)); | |
| 5683 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update, | |
| 5684 | + BabyCheckModel.class); | |
| 5685 | + | |
| 5686 | + } | |
| 5687 | + } | |
| 5688 | + return "success"; | |
| 5689 | + } | |
| 5690 | + | |
| 5691 | + @RequestMapping(value = "/eyeCheckLh", method = RequestMethod.GET) | |
| 5692 | + @ResponseBody | |
| 5693 | + public void eyeCheckLh(HttpServletResponse response) { | |
| 5694 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("2100001605") | |
| 5695 | + .and("lhywgInfo").exists(false); | |
| 5696 | + List<LhBabyEyeCheck> models = mongoTemplate.find(new Query(criteria), LhBabyEyeCheck.class); | |
| 5697 | + if (CollectionUtils.isNotEmpty(models)) { | |
| 5698 | + for (LhBabyEyeCheck model : models) { | |
| 5699 | + model.setLhsmfy("1"); | |
| 5700 | + model.setLhswxw("1"); | |
| 5701 | + model.setLhhqsy("1"); | |
| 5702 | + Map<String,Object> data = new HashMap<>(); | |
| 5703 | + data.put("syqdxRight" , "1"); | |
| 5704 | + data.put("jmcxRight" , "1"); | |
| 5705 | + data.put("ybyfmwRight" , "1"); | |
| 5706 | + data.put("cxllRight" , "1"); | |
| 5707 | + data.put("hzRight" , "1"); | |
| 5708 | + data.put("scbdcRight" , "1"); | |
| 5709 | + data.put("tkbjzRight" , "1"); | |
| 5710 | + data.put("tkbyRight" , "1"); | |
| 5711 | + data.put("tkscbdcRight" , "1"); | |
| 5712 | + data.put("tkqfbRight" , "1"); | |
| 5713 | + data.put("syqdxLeft" , "1"); | |
| 5714 | + data.put("jmcxLeft" , "1"); | |
| 5715 | + data.put("ybyfmwLeft" , "1"); | |
| 5716 | + data.put("cxllLeft" , "1"); | |
| 5717 | + data.put("hzLeft" , "1"); | |
| 5718 | + data.put("scbdcLeft" , "1"); | |
| 5719 | + data.put("tkbjzLeft" , "1"); | |
| 5720 | + data.put("tkbyLeft" , "1"); | |
| 5721 | + data.put("tkscbdcLeft" , "1"); | |
| 5722 | + data.put("tkqfbLeft" , "1"); | |
| 5723 | + model.setLhywgInfo(data); | |
| 5724 | + | |
| 5725 | + Update update = MongoConvertHelper | |
| 5726 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
| 5727 | + System.out.println("眼保健默认"+model.getId()); | |
| 5728 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, | |
| 5729 | + LhBabyEyeCheck.class); | |
| 5730 | + } | |
| 5731 | + } | |
| 5732 | + } | |
| 5733 | + | |
| 5734 | + /** | |
| 5735 | + * | |
| 5736 | + */ | |
| 5737 | + @RequestMapping(value = "/handleBabyBirth", method = RequestMethod.GET) | |
| 5738 | + @ResponseBody | |
| 5739 | + public void handleBabyBirht(HttpServletResponse response) | |
| 5740 | + { | |
| 5741 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("2100001605") | |
| 5742 | + .and("birth").is(null).and("cardNo").exists(true); | |
| 5743 | + List<BabyModel> models = mongoTemplate.find(new Query(criteria),BabyModel.class); | |
| 5744 | + if (CollectionUtils.isNotEmpty(models)) | |
| 5745 | + { | |
| 5746 | + for(BabyModel model : models) | |
| 5747 | + { | |
| 5748 | + String cardNo = model.getCardNo(); | |
| 5749 | + if (StringUtils.isNotEmpty(cardNo) && cardNo.length() == 18) | |
| 5750 | + { | |
| 5751 | + try | |
| 5752 | + { | |
| 5753 | + Date birth = DateUtil.getBirthDayFromIdCard(cardNo); | |
| 5754 | + if (birth != null) | |
| 5755 | + { | |
| 5756 | + model.setBirth(birth); | |
| 5757 | + Update update = MongoConvertHelper | |
| 5758 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
| 5759 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, | |
| 5760 | + BabyModel.class); | |
| 5761 | + } | |
| 5762 | + }catch (Exception e) | |
| 5763 | + { | |
| 5764 | + continue; | |
| 5765 | + } | |
| 5766 | + } | |
| 5767 | + } | |
| 5768 | + } | |
| 5769 | + } | |
| 5770 | + | |
| 5771 | + | |
| 5772 | + | |
| 5773 | + | |
| 5774 | + | |
| 5617 | 5775 | @RequestMapping(value = "/exportHandleFmData", method = RequestMethod.GET) |
| 5618 | 5776 | @ResponseBody |
| 5619 | 5777 | public void exportHandleFmData(HttpServletResponse response,String start,String end) |