Commit 2ffd07d40d0b226dc342da9a7b8f9cd500d9eb44
1 parent
32374f1b91
Exists in
master
and in
6 other branches
孕产-体重/血糖打印筛选及增加状态
Showing 7 changed files with 48 additions and 14 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/BloodSugar.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodSugarController.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/IBloodSugarService.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/BloodSugarServiceImpl.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/BloodSugar.java
View file @
2ffd07d
| ... | ... | @@ -76,6 +76,19 @@ |
| 76 | 76 | //高危风险id |
| 77 | 77 | private List<String> riskFactorId; |
| 78 | 78 | |
| 79 | + /** | |
| 80 | + * 是否打印过报告 1:已打印 2:未已打印 | |
| 81 | + */ | |
| 82 | + private Integer isPrint ; | |
| 83 | + | |
| 84 | + public Integer getIsPrint() { | |
| 85 | + return isPrint; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setIsPrint(Integer isPrint) { | |
| 89 | + this.isPrint = isPrint; | |
| 90 | + } | |
| 91 | + | |
| 79 | 92 | public List<String> getRiskFactorId() { |
| 80 | 93 | return riskFactorId; |
| 81 | 94 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodSugarController.java
View file @
2ffd07d
| ... | ... | @@ -87,8 +87,8 @@ |
| 87 | 87 | @ResponseBody |
| 88 | 88 | @RequestMapping(method = RequestMethod.GET) |
| 89 | 89 | @TokenRequired |
| 90 | - public BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit, HttpServletRequest request) { | |
| 91 | - return bloodSugarService.list(isAll,key, vcCardNo, weekStart, weekEnd, age, page, limit, getUserId(request)); | |
| 90 | + public BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit,Integer isPrint, HttpServletRequest request) { | |
| 91 | + return bloodSugarService.list(isAll,key, vcCardNo, weekStart, weekEnd, age, page, limit,isPrint, getUserId(request)); | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
View file @
2ffd07d
| ... | ... | @@ -337,18 +337,18 @@ |
| 337 | 337 | |
| 338 | 338 | /** |
| 339 | 339 | * 修改打印状态 |
| 340 | - * @param id 体重id | |
| 341 | - * @param type 1:新增/ 2:打印 | |
| 340 | + * @param id id | |
| 341 | + * @param type 1:体重管理2:血糖管理3:血压管理4:儿童膳食营养管理 | |
| 342 | 342 | * @return |
| 343 | 343 | */ |
| 344 | 344 | @ResponseBody |
| 345 | 345 | @TokenRequired |
| 346 | - @RequestMapping(value = "/upPatientWeight", method = RequestMethod.POST) | |
| 347 | - public BaseResponse upPatientWeight(String id,Integer type, HttpServletRequest request) { | |
| 346 | + @RequestMapping(value = "/updataPrint", method = RequestMethod.POST) | |
| 347 | + public BaseResponse updataPrint(String id,Integer type, HttpServletRequest request) { | |
| 348 | 348 | if(StringUtils.isEmpty(id)||null==type){ |
| 349 | 349 | return new BaseResponse("参数为空",4097); |
| 350 | 350 | } |
| 351 | - return patientWeightService.upPatientWeight(id,type); | |
| 351 | + return patientWeightService.updataPrint(id,type); | |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodSugarService.java
View file @
2ffd07d
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | BaseResponse add(Integer userId, BloodSugar bloodSugar); |
| 14 | 14 | |
| 15 | - BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit, Integer userId); | |
| 15 | + BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit,Integer isPrint, Integer userId); | |
| 16 | 16 | |
| 17 | 17 | BaseResponse info(String parentId, Integer type, Date time); |
| 18 | 18 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
View file @
2ffd07d
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
2ffd07d
| ... | ... | @@ -129,7 +129,7 @@ |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | @Override |
| 132 | - public BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit, Integer userId) { | |
| 132 | + public BaseResponse list(String isAll,String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit,Integer isPrint, Integer userId) { | |
| 133 | 133 | boolean flag = false; |
| 134 | 134 | if (StringUtils.isNotEmpty(key) || StringUtils.isNotEmpty(vcCardNo) || weekEnd != null || weekStart != null || age != null) { |
| 135 | 135 | flag = true; |
| ... | ... | @@ -152,6 +152,9 @@ |
| 152 | 152 | criteria.and("pid").in(pids); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + if(null!=isPrint){ | |
| 156 | + criteria.and("isPrint").is(isPrint); | |
| 157 | + } | |
| 155 | 158 | // List<String> rids = new ArrayList<>(); |
| 156 | 159 | // rids.add("5aab6d3d422b03d4ad2bf83e"); |
| 157 | 160 | // rids.add("5aab6d3e422b03d4ad2bf83f"); |
| ... | ... | @@ -188,6 +191,8 @@ |
| 188 | 191 | temp.put("vcCardNo", p.getVcCardNo()); |
| 189 | 192 | temp.put("pcerteTypeId", p.getPcerteTypeId()); |
| 190 | 193 | temp.put("cardNo", p.getCardNo()); |
| 194 | + temp.put("cardNo", p.getCardNo()); | |
| 195 | + temp.put("isPrint", null==bloodSugar.getIsPrint()?"":bloodSugar.getIsPrint()==1?"已打印":"未打印"); | |
| 191 | 196 | } |
| 192 | 197 | restList.add(temp); |
| 193 | 198 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
2ffd07d
| ... | ... | @@ -113,6 +113,9 @@ |
| 113 | 113 | @Autowired |
| 114 | 114 | private AntExRecordService recordService; |
| 115 | 115 | |
| 116 | + @Autowired | |
| 117 | + private BloodSugarService bloodSugarService; | |
| 118 | + | |
| 116 | 119 | /** |
| 117 | 120 | * 最低:0~13 : 0~1.9 13~40 1.9~11.9 |
| 118 | 121 | * 最高: 0~2.2 2.2~15.9 |
| 119 | 122 | |
| ... | ... | @@ -4198,11 +4201,24 @@ |
| 4198 | 4201 | } |
| 4199 | 4202 | } |
| 4200 | 4203 | @Override |
| 4201 | - public BaseResponse upPatientWeight(String id,Integer type) { | |
| 4204 | + public BaseResponse updataPrint(String id,Integer type) { | |
| 4202 | 4205 | 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 | + switch (type){ | |
| 4207 | + case 1: | |
| 4208 | + PatientWeight patientWeight=new PatientWeight(); | |
| 4209 | + patientWeight.setIsPrint(1); | |
| 4210 | + patientWeightService2.update(Query.query(Criteria.where("id").is(id)),patientWeight ); | |
| 4211 | + break; | |
| 4212 | + case 2: | |
| 4213 | + BloodSugar bloodSugar=new BloodSugar(); | |
| 4214 | + bloodSugar.setId(id); | |
| 4215 | + bloodSugar.setIsPrint(1); | |
| 4216 | + bloodSugarService.update(bloodSugar); | |
| 4217 | + break; | |
| 4218 | + case 3: | |
| 4219 | + break; | |
| 4220 | + } | |
| 4221 | + | |
| 4206 | 4222 | } catch (Exception e) { |
| 4207 | 4223 | e.printStackTrace(); |
| 4208 | 4224 | return new BaseResponse().setErrormsg(ResponseCode.ERROR.getMsg()).setErrorcode(ResponseCode.ERROR.getCode()); |