Commit 32374f1b915da1a5ec8d3fe8211e96b21daa4530
1 parent
7f98b76662
Exists in
master
and in
6 other branches
孕产-体重打印筛选及增加状态
Showing 4 changed files with 53 additions and 4 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
View file @
32374f1
... | ... | @@ -146,6 +146,18 @@ |
146 | 146 | //1孕妇 3产妇 |
147 | 147 | private Integer type; |
148 | 148 | private Integer isUp;//是否增长过快 1和空为正常 2 过快 |
149 | + /** | |
150 | + * 是否打印过报告 1:已打印 2:未已打印 | |
151 | + */ | |
152 | + private Integer isPrint ; | |
153 | + | |
154 | + public Integer getIsPrint() { | |
155 | + return isPrint; | |
156 | + } | |
157 | + | |
158 | + public void setIsPrint(Integer isPrint) { | |
159 | + this.isPrint = isPrint; | |
160 | + } | |
149 | 161 | |
150 | 162 | public Date getBuildDate() { |
151 | 163 | return buildDate; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
View file @
32374f1
... | ... | @@ -5,6 +5,9 @@ |
5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
6 | 6 | import com.lyms.platform.common.result.BaseObjectResponse; |
7 | 7 | import com.lyms.platform.common.result.BaseResponse; |
8 | +import com.lyms.platform.common.result.RespBuilder; | |
9 | +import com.lyms.platform.common.result.ResponseCode; | |
10 | +import com.lyms.platform.common.utils.StringUtils; | |
8 | 11 | import com.lyms.platform.operate.web.service.PatientWeightService; |
9 | 12 | import com.lyms.platform.pojo.PatientWeight; |
10 | 13 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -59,8 +62,8 @@ |
59 | 62 | @TokenRequired |
60 | 63 | @RequestMapping(value = "/query", method = RequestMethod.GET) |
61 | 64 | public BaseResponse list(String isAll,String key, String lastname,String vcCardNo, Integer currentWeekStart, |
62 | - Integer currentWeekEnd, Integer age, Integer page, Integer limit, Integer type, Integer isUp, HttpServletRequest request) { | |
63 | - return patientWeightService.list(isAll,key, lastname, vcCardNo, currentWeekStart, currentWeekEnd, age, page, limit, getUserId(request),type,isUp); | |
65 | + Integer currentWeekEnd, Integer age, Integer page, Integer limit, Integer type, Integer isUp,Integer isPrint, HttpServletRequest request) { | |
66 | + return patientWeightService.list(isAll,key, lastname, vcCardNo, currentWeekStart, currentWeekEnd, age, page, limit, getUserId(request),type,isUp,isPrint); | |
64 | 67 | } |
65 | 68 | |
66 | 69 | /** |
... | ... | @@ -330,6 +333,22 @@ |
330 | 333 | @TokenRequired |
331 | 334 | public BaseResponse updateLastMenstrual(String lastMenstrual, String pid) { |
332 | 335 | return patientWeightService.updateLastMenstrual(lastMenstrual, pid); |
336 | + } | |
337 | + | |
338 | + /** | |
339 | + * 修改打印状态 | |
340 | + * @param id 体重id | |
341 | + * @param type 1:新增/ 2:打印 | |
342 | + * @return | |
343 | + */ | |
344 | + @ResponseBody | |
345 | + @TokenRequired | |
346 | + @RequestMapping(value = "/upPatientWeight", method = RequestMethod.POST) | |
347 | + public BaseResponse upPatientWeight(String id,Integer type, HttpServletRequest request) { | |
348 | + if(StringUtils.isEmpty(id)||null==type){ | |
349 | + return new BaseResponse("参数为空",4097); | |
350 | + } | |
351 | + return patientWeightService.upPatientWeight(id,type); | |
333 | 352 | } |
334 | 353 | |
335 | 354 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
View file @
32374f1
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | |
29 | 29 | BaseResponse addOrUpdate(Integer userId, PatientWeight patientWeight); |
30 | 30 | |
31 | - BaseResponse list(String isAll,String key,String lastname, String vcCardNo, Integer currentWeekStart, Integer currentWeekEnd, Integer age, Integer page, Integer limit, Integer userId,Integer type, Integer isUp); | |
31 | + BaseResponse list(String isAll,String key,String lastname, String vcCardNo, Integer currentWeekStart, Integer currentWeekEnd, Integer age, Integer page, Integer limit, Integer userId,Integer type, Integer isUp,Integer isPrint); | |
32 | 32 | |
33 | 33 | BaseResponse info(String id); |
34 | 34 | |
... | ... | @@ -80,5 +80,6 @@ |
80 | 80 | public Map<String,String> getWeightRangeIsNormal(Patients patients,PatientWeight pw); |
81 | 81 | |
82 | 82 | |
83 | + BaseResponse upPatientWeight(String id,Integer type); | |
83 | 84 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
32374f1
... | ... | @@ -449,7 +449,7 @@ |
449 | 449 | |
450 | 450 | @Override |
451 | 451 | public BaseResponse list(String isAll,String key, String lastname,String vcCardNo, Integer currentWeekStart, Integer currentWeekEnd, |
452 | - Integer age, Integer page, Integer limit, Integer userId,Integer type, Integer isUp) { | |
452 | + Integer age, Integer page, Integer limit, Integer userId,Integer type, Integer isUp,Integer isPrint) { | |
453 | 453 | boolean flag = false; |
454 | 454 | List<String> hospital = groupsFacade.findGroupHospital(userId, false); |
455 | 455 | List<String> hids = new ArrayList<>(); |
... | ... | @@ -508,6 +508,10 @@ |
508 | 508 | { |
509 | 509 | criteria.and("type").is(type); |
510 | 510 | } |
511 | + if (isPrint != null) | |
512 | + { | |
513 | + criteria.and("isPrint").is(isPrint); | |
514 | + } | |
511 | 515 | |
512 | 516 | PageResult pageResult = findMongoPage(PatientWeight.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "modified")), page, limit); |
513 | 517 | List<PatientWeight> patientWeights = (List<PatientWeight>) pageResult.getGrid(); |
... | ... | @@ -545,6 +549,7 @@ |
545 | 549 | temp.put("vcCardNo", p.getVcCardNo()); |
546 | 550 | temp.put("pcerteTypeId", p.getPcerteTypeId()); |
547 | 551 | temp.put("cardNo", p.getCardNo()); |
552 | + temp.put("isPrint", null==patientWeight.getIsPrint()?"":patientWeight.getIsPrint()==1?"已打印":"未打印"); | |
548 | 553 | restMap.add(temp); |
549 | 554 | } |
550 | 555 | } |
... | ... | @@ -4191,6 +4196,18 @@ |
4191 | 4196 | } else { |
4192 | 4197 | return null; |
4193 | 4198 | } |
4199 | + } | |
4200 | + @Override | |
4201 | + public BaseResponse upPatientWeight(String id,Integer type) { | |
4202 | + try { | |
4203 | + PatientWeight patientWeight=new PatientWeight(); | |
4204 | + patientWeight.setIsPrint(type==1?2:1); | |
4205 | + patientWeightService2.update(Query.query(Criteria.where("id").is(id)),patientWeight ); | |
4206 | + } catch (Exception e) { | |
4207 | + e.printStackTrace(); | |
4208 | + return new BaseResponse().setErrormsg(ResponseCode.ERROR.getMsg()).setErrorcode(ResponseCode.ERROR.getCode()); | |
4209 | + } | |
4210 | + return new BaseResponse().setErrormsg(ResponseCode.SUCCESS.getMsg()).setErrorcode(ResponseCode.SUCCESS.getCode()); | |
4194 | 4211 | } |
4195 | 4212 | |
4196 | 4213 | } |