Commit 40bd32f5f755b647e841d8a03804b71753e4fff2

Authored by xujiahong
1 parent 979f470024
Exists in master

产检模块-日常提交

Showing 11 changed files with 249 additions and 44 deletions

parent/hospital.mac/src/main/java/com/lyms/hospital/entity/assist/DiagnoseAssit.java View file @ 40bd32f
... ... @@ -30,6 +30,12 @@
30 30 * 诊断类型:1婚前检查,2产检,【3儿保检查】
31 31 */
32 32 public static final int DIAGNOSE_TYPE_CHILD = 3;
  33 +
  34 + //常见数值: +,±,-
  35 + public static final int YIN = 1;
  36 + public static final int RUOYANG = 2;
  37 + public static final int YANG = 3;
  38 +
33 39  
34 40 /**
35 41 * (辅助检查)
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/diagnose/DiagnoseInfo.java View file @ 40bd32f
... ... @@ -19,6 +19,10 @@
19 19 public class DiagnoseInfo implements Serializable {
20 20  
21 21 private static final long serialVersionUID = 1L;
  22 +
  23 + //诊断类型,0为初诊,1为复诊
  24 + public static final int TYPE_FIRST = 1;
  25 + public static final int TYPE_SECOND = 2;
22 26  
23 27 /**
24 28 *
... ... @@ -249,6 +253,13 @@
249 253 @TableField(value = "HAS_DIAGNOSE")
250 254 private Integer hasDiagnose;
251 255  
  256 +
  257 +
  258 + //格式化字段======================
  259 + @TableField(exist = false)
  260 + private String diagnoseTimeStr;
  261 + @TableField(exist = false)
  262 + private String nextinspectTimeStr;
252 263  
253 264 public String getId() {
254 265 return id;
... ... @@ -608,6 +619,22 @@
608 619  
609 620 public void setHasDiagnose(Integer hasDiagnose) {
610 621 this.hasDiagnose = hasDiagnose;
  622 + }
  623 +
  624 + public String getDiagnoseTimeStr() {
  625 + return diagnoseTimeStr;
  626 + }
  627 +
  628 + public void setDiagnoseTimeStr(String diagnoseTimeStr) {
  629 + this.diagnoseTimeStr = diagnoseTimeStr;
  630 + }
  631 +
  632 + public String getNextinspectTimeStr() {
  633 + return nextinspectTimeStr;
  634 + }
  635 +
  636 + public void setNextinspectTimeStr(String nextinspectTimeStr) {
  637 + this.nextinspectTimeStr = nextinspectTimeStr;
611 638 }
612 639  
613 640  
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/history/HistorySource.java View file @ 40bd32f
... ... @@ -61,6 +61,12 @@
61 61 */
62 62 @TableField(value = "HAS_TEXT")
63 63 private Integer hasText;
  64 +
  65 + /**
  66 + * 一级节点是否需要换行(应前端要求,加的条件判断字段)
  67 + */
  68 + @TableField(exist = false)
  69 + private boolean needNewLine;
64 70  
65 71 /**
66 72 * 子级别元素
... ... @@ -139,6 +145,15 @@
139 145 public void setChildren(List<HistorySource> children) {
140 146 this.children = children;
141 147 }
  148 +
  149 + public boolean isNeedNewLine() {
  150 + return needNewLine;
  151 + }
  152 +
  153 + public void setNeedNewLine(boolean needNewLine) {
  154 + this.needNewLine = needNewLine;
  155 + }
  156 +
142 157  
143 158 }
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseInfoServiceImpl.java View file @ 40bd32f
... ... @@ -92,7 +92,7 @@
92 92 */
93 93 public DiagnoseInfo findByCond(int type, String cardNum) {
94 94 EntityWrapper<DiagnoseInfo> ew = new EntityWrapper<DiagnoseInfo>();
95   - ew.where("type={0}", type).and("BASE_PAPERS_NUMBER={0}", cardNum).orderBy("DIAGNOSE_TIME", Boolean.FALSE);
  95 + ew.where("TYPE={0}", type).and("BASE_PAPERS_NUMBER={0}", cardNum).orderBy("DIAGNOSE_TIME", Boolean.FALSE);
96 96 return (DiagnoseInfo) selectObj(ew);
97 97 }
98 98  
... ... @@ -108,7 +108,7 @@
108 108 */
109 109 public List<DiagnoseInfo> findListByPid(String pid) {
110 110 EntityWrapper<DiagnoseInfo> ew = new EntityWrapper<DiagnoseInfo>();
111   - ew.where("pid={0}", pid);
  111 + ew.where("PID={0}", pid);
112 112 return selectList(ew);
113 113 }
114 114  
... ... @@ -129,6 +129,7 @@
129 129 */
130 130 if (StringUtils.isEmpty(info.getId())) {// 新增
131 131 info.setId(StrUtils.uuid());
  132 + info.setType(DiagnoseInfo.TYPE_FIRST);// 诊断类型,0为初诊,1为复诊
132 133 this.insert(info);// 新增产检基本信息
133 134 if (StringUtils.isEmpty(assist.getId())) {
134 135 assist.setId(StrUtils.uuid());
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseTaiServiceImpl.java View file @ 40bd32f
... ... @@ -38,7 +38,7 @@
38 38 }
39 39 //delete
40 40 EntityWrapper<DiagnoseTai> wrapper = new EntityWrapper<DiagnoseTai>();
41   - wrapper.where("examId = {0}", examId);
  41 + wrapper.where("EXAM_ID = {0}", examId);
42 42 delete(wrapper);
43 43 //insert
44 44 Date now = new Date();
... ... @@ -54,7 +54,7 @@
54 54 @Override
55 55 public List<DiagnoseTai> getListByExamId(String examId) {
56 56 EntityWrapper<DiagnoseTai> wrapper = new EntityWrapper<DiagnoseTai>();
57   - wrapper.where("examId = {0}", examId);
  57 + wrapper.where("EXAM_ID = {0}", examId);
58 58 return this.selectList(wrapper);
59 59 }
60 60 }
parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java View file @ 40bd32f
... ... @@ -19,6 +19,7 @@
19 19 import com.lyms.hospital.service.history.HistoryMapsService;
20 20 import com.lyms.hospital.service.woman.WomanFetationRecordService;
21 21 import com.lyms.hospital.service.woman.WomanRecordService;
  22 +import com.lyms.util.StrUtils;
22 23  
23 24 /**
24 25 * <p>
25 26  
... ... @@ -71,10 +72,11 @@
71 72 return;
72 73 }
73 74 //delete
74   - delete(new EntityWrapper<HistoryMaps>().where("targetId={0}", targetId).and("targetType={0}", targetType));
  75 + delete(new EntityWrapper<HistoryMaps>().where("TARGET_ID={0}", targetId).and("TARGET_TYPE={0}", targetType));
75 76 //insert
76 77 for(int i=0;i<list.size();i++){
77 78 HistoryMaps hm = list.get(i);
  79 + hm.setId(StrUtils.uuid());
78 80 hm.setWomanPersonId(womanPersonId);//女性居民ID
79 81 hm.setTargetId(targetId);
80 82 hm.setTargetType(targetType);
... ... @@ -85,7 +87,7 @@
85 87 @Override
86 88 public List<HistoryMaps> getListByTarget(String targetId, Integer targetType) {
87 89 EntityWrapper<HistoryMaps> ew = new EntityWrapper<HistoryMaps>();
88   - ew.where("targetId={0}", targetId).and("targetType={0}", targetType);
  90 + ew.where("TARGET_ID={0}", targetId).and("TARGET_TYPE={0}", targetType);
89 91 return this.selectList(ew);
90 92 }
91 93 }
parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java View file @ 40bd32f
... ... @@ -7,6 +7,8 @@
7 7 import com.baomidou.mybatisplus.mapper.EntityWrapper;
8 8 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
9 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.util.StringUtils;
  11 +
10 12 import java.io.Serializable;
11 13 import java.util.List;
12 14 import java.util.Map;
... ... @@ -47,6 +49,13 @@
47 49 Map<String,HistorySource> level2Data = InstanceUtils.newHashMap();
48 50 for(HistorySource historySource : dbdataList){
49 51 if("1".equals(historySource.getLevel())){
  52 + //========处理needNewLine字段==========
  53 + if(!StringUtils.isEmpty(historySource.getName()) && historySource.getName().contains("<br/>")){
  54 + historySource.setNeedNewLine(true);
  55 + }else{
  56 + historySource.setNeedNewLine(false);
  57 + }
  58 + //========处理needNewLine字段==========
50 59 firstdataList.add(historySource);//最终只返回一级列表,其他层级以子类形式返回
51 60 firstLevelData.put(historySource.getId(), historySource);//一级对象
52 61 }
parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java View file @ 40bd32f
... ... @@ -30,6 +30,7 @@
30 30 import com.lyms.hospital.service.diagnose.DiagnoseInfoService;
31 31 import com.lyms.hospital.service.diagnose.DiagnoseTaiService;
32 32 import com.lyms.hospital.service.history.HistoryMapsService;
  33 +import com.lyms.hospital.service.token.TokenService;
33 34 import com.lyms.hospital.service.woman.WomanFetationRecordService;
34 35 import com.lyms.hospital.util.HospitalUtil;
35 36 import com.lyms.util.DateUtil;
... ... @@ -62,6 +63,8 @@
62 63 private DiagnoseTaiService diagnoseTaiService;
63 64 @Autowired
64 65 private HistoryMapsService historyMapsService;
  66 + @Autowired
  67 + private TokenService tokenService;
65 68  
66 69 /**
67 70 * <li>@Description:产检获取字典数据
... ... @@ -71,6 +74,7 @@
71 74 * <li>修改人:
72 75 * <li>修改时间:
73 76 */
  77 + @SuppressWarnings("serial")
74 78 @RequestMapping(value = "/antex/getenums", method = RequestMethod.GET)
75 79 @ResponseBody
76 80 public AjaxResult getDictionary() {
... ... @@ -89,18 +93,108 @@
89 93 //getFetPosition
90 94 data.put("getFetPosition", FetalPositionEnums.getList());
91 95 //字典常量=======================================
92   - //xx 血型
93   - data.put("xx", null);
94   - //getHighRisk 高危标签
95   - data.put("", null);
96   - //gwfz 高危分值(高危等级-->评分)
97   - data.put("", null);
98   - //ydqjd 阴道清洁度
99   - data.put("", null);
100   - //organizations 组织机构
101   - data.put("", null);
102   - //fxys 风险颜色
103   - data.put("", null);
  96 + //xx 血型-模拟数据 TODO
  97 + List<Map<String,Object>> xx = new ArrayList<>();
  98 + Map<String,Object> xx_map1 = new HashMap<String,Object>(){{
  99 + put("id", "xxa");
  100 + put("parentId", "5769eef90cf22c315757741f");
  101 + put("name", "A");
  102 + }};
  103 + xx.add(xx_map1);
  104 + Map<String,Object> xx_map2 = new HashMap<String,Object>(){{
  105 + put("id", "xxb");
  106 + put("parentId", "5769eef90cf22c315757741f");
  107 + put("name", "B");
  108 + }};
  109 + xx.add(xx_map2);
  110 + data.put("xx", xx);
  111 +
  112 + //getHighRisk 高危标签-模拟数据 TODO
  113 + List<Map<String,Object>> getHighRisk = new ArrayList<>();
  114 + Map<String,Object> getHighRisk_map1 = new HashMap<String,Object>(){{
  115 + put("id", "meidu");
  116 + put("parentId", "224b2329-cb82-4da3-a071-8527f8283aab");
  117 + put("code", "10");
  118 + put("name", "梅毒");
  119 + put("typeId","fb43fd5a-b153-4cb9-9180-c46f5612ba43");
  120 + put("color","risk_purple");
  121 + put("yn","1");
  122 + }};
  123 + getHighRisk.add(getHighRisk_map1);
  124 + Map<String,Object> getHighRisk_map2 = new HashMap<String,Object>(){{
  125 + put("id", "hiv");
  126 + put("parentId", "224b2329-cb82-4da3-a071-8527f8283aab");
  127 + put("code", "10");
  128 + put("name", "HIV");
  129 + put("typeId","fb43fd5a-b153-4cb9-9180-c46f5612ba43");
  130 + put("color","risk_purple");
  131 + put("yn","1");
  132 + }};
  133 + getHighRisk.add(getHighRisk_map2);
  134 + data.put("getHighRisk", getHighRisk);
  135 +
  136 + //gwfz 高危分值(高危等级-->评分)-模拟数据 TODO
  137 + List<Map<String,Object>> gwfz = new ArrayList<>();
  138 + Map<String,Object> gwfz_map1 = new HashMap<String,Object>(){{
  139 + put("id", "5769f0640cf2d37f034793a2");
  140 + put("parentId", "5769eef90cf22c3157577422");
  141 + put("name", "5");
  142 + }};
  143 + gwfz.add(gwfz_map1);
  144 + Map<String,Object> gwfz_map2 = new HashMap<String,Object>(){{
  145 + put("id", "5769f0640cf2d37f034793a3");
  146 + put("parentId", "5769eef90cf22c3157577422");
  147 + put("name", "10");
  148 + }};
  149 + gwfz.add(gwfz_map2);
  150 + data.put("gwfz", gwfz);
  151 +
  152 + //ydqjd 阴道清洁度-模拟数据 TODO
  153 + List<Map<String,Object>> ydqjd = new ArrayList<>();
  154 + Map<String,Object> ydqjd_map1 = new HashMap<String,Object>(){{
  155 + put("id", "5769ef930cf2d37f03479387");
  156 + put("parentId", "5769eef90cf22c3157577420");
  157 + put("name", "Ⅰ度");
  158 + }};
  159 + ydqjd.add(ydqjd_map1);
  160 + Map<String,Object> ydqjd_map2 = new HashMap<String,Object>(){{
  161 + put("id", "5769ef930cf2d37f03479390");
  162 + put("parentId", "5769eef90cf22c3157577420");
  163 + put("name", "Ⅱ度");
  164 + }};
  165 + ydqjd.add(ydqjd_map2);
  166 + data.put("ydqjd", ydqjd);
  167 +
  168 + //organizations 组织机构-模拟数据 TODO
  169 + List<Map<String,Object>> organizations = new ArrayList<>();
  170 + Map<String,Object> organizations_map1 = new HashMap<String,Object>(){{
  171 + put("id", "193");
  172 + put("name", "青龙妇幼保健院");
  173 + }};
  174 + organizations.add(organizations_map1);
  175 + Map<String,Object> organizations_map2 = new HashMap<String,Object>(){{
  176 + put("id", "195");
  177 + put("name", "昌黎妇幼保健院");
  178 + }};
  179 + organizations.add(organizations_map2);
  180 + data.put("organizations", organizations);
  181 +
  182 + //fxys 风险颜色-模拟数据 TODO
  183 + List<Map<String,Object>> fxys = new ArrayList<>();
  184 + Map<String,Object> fxys_map1 = new HashMap<String,Object>(){{
  185 + put("id", "zsyj");
  186 + put("parentId", "fb43fd5a-b153-4cb9-9180-c46f5612ba43");
  187 + put("name", "紫色预警");
  188 + }};
  189 + fxys.add(fxys_map1);
  190 + Map<String,Object> fxys_map2 = new HashMap<String,Object>(){{
  191 + put("id", "csyj");
  192 + put("parentId", "fb43fd5a-b153-4cb9-9180-c46f5612ba43");
  193 + put("name", "橙色预警");
  194 + }};
  195 + fxys.add(fxys_map2);
  196 + data.put("fxys", fxys);
  197 +
104 198 //cTime
105 199 data.put("cTime", DateUtil.getyyyy_MM_dd(new Date()));
106 200 //now
... ... @@ -133,6 +227,7 @@
133 227 List<HistoryMaps> historyList = historyMapsService.getListByTarget(info.getId(), HistoryMaps.TARGET_TYPE_EXAM);// 关联目标类型:1产检、2妇女建档
134 228 List<DiagnoseTai> taiList = diagnoseTaiService.getListByExamId(info.getId());
135 229  
  230 +
136 231 return AjaxResult.returnFail();
137 232 }
138 233  
... ... @@ -149,6 +244,10 @@
149 244 @ResponseBody
150 245 public AjaxResult saveFirstExam(@RequestBody ExamAddRequest request) {
151 246 /*
  247 + * 同一产程不能新增两次初诊:(如果条件是新增,根据孕妇档案ID WOMAN_ID 查询产检记录列表) TODO
  248 + */
  249 + //
  250 + /*
152 251 * (1)保存产检基本信息 (2)保存辅助检查信息 (3)批量保存病史信息(4)多个胎儿信息(5) 多个诊断信息 TODO
153 252 */
154 253 // 对象转换
155 254  
... ... @@ -174,15 +273,16 @@
174 273 */
175 274 @RequestMapping(value = "/antexmanage", method = RequestMethod.GET)
176 275 @ResponseBody
177   - public AjaxResult selectExamHistory(String cardNo, String vcCardNo, String orgId) {// orgId或来自token
  276 + public AjaxResult selectExamHistory(String cardNo, String vcCardNo) {
178 277 /*
179 278 * (1)孕妇档案信息(通过证件号或就诊卡号查询)-根据产检券查询 TODO (2)高危因素列表 TODO (3)产检记录列表 TODO
180 279 *
181 280 */
182 281 // 基本验证
183   - if (StringUtils.isEmpty(orgId)) {
184   - return AjaxResult.returnFail("入参错误:医院ID为空");
185   - }
  282 + String orgId = "1";// orgId或来自token
  283 +// if (StringUtils.isEmpty(orgId)) {
  284 +// return AjaxResult.returnFail("入参错误:医院ID为空");
  285 +// }
186 286 if (StringUtils.isEmpty(cardNo) && StringUtils.isEmpty(vcCardNo)) {
187 287 return AjaxResult.returnFail("入参错误:查询条件为空");
188 288 }
... ... @@ -204,7 +304,7 @@
204 304 }
205 305 // 未查询到孕妇建档信息
206 306 if (dbFetationRecord == null) {
207   - return AjaxResult.returnFail("未查询到孕妇建档信息");
  307 + return AjaxResult.returnSuccess(null);//将基本的对象返回空
208 308 }
209 309 // (2)高危因素列表 TODO
210 310 List<Map<String, Object>> riskFactor = new ArrayList<>();
parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java View file @ 40bd32f
1 1 package com.lyms.hospital.request.exam;
2 2  
  3 +import java.util.ArrayList;
3 4 import java.util.List;
4 5 import java.util.Map;
5 6  
6 7  
7 8  
8 9  
... ... @@ -28,14 +29,31 @@
28 29 /**
29 30 * 病史列表信息
30 31 */
31   - private List<HistoryMaps> historyMapsList;
  32 + private List<HistoryMaps> historyMapsList = new ArrayList<>();
32 33 /**
33 34 * 胎儿列表信息
34 35 */
35   - private List<DiagnoseTai> diagnoseTaiList;
  36 + private List<DiagnoseTai> diagnoseTaiList = new ArrayList<>();
36 37  
37   - public ExamAddRequestWrapper() {
  38 + public ExamAddRequestWrapper(DiagnoseInfo info,DiagnoseAssit assist,
  39 + List<HistoryMaps> historyMapsList,List<DiagnoseTai> diagnoseTaiList) {
  40 + this.diagnoseInfo = info;
  41 + this.diagnoseAssit = assist;
  42 + this.historyMapsList = historyMapsList;
  43 + this.diagnoseTaiList = diagnoseTaiList;
  44 +
  45 + Map<String, Object> infoMap = XjhMapUtil.transBean2FormatAliasMap(info,
  46 + XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
  47 + Map<String, Object> assistMap = XjhMapUtil.transBean2FormatAliasMap(assist,
  48 + XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
  49 + infoMap.putAll(assistMap);
  50 + this.examAddRequest = (ExamAddRequest) XjhMapUtil.transMap2AliasBean(infoMap, new ExamAddRequest(),
  51 + XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
38 52 }
  53 +
  54 + public ExamAddRequestWrapper(){
  55 +
  56 + }
39 57  
40 58 @SuppressWarnings("unchecked")
41 59 public ExamAddRequestWrapper(ExamAddRequest request) {
... ... @@ -48,7 +66,8 @@
48 66 XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
49 67 diagnoseInfo = (DiagnoseInfo) XjhMapUtil.transMap2FormatBean(infoMap, new DiagnoseInfo());
50 68 diagnoseInfo.setWomanId(request.getParentId());// 孕妇档案ID
51   - diagnoseInfo.setPersonId(request.getPid());// 女性居民ID
  69 + diagnoseInfo.setPersonId(request.getPid());// 女性居民
  70 + diagnoseInfo.setOrgId(null);// 医院ID TODO 来自于token 登录信息
52 71 // 血压
53 72 Map<String, Object> bp = request.getBp();
54 73 if (bp != null) {
55 74  
... ... @@ -62,11 +81,33 @@
62 81 */
63 82 Map<String, Object> assistMap = XjhMapUtil.transBean2FormatAliasMap(request,
64 83 XjhMapUtil.getKeyMap(DiagnoseAssistKeymap.original, DiagnoseAssistKeymap.alias));
  84 + // 处理辅助检查,将老版本的"yin","ruoyang","yang"字符串覆盖为数字保存
  85 + if (assistMap != null && !assistMap.isEmpty()) {
  86 + for (String key : assistMap.keySet()) {
  87 + String str = this.obj2Str(assistMap.get(key));
  88 + if ("yin".equals(str)) {
  89 + assistMap.put(key, DiagnoseAssit.YIN + "");
  90 + } else if ("yang".equals(str)) {
  91 + assistMap.put(key, DiagnoseAssit.YANG + "");
  92 + } else if ("ruoyang".equals(str)) {
  93 + assistMap.put(key, DiagnoseAssit.RUOYANG + "");
  94 + }
  95 + }
  96 + }
65 97 diagnoseAssit = (DiagnoseAssit) XjhMapUtil.transMap2FormatBean(assistMap, new DiagnoseAssit());
66 98 // 其他老版本结构数据补录
67 99 // 阴道分泌物
68 100 Map<String, Object> ydfmw = request.getYdfmw();
69 101 if (ydfmw != null) {
  102 + // 老版本布尔类型,转变为 int 值
  103 + for (String key : ydfmw.keySet()) {
  104 + String str = this.obj2Str(ydfmw.get(key));
  105 + if ("true".equals(str)) {
  106 + ydfmw.put(key, 1);
  107 + } else if ("false".equals(str)) {
  108 + ydfmw.put(key, 0);
  109 + }
  110 + }
70 111 String[] original = { "ydqjd", "dc", "jsjmj", "qt", "qtText" };
71 112 String[] alias = { "vaginaYdqjd", "vaginaDc", "vaginaJsjmj", "vaginaOther", "vaginaOtherTxt" };
72 113 diagnoseAssit = (DiagnoseAssit) XjhMapUtil.transMap2AliasBean(ydfmw, diagnoseAssit,
... ... @@ -81,8 +122,8 @@
81 122 Map<String, Object> map1 = (Map<String, Object>) historyInfo.get(key1);// 1级节点
82 123 if (map1 != null) {
83 124 // 处理1级节点
84   - String node1_yesOrNo = map1.get("yesOrNo").toString();
85   - String node1_id = map1.get("id").toString();
  125 + String node1_yesOrNo = this.obj2Str(map1.get("yesOrNo"));
  126 + String node1_id = this.obj2Str(map1.get("id"));
86 127 if ("yes".equals(node1_yesOrNo)) {
87 128 historyMapsList.add(new HistoryMaps(node1_id, null));
88 129 }
89 130  
90 131  
... ... @@ -115,24 +156,24 @@
115 156 }
116 157 }
117 158 } // 病史信息 end
118   - //hHealthInfo 丈夫健康情况(特殊处理)
119   - Map<String,String> hHealthInfo = request.gethHealthInfo();
120   - if(hHealthInfo!=null){
121   - if("yes".equals(hHealthInfo.get("yesOrNo").toString())){
122   - historyMapsList.add(new HistoryMaps(HistoryMaps.ZFJKQK, hHealthInfo.get("qt").toString()));
  159 + // hHealthInfo 丈夫健康情况(特殊处理)
  160 + Map<String, String> hHealthInfo = request.gethHealthInfo();
  161 + if (hHealthInfo != null) {
  162 + if ("yes".equals(this.obj2Str(hHealthInfo.get("yesOrNo")))) {
  163 + historyMapsList.add(new HistoryMaps(HistoryMaps.ZFJKQK, this.obj2Str(hHealthInfo.get("qt"))));
123 164 }
124 165 }
125 166 /*
126 167 * 胎儿信息
127 168 */
128   - List<Map<String,Object>> placentas = request.getPlacentas();
129   - if(placentas!=null && !placentas.isEmpty()){
130   - for(Map<String,Object> map : placentas){
  169 + List<Map<String, Object>> placentas = request.getPlacentas();
  170 + if (placentas != null && !placentas.isEmpty()) {
  171 + for (Map<String, Object> map : placentas) {
131 172 DiagnoseTai tai = new DiagnoseTai();
132   - tai.setHeartRate(map.get("heartRate").toString());
133   - tai.setPosition(map.get("fetalPosition").toString());
134   - tai.setFirstExpose(map.get("fetalPresentation").toString());
135   - tai.setIsLink(Integer.parseInt(map.get("join").toString()));
  173 + tai.setHeartRate(this.obj2Str(map.get("heartRate")));
  174 + tai.setPosition(this.obj2Str(map.get("fetalPosition")));
  175 + tai.setFirstExpose(this.obj2Str(map.get("fetalPresentation")));
  176 + tai.setIsLink(map.get("join") == null ? null : Integer.parseInt(map.get("join").toString()));
136 177 diagnoseTaiList.add(tai);
137 178 }
138 179 }
... ... @@ -140,6 +181,10 @@
140 181 * 诊断信息 TODO
141 182 */
142 183 }
  184 + }
  185 +
  186 + private String obj2Str(Object obj) {
  187 + return obj == null ? null : obj.toString();
143 188 }
144 189  
145 190 // getter and setter
parent/hospital.web/src/main/java/com/lyms/hospital/response/keymap/WomanExamKeymap.java View file @ 40bd32f
... ... @@ -36,8 +36,8 @@
36 36  
37 37 //基础信息字段(4)
38 38 "doctorId",//医生ID
39   - "diagnoseTime",//产检时间
40   - "nextinspectTime",//下次检查日期
  39 + "diagnoseTimeStr",//产检时间
  40 + "nextinspectTimeStr",//下次检查日期
41 41 "nextinspectNum",//下次产检孕周数
42 42  
43 43 //孕产史(11)
parent/hospital.web/src/main/java/com/lyms/hospital/util/trans/XjhMapUtil.java View file @ 40bd32f
... ... @@ -121,7 +121,7 @@
121 121 */
122 122 if (keyType.equals(String.class) && key.length() > 3
123 123 && "Str".equals(key.substring(key.length() - 3))) {// key可能是格式化字段
124   - String dateKey = key.substring(key.length() - 3);
  124 + String dateKey = key.substring(0,key.length() - 3);
125 125 for (PropertyDescriptor dateProperty : propertyDescriptors) {
126 126 if (dateKey.equals(dateProperty.getName())) {// 找到了对应的日期字段,set之
127 127 String dateValue = value.toString();