Commit dd7561e821147ae1ca3d5a92cc412c7652896f9f

Authored by liquanyu
1 parent e8d068eef5

工位

Showing 2 changed files with 75 additions and 48 deletions

platform-common/src/main/java/com/lyms/platform/common/Test.java View file @ dd7561e
... ... @@ -15,54 +15,66 @@
15 15 public static void main(String[] args) throws UnsupportedEncodingException {
16 16  
17 17  
18   - String content = "R+0.75DS-0.75DC×119°L+0.25DS-0.25DC×35°";
  18 +// String content = "R+0.75DS-0.75DC×119°L+0.25DS-0.25DC×35°";
  19 +//
  20 +// String rValue = null;
  21 +// String rdsValue = null;
  22 +// String rdcValue = null;
  23 +// String lValue = null;
  24 +// String ldsValue = null;
  25 +// String ldcValue = null;
  26 +// try
  27 +// {
  28 +// String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则
  29 +// if (StringUtils.isNotEmpty(content))
  30 +// {
  31 +// content = content.toUpperCase();
  32 +// content = content.replaceAll(REGEX_CHINESE, "");
  33 +// if (content.contains("R+") && content.contains("DS") && content.contains("DC") && content.contains("L+") )
  34 +// {
  35 +// String[] arrays = content.split("L");
  36 +// if (arrays.length == 2)
  37 +// {
  38 +// String rds = arrays[0].trim();
  39 +// String[] rs = rds.split("DS");
  40 +// rValue = rs[0].replace("R","");
  41 +// String[] rdsx = rs[1].split("DC");
  42 +// rdsValue = rdsx[0];
  43 +// rdcValue = rdsx[1].replace("°","");
  44 +//
  45 +//
  46 +// String lds = arrays[1].trim();
  47 +// String[] ls = lds.split("DS");
  48 +// lValue = ls[0];
  49 +// String[] ldsx = ls[1].split("DC");
  50 +// ldsValue = ldsx[0];
  51 +// ldcValue = ldsx[1].replace("°","");
  52 +// }
  53 +// }
  54 +//
  55 +// }
  56 +// }catch (Exception e)
  57 +// {
  58 +//
  59 +// }
  60 +// System.out.println(rValue);
  61 +// System.out.println(rdsValue);
  62 +// System.out.println(rdcValue);
  63 +// System.out.println(lValue);
  64 +// System.out.println(ldsValue);
  65 +// System.out.println(ldcValue);
19 66  
20   - String rValue = null;
21   - String rdsValue = null;
22   - String rdcValue = null;
23   - String lValue = null;
24   - String ldsValue = null;
25   - String ldcValue = null;
26   - try
27   - {
28   - String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则
29   - if (StringUtils.isNotEmpty(content))
30   - {
31   - content = content.toUpperCase();
32   - content = content.replaceAll(REGEX_CHINESE, "");
33   - if (content.contains("R+") && content.contains("DS") && content.contains("DC") && content.contains("L+") )
34   - {
35   - String[] arrays = content.split("L");
36   - if (arrays.length == 2)
37   - {
38   - String rds = arrays[0].trim();
39   - String[] rs = rds.split("DS");
40   - rValue = rs[0].replace("R","");
41   - String[] rdsx = rs[1].split("DC");
42   - rdsValue = rdsx[0];
43   - rdcValue = rdsx[1].replace("°","");
44   -
45   -
46   - String lds = arrays[1].trim();
47   - String[] ls = lds.split("DS");
48   - lValue = ls[0];
49   - String[] ldsx = ls[1].split("DC");
50   - ldsValue = ldsx[0];
51   - ldcValue = ldsx[1].replace("°","");
52   - }
53   - }
54   -
55   - }
56   - }catch (Exception e)
57   - {
58   -
59   - }
60   - System.out.println(rValue);
61   - System.out.println(rdsValue);
62   - System.out.println(rdcValue);
63   - System.out.println(lValue);
64   - System.out.println(ldsValue);
65   - System.out.println(ldcValue);
  67 + String str= "避孕保健 顺产后42天(产后6周)上环,如果是剖腹产是半年(产后6个月)上环。但是环的类型是由医生来决定的,因为上环的时候医生要考虑你宫腔大小等因素。\r\n营养 饮食上注意脂肪的摄入,每天70g左右即可,摄入脂肪过多会引起宝贝脂肪泻,过少则影响宝贝大脑发育。\r\n心理调节 缓解产妇情绪,家人特别是丈夫应加倍关心产妇,使家庭关系融洽、和谐,鼓励产妇表达自己的心情并与之交流,消除产妇孤独感。\r\n母乳喂养 如果在喂奶前给孩子喝水,孩子有了饱足感,就不会很好的吃母乳,减少了对产妇乳头的吸吮,影响了母乳的分泌量,渐渐的母乳减少,孩子不够吃,就添加母乳代用品,母乳喂养就会宣告失败。\r\n其他 恢复性生活时一定要小心谨慎,产妇虽然生殖器官恢复正常但内分泌可能还未恢复到妊娠前的状况,阴道组织脆嫩且薄弱,容易造成裂伤甚至大出血。\r\n";
  68 + String[] strs = str.split("\r\n");
  69 + StringBuffer sb = new StringBuffer();
  70 + for(int i = 0;i< strs.length;i++)
  71 + {
  72 + sb.append((i+1)+"、");
  73 + sb.append(strs[i]);
  74 + sb.append("\r\n");
  75 + }
  76 + System.out.println(sb.toString());
  77 + System.out.println(str);
66 78 }
67 79  
68 80 private static Date getStartTime() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ dd7561e
... ... @@ -4728,7 +4728,22 @@
4728 4728 getscreenResult(patients.getScreenResult(), map);
4729 4729  
4730 4730 map.put("treatOpinion", data.getTreatOpinion());
4731   - map.put("dirOpinion", data.getDirOpinion());
  4731 +
  4732 + String dirOpinion = "";
  4733 + if (StringUtils.isNotEmpty(data.getDirOpinion()))
  4734 + {
  4735 + String[] strs = data.getDirOpinion().split("\r\n");
  4736 + StringBuffer sb = new StringBuffer();
  4737 + for(int i = 0;i< strs.length;i++)
  4738 + {
  4739 + sb.append((i+1)+"、");
  4740 + sb.append(strs[i]);
  4741 + sb.append("\r\n");
  4742 + }
  4743 + dirOpinion = sb.toString();
  4744 + }
  4745 +
  4746 + map.put("dirOpinion", dirOpinion);
4732 4747  
4733 4748 /** 优惠券编号 */
4734 4749 map.put("couponCode", couponService.findByUsedId(id));