Commit 598925255c3d0f1bb20a38444bd84f933c3e89b2

Authored by baohanddd

Merge remote-tracking branch 'origin/master'

Showing 13 changed files

platform-common/src/main/java/com/lyms/platform/common/enums/FyTypeEnums.java View file @ 5989252
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.HashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + *
  10 + * 抚养方式
  11 + *
  12 + * @author Administrator
  13 + *
  14 + */
  15 +public enum FyTypeEnums {
  16 +
  17 + FQ(0,"父亲"),MQ(1,"母亲"),ZF(2,"祖父"),ZM(3,"祖母"),WZF(4,"祖父"),WZM(5,"祖母"),QT(6,"其它");
  18 +
  19 + private FyTypeEnums(int id, String name) {
  20 + this.id = id;
  21 + this.name = name;
  22 + }
  23 +
  24 + public static String getNameById(int id){
  25 + for(FyTypeEnums s : values()){
  26 + if(id==s.id){
  27 + return s.getName();
  28 + }
  29 + }
  30 + return "";
  31 + }
  32 +
  33 + public static List<Map> getFyTypeEnums() {
  34 + List<Map> list = new ArrayList<>();
  35 + for (FyTypeEnums e : FyTypeEnums.values()) {
  36 + Map rootMap = new HashMap();
  37 + rootMap.put("id", e.getId());
  38 + rootMap.put("name", e.getName());
  39 + list.add(rootMap);
  40 + }
  41 + return list;
  42 + }
  43 +
  44 + private int id;
  45 +
  46 + private String name;
  47 +
  48 + public int getId() {
  49 + return id;
  50 + }
  51 +
  52 + public String getName() {
  53 + return name;
  54 + }
  55 +}
platform-common/src/main/java/com/lyms/platform/common/enums/WyTypeEnums.java View file @ 5989252
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.HashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + *
  10 + * 喂养方式
  11 + *
  12 + * @author Administrator
  13 + *
  14 + */
  15 +public enum WyTypeEnums {
  16 +
  17 + MR(0,"纯母乳喂养"),HH(1,"混合喂养"),RG(2,"人工喂养");
  18 +
  19 + private WyTypeEnums(int id, String name) {
  20 + this.id = id;
  21 + this.name = name;
  22 + }
  23 +
  24 + public static String getNameById(int id){
  25 + for(WyTypeEnums s : values()){
  26 + if(id==s.id){
  27 + return s.getName();
  28 + }
  29 + }
  30 + return "";
  31 + }
  32 +
  33 + public static List<Map> getWyTypeEnums() {
  34 + List<Map> list = new ArrayList<>();
  35 + for (WyTypeEnums e : WyTypeEnums.values()) {
  36 + Map rootMap = new HashMap();
  37 + rootMap.put("id", e.getId());
  38 + rootMap.put("name", e.getName());
  39 + list.add(rootMap);
  40 + }
  41 + return list;
  42 + }
  43 +
  44 + private int id;
  45 +
  46 + private String name;
  47 +
  48 + public int getId() {
  49 + return id;
  50 + }
  51 +
  52 + public String getName() {
  53 + return name;
  54 + }
  55 +}
platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java View file @ 5989252
... ... @@ -5,6 +5,7 @@
5 5 import org.springframework.data.mongodb.core.mapping.Field;
6 6  
7 7 import java.util.Date;
  8 +import java.util.Map;
8 9  
9 10 /**
10 11 * 儿保检查
... ... @@ -59,6 +60,9 @@
59 60 //发病情况
60 61 private String morbidity;
61 62  
  63 + //药物过敏史
  64 + private String drugGllergic;
  65 +
62 66 /******问诊情况****/
63 67  
64 68 /******一般检查****/
65 69  
... ... @@ -77,8 +81,10 @@
77 81 //身长别体重
78 82 private String heightWeight;
79 83  
  84 + private String chestw;
80 85  
81 86  
  87 +
82 88 //发育评价
83 89 private String growthEvaluate;
84 90  
... ... @@ -212,6 +218,23 @@
212 218  
213 219 //创建时间
214 220 private Date created;
  221 +
  222 +
  223 + public String getDrugGllergic() {
  224 + return drugGllergic;
  225 + }
  226 +
  227 + public void setDrugGllergic(String drugGllergic) {
  228 + this.drugGllergic = drugGllergic;
  229 + }
  230 +
  231 + public String getChestw() {
  232 + return chestw;
  233 + }
  234 +
  235 + public void setChestw(String chestw) {
  236 + this.chestw = chestw;
  237 + }
215 238  
216 239 public Date getModified() {
217 240 return modified;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java View file @ 5989252
... ... @@ -134,7 +134,17 @@
134 134 @ResponseBody
135 135 public BaseObjectResponse queryGrowthEvaluate(@RequestParam(required = true) Double height,@RequestParam(required = true) Integer sex
136 136 ,@RequestParam(required = true) String birth,@RequestParam(required = true) Double weight){
137   - return babyCheckFacade.queryGrowthEvaluate(height, sex,birth,weight);
  137 + return babyCheckFacade.queryGrowthEvaluate(height, sex, birth, weight);
  138 +
  139 + }
  140 +
  141 + /**
  142 + * 基础数据
  143 + */
  144 + @RequestMapping(value = "/getBaseConfig", method = RequestMethod.GET)
  145 + @ResponseBody
  146 + public BaseObjectResponse getBaseConfig(){
  147 + return babyCheckFacade.getBaseConfig();
138 148  
139 149 }
140 150  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EnumsController.java View file @ 5989252
... ... @@ -216,7 +216,7 @@
216 216 }
217 217  
218 218 /**
219   - * 服务类型
  219 + * 查询服务状态通过服务类型
220 220 * @return
221 221 */
222 222 @RequestMapping(value = "/getServiceStatusByPid/{pid}", method = RequestMethod.GET)
... ... @@ -227,7 +227,7 @@
227 227 }
228 228  
229 229 /**
230   - * 获取消息类型
  230 + * 获取消息类型通过对象类型
231 231 * @param serviceObjId
232 232 * @return
233 233 */
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 5989252
... ... @@ -230,17 +230,22 @@
230 230 bm.setMremark(b.getMremark());
231 231 bm.setDiagnose(b.getDiagnose());
232 232  
233   - if (b.getExpType() == ExpEnums.SGY.getId())
  233 + if (b.getExpType() != null)
234 234 {
235   - Date vipEndTime = DateUtil.addMonth(DateUtil.parseYMD(b.getBuildDate()),3);
236   - bm.setVipEndTime(vipEndTime);
  235 + if (b.getExpType() == ExpEnums.SGY.getId())
  236 + {
  237 + Date vipEndTime = DateUtil.addMonth(DateUtil.parseYMD(b.getBuildDate()),3);
  238 + bm.setVipEndTime(vipEndTime);
  239 + }
  240 + else
  241 + {
  242 + Date vipEndTime = DateUtil.addYear(DateUtil.parseYMD(b.getBabyBirthday()),3);
  243 + bm.setVipEndTime(vipEndTime);
  244 + }
  245 + bm.setExpType(b.getExpType());
237 246 }
238   - else
239   - {
240   - Date vipEndTime = DateUtil.addYear(DateUtil.parseYMD(b.getBabyBirthday()),3);
241   - bm.setVipEndTime(vipEndTime);
242   - }
243 247  
  248 +
244 249 bm.setServiceStatus(b.getServiceStatus());
245 250  
246 251 bm.setDueDate(DateUtil.parseYMD(b.getDueDate()));
247 252  
... ... @@ -254,8 +259,8 @@
254 259 bm.setHospitalId(b.getHospitalId());
255 260 bm.setApgarScore(JsonUtil.obj2JsonString(b.getApgar()));
256 261  
257   - bm.setExpType(b.getExpType());
258 262  
  263 +
259 264 bm.setCurrentHighRisk(b.getHighRisk());
260 265  
261 266  
... ... @@ -399,7 +404,7 @@
399 404 * @return
400 405 */
401 406 public BaseObjectResponse getBabyBuildBaseConfig() {
402   - Map<String,List> map = new HashMap();
  407 + Map<String,Object> map = new HashMap();
403 408  
404 409 //证件类型
405 410 List<BasicConfigResult> pcerteTypeResult = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.CERTE_TYPE_ID);
406 411  
... ... @@ -437,8 +442,10 @@
437 442 List expType = ExpEnums.getExpEnums();
438 443 map.put("expType", expType);
439 444  
  445 + map.put("initBuildDate", DateUtil.getyyyy_MM_dd(new Date()));
440 446  
441 447  
  448 +
442 449 BaseObjectResponse objectResponse = new BaseObjectResponse();
443 450 objectResponse.setData(map);
444 451 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
445 452  
... ... @@ -458,12 +465,12 @@
458 465 BabyModelQuery babyQuery = new BabyModelQuery();
459 466 babyQuery.setYn(YnEnums.YES.getId());
460 467 List<BabyModel> models = null;
461   - if (!StringUtils.isEmpty(param.getVcCardNo()))
  468 + if (!StringUtils.isEmpty(param.getCardNo()))
462 469 {
463 470 babyQuery.setMcertNo(param.getCardNo());
464 471 models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
465 472 }
466   - else if (!StringUtils.isEmpty(param.getCardNo()) && !StringUtils.isEmpty(String.valueOf(param.getHospitalId())))
  473 + else if (!StringUtils.isEmpty(param.getVcCardNo()) && !StringUtils.isEmpty(String.valueOf(param.getHospitalId())))
467 474 {
468 475 babyQuery.setHospitalId(param.getHospitalId());
469 476 babyQuery.setVcCardNo(param.getVcCardNo());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 5989252
... ... @@ -2,16 +2,18 @@
2 2  
3 3 import com.lyms.platform.biz.service.*;
4 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
5   -import com.lyms.platform.common.enums.SexEnum;
6   -import com.lyms.platform.common.enums.YnEnums;
  5 +import com.lyms.platform.common.enums.*;
7 6 import com.lyms.platform.common.result.BaseObjectResponse;
8 7 import com.lyms.platform.common.result.BaseResponse;
9 8 import com.lyms.platform.common.utils.DateUtil;
  9 +import com.lyms.platform.common.utils.JsonUtil;
10 10 import com.lyms.platform.common.utils.StringUtils;
  11 +import com.lyms.platform.common.utils.SystemConfig;
11 12 import com.lyms.platform.operate.web.request.BabyCheckRequest;
12 13 import com.lyms.platform.operate.web.result.BabyBasicResult;
13 14 import com.lyms.platform.operate.web.result.BabyCheckResult;
14 15 import com.lyms.platform.operate.web.result.BabyChooseResult;
  16 +import com.lyms.platform.operate.web.result.BasicConfigResult;
15 17 import com.lyms.platform.pojo.AwModel;
16 18 import com.lyms.platform.pojo.BabyCheckModel;
17 19 import com.lyms.platform.pojo.BabyModel;
... ... @@ -32,6 +34,7 @@
32 34  
33 35 @Autowired
34 36 private BabyBookbuildingService babyBookbuildingService;
  37 + private BaseObjectResponse baseConfig;
35 38  
36 39 /**
37 40 * 更新检查
... ... @@ -92,7 +95,7 @@
92 95 model.setBilirubinHead(request.getBilirubinHead());
93 96 model.setBilirubinChest(request.getBilirubinChest());
94 97 model.setBilirubinBelly(request.getBilirubinBelly());
95   - model.setBregma(request.getBregma());
  98 + model.setBregma(JsonUtil.obj2JsonString(request.getBregma()));
96 99 model.setTooth(request.getTooth());
97 100 model.setFaceColor(request.getFaceColor());
98 101 model.setSkin(request.getSkin());
... ... @@ -130,6 +133,10 @@
130 133 model.setNextDate(DateUtil.parseYMD(request.getNextDate()));
131 134 model.setHighRisk(request.getHighRisk());
132 135  
  136 + model.setDrugGllergic(JsonUtil.obj2JsonString(request.getDrugGllergic()));
  137 + model.setChestw(request.getChestw());
  138 +
  139 +
133 140 model.setCheckDate(DateUtil.parseYMD(request.getCheckDate()));
134 141  
135 142 return model;
... ... @@ -345,7 +352,7 @@
345 352 model.setBilirubinHead(checkModel.getBilirubinHead());
346 353 model.setBilirubinChest(checkModel.getBilirubinChest());
347 354 model.setBilirubinBelly(checkModel.getBilirubinBelly());
348   - model.setBregma(checkModel.getBregma());
  355 + model.setBregma(JsonUtil.str2Obj(checkModel.getBregma(), Map.class));
349 356 model.setTooth(checkModel.getTooth());
350 357 model.setFaceColor(checkModel.getFaceColor());
351 358 model.setSkin(checkModel.getSkin());
... ... @@ -383,6 +390,8 @@
383 390 model.setNextDate(DateUtil.getyyyy_MM_dd(checkModel.getNextDate()));
384 391 model.setHighRisk(checkModel.getHighRisk());
385 392  
  393 + model.setDrugGllergic(JsonUtil.str2Obj(checkModel.getBregma(), Map.class));
  394 + model.setChestw(checkModel.getChestw());
386 395  
387 396 return model;
388 397  
... ... @@ -533,6 +542,30 @@
533 542 br.setErrorcode(ErrorCodeConstants.SUCCESS);
534 543 br.setErrormsg("成功");
535 544 return br;
  545 + }
  546 +
  547 + public BaseObjectResponse getBaseConfig() {
  548 +
  549 + Map<String,Object> map = new HashMap();
  550 +
  551 + //抚养方式
  552 + List fyType = FyTypeEnums.getFyTypeEnums();
  553 + map.put("fyType", fyType);
  554 +
  555 + //喂养方式
  556 + List wyType = WyTypeEnums.getWyTypeEnums();
  557 + map.put("wyType", wyType);
  558 +
  559 + map.put("initCheckDate", DateUtil.getyyyy_MM_dd(new Date()));
  560 +
  561 +
  562 +
  563 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  564 + objectResponse.setData(map);
  565 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  566 + objectResponse.setErrormsg("成功");
  567 +
  568 + return objectResponse;
536 569 }
537 570 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 5989252
... ... @@ -131,7 +131,7 @@
131 131 }
132 132  
133 133 //历史建档记录
134   - List<Map<String,List>> list = new ArrayList<>();
  134 + List<Map> list = new ArrayList<>();
135 135 List<BookbuildingRecordResult> results = new ArrayList<>();
136 136 if (CollectionUtils.isNotEmpty(patients))
137 137 {
138 138  
... ... @@ -191,8 +191,9 @@
191 191 list.add(typeMap);
192 192  
193 193  
194   - Map<String,List> mapData = new HashMap<>();
  194 + Map<String,Object> mapData = new HashMap<>();
195 195 mapData.put("data",results);
  196 + mapData.put("initBuildDate", DateUtil.getyyyy_MM_dd(new Date()));
196 197 list.add(mapData);
197 198  
198 199 BaseListResponse listResponse = new BaseListResponse();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java View file @ 5989252
1 1 package com.lyms.platform.operate.web.request;
2 2  
  3 +import java.util.Map;
  4 +
3 5 /**
4 6 * Created by lqy on 2016/6/20.
5 7 * 儿保检查
... ... @@ -44,6 +46,9 @@
44 46 //发病情况
45 47 private String morbidity;
46 48  
  49 + //药物过敏史
  50 + private Map drugGllergic;
  51 +
47 52 /******问诊情况****/
48 53  
49 54 /******一般检查****/
... ... @@ -59,6 +64,9 @@
59 64 //头围
60 65 private String head;
61 66  
  67 + //胸围
  68 + private String chestw;
  69 +
62 70 //身长别体重
63 71 private String heightWeight;
64 72  
65 73  
... ... @@ -81,8 +89,9 @@
81 89 private String bilirubinBelly;
82 90  
83 91 //前卤
84   - private String bregma;
  92 + private Map bregma;
85 93  
  94 +
86 95 //牙齿
87 96 private String tooth;
88 97  
... ... @@ -202,6 +211,14 @@
202 211 this.checkDate = checkDate;
203 212 }
204 213  
  214 + public String getChestw() {
  215 + return chestw;
  216 + }
  217 +
  218 + public void setChestw(String chestw) {
  219 + this.chestw = chestw;
  220 + }
  221 +
205 222 /******诊断指导****/
206 223  
207 224  
208 225  
... ... @@ -414,11 +431,19 @@
414 431 this.nextDate = nextDate;
415 432 }
416 433  
417   - public String getBregma() {
  434 + public Map getDrugGllergic() {
  435 + return drugGllergic;
  436 + }
  437 +
  438 + public void setDrugGllergic(Map drugGllergic) {
  439 + this.drugGllergic = drugGllergic;
  440 + }
  441 +
  442 + public Map getBregma() {
418 443 return bregma;
419 444 }
420 445  
421   - public void setBregma(String bregma) {
  446 + public void setBregma(Map bregma) {
422 447 this.bregma = bregma;
423 448 }
424 449  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java View file @ 5989252
1 1 package com.lyms.platform.operate.web.result;
2 2  
  3 +import java.util.Map;
  4 +
3 5 /**
4 6 * Created by Administrator on 2016/6/21.
5 7 */
... ... @@ -41,6 +43,10 @@
41 43 //发病情况
42 44 private String morbidity;
43 45  
  46 + //药物过敏史
  47 + private Map drugGllergic;
  48 +
  49 +
44 50 /******问诊情况****/
45 51  
46 52 /******一般检查****/
... ... @@ -59,6 +65,8 @@
59 65 //身长别体重
60 66 private String heightWeight;
61 67  
  68 + //胸围
  69 + private String chestw;
62 70  
63 71  
64 72 //发育评价
... ... @@ -78,7 +86,7 @@
78 86 private String bilirubinBelly;
79 87  
80 88 //前卤
81   - private String bregma;
  89 + private Map bregma;
82 90  
83 91 //牙齿
84 92 private String tooth;
85 93  
... ... @@ -188,8 +196,30 @@
188 196 //是否高危儿童 0 非高危 1高危
189 197 private Integer highRisk;
190 198  
  199 + public Map getDrugGllergic() {
  200 + return drugGllergic;
  201 + }
  202 +
  203 + public void setDrugGllergic(Map drugGllergic) {
  204 + this.drugGllergic = drugGllergic;
  205 + }
  206 +
  207 + public String getChestw() {
  208 + return chestw;
  209 + }
  210 +
  211 + public void setChestw(String chestw) {
  212 + this.chestw = chestw;
  213 + }
  214 +
  215 + public void setBregma(Map bregma) {
  216 + this.bregma = bregma;
  217 + }
  218 +
191 219 /******诊断指导****/
192 220  
  221 +
  222 +
193 223 public String getId() {
194 224 return id;
195 225 }
196 226  
... ... @@ -358,12 +388,8 @@
358 388 this.bilirubinBelly = bilirubinBelly;
359 389 }
360 390  
361   - public String getBregma() {
  391 + public Map getBregma() {
362 392 return bregma;
363   - }
364   -
365   - public void setBregma(String bregma) {
366   - this.bregma = bregma;
367 393 }
368 394  
369 395 public String getTooth() {
platform-reportData/src/main/java/com/lymsh/platform/reportdata/dao/StatisticsMapper.java View file @ 5989252
... ... @@ -10,7 +10,7 @@
10 10 */
11 11 public interface StatisticsMapper {
12 12  
13   - public List<AreaData> queryProvincePatients(String year);
  13 + public List<AreaData> queryProvincePatientsByYear(String year);
14 14  
15 15 public List<AreaData> queryProvinceRiskPatients(String year);
16 16  
platform-reportData/src/main/java/com/lymsh/platform/reportdata/service/impl/StatisticsServiceImpl.java View file @ 5989252
... ... @@ -20,7 +20,7 @@
20 20  
21 21 @Override
22 22 public List<AreaData> queryProvincePatients(String year) {
23   - return statisticsMapper.queryProvincePatients(year);
  23 + return statisticsMapper.queryProvincePatientsByYear(year);
24 24 }
25 25  
26 26 @Override
platform-reportData/src/main/resources/reportOrm/StatisticsMapper.xml View file @ 5989252
... ... @@ -17,7 +17,7 @@
17 17 <result column="ymd" property="ymd" jdbcType="TIMESTAMP"/>
18 18 </resultMap>
19 19  
20   - <select id="queryProvincePatients" resultMap="AreaDataResultMap" parameterType="java.lang.String">
  20 + <select id="queryProvincePatientsByYear" resultMap="AreaDataResultMap" parameterType="java.lang.String">
21 21 SELECT
22 22 ODS_D_PROVINCE.PROVINCE_ID as province_id,
23 23 ODS_D_PROVINCE.PROVINCE as province_name,