Commit 4813485e0bcc7b3052905b57c4c45f1b71925650

Authored by litao@lymsh.com
1 parent 08970fc22b

改bug

Showing 8 changed files with 58 additions and 34 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/SequenceConstant.java View file @ 4813485
... ... @@ -14,5 +14,9 @@
14 14 public static final String CUSTOM_TYPE = "CUSTOM_TYPE";
15 15 public static final String CUSTOM_CONTENT= "CUSTOM_CONTENT";
16 16  
  17 +
  18 + public static final String PRIENT_TYPE = "PRIENT_QUEUE";
  19 + public static final String PRIENT_REMARK = "是否打印过";
  20 +
17 21 }
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 4813485
... ... @@ -692,7 +692,10 @@
692 692 #{uid}
693 693 </foreach>
694 694 <if test="startDate != null">
695   - and create_date > #{startDate}
  695 + and create_date >= #{startDate}
  696 + </if>
  697 + <if test="endDate != null">
  698 + and create_date <![CDATA[ < ]]> #{endDate}
696 699 </if>
697 700 order by create_date desc
698 701 ) a group by a.ymd, a.user_id
platform-common/src/main/java/com/lyms/platform/common/enums/BasisEnums.java View file @ 4813485
... ... @@ -9,7 +9,8 @@
9 9 A("1", "早孕B超"),
10 10 B("2", "排卵日期"),
11 11 C("3", "同房日期"),
12   - D("4", "中孕B超");
  12 + D("4", "中孕B超"),
  13 + E("5", "其他");
13 14  
14 15 BasisEnums(String id, String name) {
15 16 this.id = id;
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ 4813485
... ... @@ -17,13 +17,32 @@
17 17 private static final long serialVersionUID = SerialIdEnum.Patients.getCid();
18 18  
19 19  
20   -
  20 + // 纠正末次月经
  21 + private String fuckLastMens;
21 22 // 末次月经纠正依据
22 23 private String lastMenstrualPeriodBasis;
  24 + // 末次月经纠正依据
  25 + private String lastMenstrualPeriodBasisOther;
23 26 // 末次月经纠正医生ID
24 27 private String lastMenstrualPeriodBasisDoctorId;
25 28 // 末次月经纠正时间
26 29 private String lastMenstrualPeriodBasisDate;
  30 +
  31 + public String getFuckLastMens() {
  32 + return fuckLastMens;
  33 + }
  34 +
  35 + public String getLastMenstrualPeriodBasisOther() {
  36 + return lastMenstrualPeriodBasisOther;
  37 + }
  38 +
  39 + public void setLastMenstrualPeriodBasisOther(String lastMenstrualPeriodBasisOther) {
  40 + this.lastMenstrualPeriodBasisOther = lastMenstrualPeriodBasisOther;
  41 + }
  42 +
  43 + public void setFuckLastMens(String fuckLastMens) {
  44 + this.fuckLastMens = fuckLastMens;
  45 + }
27 46  
28 47 public String getLastMenstrualPeriodBasis() {
29 48 return lastMenstrualPeriodBasis;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java View file @ 4813485
... ... @@ -35,15 +35,14 @@
35 35  
36 36  
37 37 /**
38   - * 获取初诊复诊是否打印过
  38 + * 获取数据是否打印过
39 39 * type = 1 初诊
40 40 * type = 2 复诊
41 41 */
42 42 @RequestMapping(value = "/get/prient", method = RequestMethod.GET)
43 43 @ResponseBody
44   - @TokenRequired
45   - public BaseObjectResponse getIsPrient(@RequestParam String id, @RequestParam Integer type) {
46   - return viewFacade.getIsPrient(id, type);
  44 + public BaseObjectResponse getIsPrient(@RequestParam String id) {
  45 + return viewFacade.getIsPrient(id);
47 46 }
48 47  
49 48 /**
... ... @@ -53,9 +52,8 @@
53 52 */
54 53 @RequestMapping(value = "/prient", method = RequestMethod.GET)
55 54 @ResponseBody
56   - @TokenRequired
57   - public BaseObjectResponse prient(@RequestParam String id, @RequestParam Integer type) {
58   - return viewFacade.prient(id, type);
  55 + public BaseObjectResponse prient(@RequestParam String id) {
  56 + return viewFacade.prient(id);
59 57 }
60 58  
61 59  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 4813485
... ... @@ -1070,6 +1070,10 @@
1070 1070 List expYunEnums = ExpYunEnums.getExpYunEnums();
1071 1071 typeMap.put("expYunEnums", expYunEnums);
1072 1072  
  1073 + // 末次月经纠正依据
  1074 + List<Map<String, Object>> basis = EnumUtil.toJson(BasisEnums.class);
  1075 + typeMap.put("basisEnmus", basis);
  1076 +
1073 1077 list.add(typeMap);
1074 1078  
1075 1079  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 4813485
1 1 package com.lyms.platform.operate.web.facade;
2 2  
  3 +import com.lyms.platform.biz.SequenceConstant;
3 4 import com.lyms.platform.biz.service.*;
4 5 import com.lyms.platform.common.constants.ErrorCodeConstants;
5 6 import com.lyms.platform.common.enums.*;
... ... @@ -29,6 +30,7 @@
29 30 import org.apache.commons.collections.map.HashedMap;
30 31 import org.apache.commons.lang.StringUtils;
31 32 import org.apache.commons.lang.math.NumberUtils;
  33 +import org.bson.types.ObjectId;
32 34 import org.springframework.beans.factory.annotation.Autowired;
33 35 import org.springframework.data.domain.Sort;
34 36 import org.springframework.data.mongodb.core.MongoTemplate;
35 37  
36 38  
... ... @@ -3699,27 +3701,20 @@
3699 3701 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("未查询到数据");
3700 3702 }
3701 3703  
3702   - public BaseObjectResponse getIsPrient(String id, Integer type) {
3703   - if(type == 1) {
3704   - AntExChuModel chuModel = mongoTemplate.findById(id, AntExChuModel.class);
3705   - if(chuModel != null) {
3706   - return RespBuilder.buildSuccess("isPrient", chuModel.getIsPrient() == null ? false : true);
3707   - }
3708   - } else if (type == 2){
3709   - AntenatalExaminationModel examinationModel = mongoTemplate.findById(id, AntenatalExaminationModel.class);
3710   - if(examinationModel != null) {
3711   - return RespBuilder.buildSuccess("isPrient", examinationModel.getIsPrient() == null ? false : true);
3712   - }
3713   - }
3714   - return RespBuilder.buildSuccess((type == 1 ? "初诊" : "复诊") + "数据未找到");
  3704 + public BaseObjectResponse getIsPrient(String id) {
  3705 + return RespBuilder.buildSuccess(mongoTemplate.exists(Query.query(Criteria.where("value").is(id).and("type").is(SequenceConstant.PRIENT_TYPE)), PlantformConfigModel.class));
3715 3706 }
3716 3707  
3717   - public BaseObjectResponse prient(String id, Integer type) {
3718   - if(type == 1) {
3719   - mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(id)), Update.update("isPrient", 1), AntExChuModel.class);
3720   - } else if (type == 2){
3721   - mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(id)), Update.update("isPrient", 1), AntenatalExaminationModel.class);
  3708 + public BaseObjectResponse prient(String id) {
  3709 + if(mongoTemplate.exists(Query.query(Criteria.where("value").is(id).and("type").is(SequenceConstant.PRIENT_TYPE)), PlantformConfigModel.class)) {
  3710 + return RespBuilder.buildSuccess("已经打印过");
3722 3711 }
  3712 + PlantformConfigModel plantformConfigModel = new PlantformConfigModel();
  3713 + plantformConfigModel.setType(SequenceConstant.PRIENT_TYPE);
  3714 + plantformConfigModel.setRemark(SequenceConstant.PRIENT_REMARK);
  3715 + plantformConfigModel.setCreateDate(new Date());
  3716 + plantformConfigModel.setValue(id);
  3717 + mongoTemplate.save(plantformConfigModel);
3723 3718 return RespBuilder.buildSuccess();
3724 3719 }
3725 3720 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 4813485
... ... @@ -902,8 +902,9 @@
902 902 map.put("week", DateUtil.getWeekDesc(p.getLastMenses(), new Date()));
903 903 map.put("doctorName", couponMapper.getUserName(p.getBookbuildingDoctor()));
904 904 String hName = hospitalNameCache.get(p.getHospitalId());
905   - if(StringUtils.isNotEmpty(hName)) {
  905 + if(StringUtils.isEmpty(hName)) {
906 906 hName = couponMapper.findHospitalNameById(p.getHospitalId());
  907 + hospitalNameCache.put(p.getHospitalId(), hName);
907 908 }
908 909 map.put("hospitalName", hName);
909 910 map.put("checkTime", getCheckTimeByUsedId(patients, antExChuModels, antenatalExaminationModels, maternalDeliverModels, deliverModels, postReviewModels, usedId));
910 911  
... ... @@ -1193,9 +1194,9 @@
1193 1194 if(param.get("hospitalId") instanceof ArrayList) {
1194 1195 List<String> hids = (List<String>) param.get("hospitalId");
1195 1196 if(CollectionUtils.isEmpty(hids)) {
1196   - param.put("hospitalId", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + ""))); /** 模拟根据登陆人id 查询出来的医院 */
  1197 + param.put("hospitalId", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + "")));
1197 1198 }
1198   - param.put("hospitalId", hids); /** 模拟根据登陆人id 查询出来的医院 */
  1199 + param.put("hospitalId", hids);
1199 1200 } else {
1200 1201 if(StringUtils.isBlank((String) param.get("hospitalId"))) {
1201 1202 param.put("hospitalId", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + ""))); /** 模拟根据登陆人id 查询出来的医院 */
... ... @@ -1204,7 +1205,6 @@
1204 1205 }
1205 1206 }
1206 1207  
1207   -
1208 1208 /*
1209 1209 if(StringUtils.isBlank((String) param.get("hospitalId"))) {
1210 1210 param.put("hospitalId", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + ""))); *//** 模拟根据登陆人id 查询出来的医院 *//*
... ... @@ -1285,7 +1285,7 @@
1285 1285 List<String> sendUserIds2 = new ArrayList<>();
1286 1286 if(CollectionUtils.isNotEmpty(sendUserIds)) {
1287 1287 // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(sendUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1288   - List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", sendUserIds, "startDate", param.get("startDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
  1288 + List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", sendUserIds, "startDate", param.get("startDate"), "endDate", param.get("endDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1289 1289 for (Map<String, Object> m : mulitPatienInfo) {
1290 1290 Long count = (Long) m.get("count");
1291 1291 sendUserIds2.add((String) m.get("user_id"));
... ... @@ -1684,7 +1684,7 @@
1684 1684 param2.put("hid", param.get("hospitalId"));
1685 1685 param2.put("uids", ids);
1686 1686 List<Map<String,Object>> userSendInfo = couponMapper.findUserSendInfoByUids(param2);
1687   -
  1687 + System.out.println(ids);
1688 1688 // Integer count = couponMapper.findUserSendInfoCount(param);
1689 1689 for (Map<String, Object> map : userSendInfo) {
1690 1690 String userId = (String) map.get("user_id");