Commit 0aebfe59e50b3808dfba8c0b730c417c8214c852

Authored by wtt
1 parent a45024c6ed

update

Showing 8 changed files with 98 additions and 73 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BreastModel.java View file @ 0aebfe5
... ... @@ -20,7 +20,6 @@
20 20 /*基础信息*/
21 21 private String id;
22 22 private Integer yn;
23   - private String parentId;
24 23 private String pid;
25 24 private Date createDate;
26 25 private Date modifyDate;
... ... @@ -84,14 +83,6 @@
84 83  
85 84 public void setYn(Integer yn) {
86 85 this.yn = yn;
87   - }
88   -
89   - public String getParentId() {
90   - return parentId;
91   - }
92   -
93   - public void setParentId(String parentId) {
94   - this.parentId = parentId;
95 86 }
96 87  
97 88 public String getPid() {
platform-dal/src/main/java/com/lyms/platform/pojo/FamilyPlanningModel.java View file @ 0aebfe5
... ... @@ -21,7 +21,6 @@
21 21 private String id;
22 22 private Integer yn;
23 23 private String parentId;
24   - private String pid;
25 24 private Date createDate;
26 25 private Date modifyDate;
27 26 private String hospitalId;
... ... @@ -88,7 +87,7 @@
88 87 /*辅助检查*/
89 88 //血常规
90 89 private String fzxcg;
91   - //血常规
  90 + //其他
92 91 private String fzxqt;
93 92  
94 93 /*B超*/
... ... @@ -122,7 +121,7 @@
122 121 private String sscxl;
123 122 //吸出物:绒毛(yes 有/ no无)
124 123 private String ssxcwYesOrNo;
125   - //胚囊 yesOrNo(yes有no/无)约_____ size 大小
  124 + //胚囊 yesOrNo(yes 有no/无)约_____ size 大小
126 125 private Map <String,Object> pn;
127 126 //术中用药及特殊情况:
128 127 private String szyyjtsqk;
129 128  
... ... @@ -137,9 +136,9 @@
137 136 private String yjjh;
138 137 //宫颈深度__cm
139 138 private String shgjsd;
140   - //手术:key:state shu顺利/ kun困难( details 详情:_________)
  139 + //手术:key:state shu 顺利/ kun困难( details 详情:_________)
141 140 private Map <String,Object> operationState;
142   - //出血:yesOrNo(yes有no/无) value ___ml
  141 + //出血:yesOrNo(yes 有no/无) value ___ml
143 142 private Map <String,Object> hemorrhage;
144 143 //腹痛:1轻/2无/3中/4重:
145 144 private String ft;
... ... @@ -147,7 +146,7 @@
147 146 private String gnjyqzl;
148 147 //宫内节育器 大小___号
149 148 private String gnjyqSize;
150   - //尾丝:无/有____cm
  149 + //尾丝:yesOrNo(yes 有no/无) value ___ml
151 150 private Map <String,Object> ws;
152 151 //术中用药及特殊情况:
153 152 private String szyyqk;
154 153  
... ... @@ -184,13 +183,7 @@
184 183 this.parentId = parentId;
185 184 }
186 185  
187   - public String getPid() {
188   - return pid;
189   - }
190 186  
191   - public void setPid(String pid) {
192   - this.pid = pid;
193   - }
194 187  
195 188 public Date getCreateDate() {
196 189 return createDate;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BreastController.java View file @ 0aebfe5
... ... @@ -8,6 +8,7 @@
8 8 import com.lyms.platform.common.result.BaseResponse;
9 9 import com.lyms.platform.common.utils.StringUtils;
10 10 import com.lyms.platform.operate.web.facade.BreastFacade;
  11 +import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
11 12 import com.lyms.platform.operate.web.request.BreastRequest;
12 13 import com.lyms.platform.query.BreastModelQuery;
13 14 import com.lyms.platform.query.FamilyPlanningModelQuery;
... ... @@ -29,6 +30,20 @@
29 30 @Autowired
30 31 private BreastFacade breastFacade;
31 32  
  33 +
  34 + /**
  35 + * 添加或者修改
  36 + * @param request
  37 + * @return
  38 + */
  39 + @RequestMapping(method = RequestMethod.GET, value = "/getPatient")
  40 + @ResponseBody
  41 + @TokenRequired
  42 + public BaseResponse getPatient(@Valid AntenatalExaminationQueryRequest request, HttpServletRequest httpServletRequest) {
  43 + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
  44 + BaseResponse baseResponse = breastFacade.getPatient(request, loginState.getId());
  45 + return baseResponse;
  46 + }
32 47  
33 48 /**
34 49 * 添加或者修改
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BreastFacade.java View file @ 0aebfe5
... ... @@ -12,6 +12,7 @@
12 12 import com.lyms.platform.common.utils.DateUtil;
13 13 import com.lyms.platform.common.utils.StringUtils;
14 14 import com.lyms.platform.common.utils.SystemConfig;
  15 +import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
15 16 import com.lyms.platform.operate.web.request.BreastRequest;
16 17 import com.lyms.platform.operate.web.result.BabyHighRiskBabyResult;
17 18 import com.lyms.platform.operate.web.result.BreastResult;
... ... @@ -23,10 +24,7 @@
23 24 import com.lyms.platform.permission.service.OrganizationService;
24 25 import com.lyms.platform.permission.service.UsersService;
25 26 import com.lyms.platform.pojo.*;
26   -import com.lyms.platform.query.BabyHighRiskBabyModelQuery;
27   -import com.lyms.platform.query.BasicConfigQuery;
28   -import com.lyms.platform.query.BreastModelQuery;
29   -import com.lyms.platform.query.FamilyPlanningModelQuery;
  27 +import com.lyms.platform.query.*;
30 28 import org.apache.commons.lang.math.NumberUtils;
31 29 import org.springframework.beans.factory.annotation.Autowired;
32 30 import org.springframework.stereotype.Component;
... ... @@ -73,9 +71,14 @@
73 71  
74 72 BreastModel model = new BreastModel();
75 73 model.setYn(YnEnums.YES.getId());
76   - Patients patients = patientsService.findOnePatientById(request.getParentId());
77   - if (patients != null) {
78   - model.setParentId(patients.getId());
  74 + PatientsQuery patientsQuery = new PatientsQuery();
  75 + patientsQuery.setPid(request.getPid());
  76 + patientsQuery.setHospitalId(request.getHospitalId());
  77 + patientsQuery.setYn(YnEnums.YES.getId());
  78 + List<Patients> list = patientsService.queryPatient1(patientsQuery, "created");
  79 +
  80 + if (CollectionUtils.isNotEmpty(list)) {
  81 + Patients patients = list.get(0);
79 82 model.setPid(patients.getPid());
80 83 model.setModifyDate(new Date());
81 84 model.setName(patients.getUsername());
82 85  
83 86  
84 87  
... ... @@ -102,17 +105,46 @@
102 105  
103 106 return model;
104 107 }
  108 + /**
  109 + * 获取孕妇建档不区分产妇孕妇
  110 + */
  111 + public BaseResponse getPatient (AntenatalExaminationQueryRequest request, Integer userId) {
  112 + Patients patients = null;
105 113  
  114 + try {
  115 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  116 + PatientsQuery patientsQuery = new PatientsQuery();
  117 + if(StringUtils.isNotEmpty(request.getCardNo()) || StringUtils.isNotEmpty(request.getVcCardNo())){
  118 + patientsQuery.setCardNo(request.getCardNo());
  119 + patientsQuery.setVcCardNo(request.getVcCardNo());
  120 + patientsQuery.setHospitalId(hospitalId);
  121 + patientsQuery.setYn(YnEnums.YES.getId());
  122 + List<Patients> list = patientsService.queryPatient1(patientsQuery, "created");
  123 + if(CollectionUtils.isNotEmpty(list)){
  124 + patients = list.get(0);
  125 + }
  126 + }
  127 +
  128 + } catch (Exception e) {
  129 + e.printStackTrace();
  130 + }
  131 + BaseObjectResponse br = new BaseObjectResponse();
  132 + br.setErrorcode(ErrorCodeConstants.SUCCESS);
  133 + br.setErrormsg("成功");
  134 + br.setData(patients);
  135 + return br;
  136 + }
106 137 /**
107 138 * 新增
108 139 */
109 140 public BaseResponse add(BreastRequest request, Integer userId) {
110 141  
111 142 String hospitalId = autoMatchFacade.getHospitalId(userId);
  143 + request.setHospitalId(hospitalId);
112 144 BreastModel model = getBreastModel(request);
113 145 model.setCreateDate(new Date());
114 146 model.setHospitalId(hospitalId);
115   -
  147 +
116 148 model = breastService.add(model);
117 149 if (model != null && model.getId() != null) {
118 150 operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), model, model, OptActionEnums.ADD.getId(), "乳腺检查新增");
... ... @@ -134,7 +166,7 @@
134 166 if (StringUtils.isEmpty(request.getId())) {
135 167 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("ID不能为空");
136 168 }
137   -
  169 + request.setHospitalId(hospitalId);
138 170 BreastModel model = getBreastModel(request);
139 171 BreastModel models = breastService.queryById(request.getId());
140 172 if (models != null && models.getId() != null) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FamilyPlanningFacade.java View file @ 0aebfe5
... ... @@ -19,6 +19,7 @@
19 19 import com.lyms.platform.pojo.BabyStuntingModel;
20 20 import com.lyms.platform.pojo.FamilyPlanningModel;
21 21 import com.lyms.platform.pojo.Patients;
  22 +import com.lyms.platform.pojo.ResidentsArchiveModel;
22 23 import com.lyms.platform.query.BabyStuntingQuery;
23 24 import com.lyms.platform.query.FamilyPlanningModelQuery;
24 25 import org.apache.commons.lang.math.NumberUtils;
... ... @@ -28,7 +29,7 @@
28 29 import java.util.*;
29 30  
30 31 /**
31   - * 乳腺检查 逻辑处理
  32 + * 计生项目 逻辑处理
32 33 *
33 34 * @Author: 武涛涛
34 35 * @Date: 2020/9/15 9:40
... ... @@ -56,7 +57,8 @@
56 57 private BasicConfigService basicConfigService;
57 58 @Autowired
58 59 private PatientsService patientsService;
59   -
  60 + @Autowired
  61 + private ResidentsArchiveService residentsArchiveService;
60 62 /**
61 63 * 构造保存对象
62 64 *
63 65  
... ... @@ -67,16 +69,16 @@
67 69  
68 70 FamilyPlanningModel model = new FamilyPlanningModel();
69 71 model.setYn(YnEnums.YES.getId());
70   - Patients patients = patientsService.findOnePatientById(request.getParentId());
71   - if (patients != null) {
72   - model.setParentId(patients.getId());
73   - model.setPid(patients.getPid());
  72 +
  73 + ResidentsArchiveModel residentsArchiveModel = residentsArchiveService.getResident(request.getParentId());
  74 + if (residentsArchiveModel != null) {
  75 + model.setParentId(residentsArchiveModel.getId());
74 76 model.setModifyDate(new Date());
75   - model.setName(patients.getUsername());
76   - model.setAge(patients.getAge() == null ? "" : patients.getAge().toString());
77   - model.setCertNo(patients.getCardNo());
78   - model.setPhone(patients.getPhone());
79   - model.setVcCardNo(patients.getVcCardNo());
  77 + model.setName(residentsArchiveModel.getUsername());
  78 + model.setAge(residentsArchiveModel.getAge() == null ? "" : residentsArchiveModel.getAge().toString());
  79 + model.setCertNo(residentsArchiveModel.getCertificateNum());
  80 + model.setPhone(residentsArchiveModel.getPhone());
  81 + model.setVcCardNo(residentsArchiveModel.getVcCardNo());
80 82 //createDate,hospitalId调用外添加赋值
81 83 }
82 84 model.setSsxm(request.getSsxm());
... ... @@ -146,7 +148,7 @@
146 148  
147 149 model = familyPlanningService.add(model);
148 150 if (model != null && model.getId() != null) {
149   - operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), model, model, OptActionEnums.ADD.getId(), "乳腺检查新增");
  151 + operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), model, model, OptActionEnums.ADD.getId(), "计生项目新增");
150 152 }
151 153 BaseObjectResponse br = new BaseObjectResponse();
152 154 br.setErrorcode(ErrorCodeConstants.SUCCESS);
... ... @@ -170,7 +172,7 @@
170 172 FamilyPlanningModel models = familyPlanningService.queryById(request.getId());
171 173 if (models != null && models.getId() != null) {
172 174 familyPlanningService.update(model, request.getId());
173   - operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), models, model, OptActionEnums.UPDATE.getId(), "乳腺检查更新");
  175 + operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), models, model, OptActionEnums.UPDATE.getId(), "计生项目更新");
174 176 }
175 177 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
176 178  
... ... @@ -189,7 +191,7 @@
189 191 FamilyPlanningModel checkModel = familyPlanningService.queryById(id);
190 192 if (checkModel != null && checkModel.getId() != null) {
191 193 familyPlanningService.deleteById(id);
192   - operateLogFacade.addDeleteOptLog(userId, Integer.valueOf(hospitalId), checkModel, OptActionEnums.DELETE.getId(), "乳腺检查删除");
  194 + operateLogFacade.addDeleteOptLog(userId, Integer.valueOf(hospitalId), checkModel, OptActionEnums.DELETE.getId(), "计生项目删除");
193 195 }
194 196 }
195 197  
... ... @@ -213,6 +215,25 @@
213 215 }
214 216 if (StringUtils.isNotEmpty(familyPlanningModel.getHospitalId())) {
215 217 familyPlanningResult.setHospitalName(CommonsHelper.getHospitalName(familyPlanningModel.getHospitalId(), organizationService));
  218 + }
  219 + if("1".equals(familyPlanningResult.getJl())){
  220 + familyPlanningResult.setJl("多");
  221 + }else if("2".equals(familyPlanningResult.getJl())){
  222 + familyPlanningResult.setJl("中");
  223 + } else if("3".equals(familyPlanningResult.getJl())){
  224 + familyPlanningResult.setJl("少");
  225 + }
  226 + if("1".equals(familyPlanningResult.getTj())){
  227 + familyPlanningResult.setTj("无");
  228 + }else if("2".equals(familyPlanningResult.getTj())){
  229 + familyPlanningResult.setTj("轻");
  230 + } else if("3".equals(familyPlanningResult.getTj())){
  231 + familyPlanningResult.setTj("重");
  232 + }
  233 + if("1".equals(familyPlanningResult.getShousNm())){
  234 + familyPlanningResult.setShousNm("负压吸宫术");
  235 + }else if("2".equals(familyPlanningResult.getShousNm())){
  236 + familyPlanningResult.setShousNm("钳刮术");
216 237 }
217 238 br.setData(familyPlanningResult);
218 239 br.setErrorcode(ErrorCodeConstants.SUCCESS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BreastRequest.java View file @ 0aebfe5
... ... @@ -15,10 +15,9 @@
15 15 /*基础信息*/
16 16 private String id;
17 17 private Integer yn;
18   - //建档ID
  18 + //建档 pid
19 19 @FormParam
20   - @NotEmpty(message = "建档ID不能为空.")
21   - private String parentId;
  20 + @NotEmpty(message = "建档pid不能为空.")
22 21 private String pid;
23 22 private String createDate;
24 23 private String modifyDate;
... ... @@ -87,9 +86,6 @@
87 86 this.yn = yn;
88 87 }
89 88  
90   - public String getParentId() {
91   - return parentId;
92   - }
93 89  
94 90 public String getInspectionPhaseName() {
95 91 return inspectionPhaseName;
... ... @@ -99,9 +95,6 @@
99 95 this.inspectionPhaseName = inspectionPhaseName;
100 96 }
101 97  
102   - public void setParentId(String parentId) {
103   - this.parentId = parentId;
104   - }
105 98  
106 99 public String getPid() {
107 100 return pid;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BreastResult.java View file @ 0aebfe5
... ... @@ -16,7 +16,6 @@
16 16 /*基础信息*/
17 17 private String id;
18 18 private Integer yn;
19   - private String parentId;
20 19 private String pid;
21 20 private Date createDate;
22 21 private Date modifyDate;
... ... @@ -91,14 +90,6 @@
91 90 this.inspectionPhaseName = inspectionPhaseName;
92 91 }
93 92  
94   - public String getParentId() {
95   - return parentId;
96   - }
97   -
98   - public void setParentId(String parentId) {
99   - this.parentId = parentId;
100   - }
101   -
102 93 public String getPid() {
103 94 return pid;
104 95 }
... ... @@ -287,7 +278,6 @@
287 278 public BreastResult convertToResult(BreastModel destModel) {
288 279  
289 280 setId(destModel.getId());
290   - setParentId(destModel.getParentId());
291 281 setPid(destModel.getPid());
292 282 //createDate modifyDate
293 283 setHospitalId(destModel.getHospitalId());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FamilyPlanningResult.java View file @ 0aebfe5
... ... @@ -16,7 +16,6 @@
16 16 private String id;
17 17 private Integer yn;
18 18 private String parentId;
19   - private String pid;
20 19 private Date createDate;
21 20 private Date modifyDate;
22 21 private String hospitalId;
... ... @@ -177,14 +176,6 @@
177 176 this.parentId = parentId;
178 177 }
179 178  
180   - public String getPid() {
181   - return pid;
182   - }
183   -
184   - public void setPid(String pid) {
185   - this.pid = pid;
186   - }
187   -
188 179 public Date getCreateDate() {
189 180 return createDate;
190 181 }
... ... @@ -662,7 +653,6 @@
662 653  
663 654 setId(destModel.getId());
664 655 setParentId(destModel.getParentId());
665   - setPid(destModel.getPid());
666 656 //createDate modifyDate
667 657 setHospitalId(destModel.getHospitalId());
668 658 setName(destModel.getName());