Commit f955bc3197649d7c0a6cb74b03e7787aa715fbcb
1 parent
9397c55bbe
Exists in
master
and in
6 other branches
秦皇岛一贯制--医生团队
Showing 15 changed files with 630 additions and 22 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/TeamModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TeamController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/TeamModelRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/TeamService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TeamServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
View file @
f955bc3
| ... | ... | @@ -260,6 +260,9 @@ |
| 260 | 260 | logger.info("antex find patient by id is null. parentId:" + antEx.getParentId()); |
| 261 | 261 | return null; |
| 262 | 262 | } |
| 263 | + antExRecordModel.setTeamIdOld(antEx.getTeamIdOld());//产团 | |
| 264 | + antExRecordModel.setTeamIdNew(antEx.getTeamIdNew()); | |
| 265 | + antExRecordModel.setReason(antEx.getReason()); | |
| 263 | 266 | return antExRecordModel; |
| 264 | 267 | } |
| 265 | 268 | |
| ... | ... | @@ -342,6 +345,9 @@ |
| 342 | 345 | logger.info("antexc find patient by id is null. parentId:" + antExChuModel.getParentId()); |
| 343 | 346 | return null; |
| 344 | 347 | } |
| 348 | + antExRecordModel.setTeamIdOld(antExChuModel.getTeamIdOld());//产团 | |
| 349 | + antExRecordModel.setTeamIdNew(antExChuModel.getTeamIdNew()); | |
| 350 | + antExRecordModel.setReason(antExChuModel.getReason()); | |
| 345 | 351 | return antExRecordModel; |
| 346 | 352 | } |
| 347 | 353 |
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
View file @
f955bc3
| ... | ... | @@ -485,6 +485,34 @@ |
| 485 | 485 | //孕妇NT |
| 486 | 486 | private String wcNt; |
| 487 | 487 | |
| 488 | + private String teamIdOld;//旧医生团队 | |
| 489 | + private String teamIdNew;//新医生团队 | |
| 490 | + private String reason;//换团队的原因 | |
| 491 | + | |
| 492 | + public String getTeamIdOld() { | |
| 493 | + return teamIdOld; | |
| 494 | + } | |
| 495 | + | |
| 496 | + public void setTeamIdOld(String teamIdOld) { | |
| 497 | + this.teamIdOld = teamIdOld; | |
| 498 | + } | |
| 499 | + | |
| 500 | + public String getTeamIdNew() { | |
| 501 | + return teamIdNew; | |
| 502 | + } | |
| 503 | + | |
| 504 | + public void setTeamIdNew(String teamIdNew) { | |
| 505 | + this.teamIdNew = teamIdNew; | |
| 506 | + } | |
| 507 | + | |
| 508 | + public String getReason() { | |
| 509 | + return reason; | |
| 510 | + } | |
| 511 | + | |
| 512 | + public void setReason(String reason) { | |
| 513 | + this.reason = reason; | |
| 514 | + } | |
| 515 | + | |
| 488 | 516 | public String getWcNt() { |
| 489 | 517 | return wcNt; |
| 490 | 518 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
View file @
f955bc3
| ... | ... | @@ -132,6 +132,34 @@ |
| 132 | 132 | */ |
| 133 | 133 | private String sieveType; |
| 134 | 134 | |
| 135 | + private String teamIdOld;//旧医生团队 | |
| 136 | + private String teamIdNew;//新医生团队 | |
| 137 | + private String reason;//换团队的原因 | |
| 138 | + | |
| 139 | + public String getTeamIdOld() { | |
| 140 | + return teamIdOld; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public void setTeamIdOld(String teamIdOld) { | |
| 144 | + this.teamIdOld = teamIdOld; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public String getTeamIdNew() { | |
| 148 | + return teamIdNew; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public void setTeamIdNew(String teamIdNew) { | |
| 152 | + this.teamIdNew = teamIdNew; | |
| 153 | + } | |
| 154 | + | |
| 155 | + public String getReason() { | |
| 156 | + return reason; | |
| 157 | + } | |
| 158 | + | |
| 159 | + public void setReason(String reason) { | |
| 160 | + this.reason = reason; | |
| 161 | + } | |
| 162 | + | |
| 135 | 163 | public String getSieveType() { |
| 136 | 164 | return sieveType; |
| 137 | 165 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java
View file @
f955bc3
| ... | ... | @@ -389,6 +389,34 @@ |
| 389 | 389 | */ |
| 390 | 390 | private String sieveType; |
| 391 | 391 | |
| 392 | + private String teamIdOld;//旧医生团队 | |
| 393 | + private String teamIdNew;//新医生团队 | |
| 394 | + private String reason;//换团队的原因 | |
| 395 | + | |
| 396 | + public String getTeamIdOld() { | |
| 397 | + return teamIdOld; | |
| 398 | + } | |
| 399 | + | |
| 400 | + public void setTeamIdOld(String teamIdOld) { | |
| 401 | + this.teamIdOld = teamIdOld; | |
| 402 | + } | |
| 403 | + | |
| 404 | + public String getTeamIdNew() { | |
| 405 | + return teamIdNew; | |
| 406 | + } | |
| 407 | + | |
| 408 | + public void setTeamIdNew(String teamIdNew) { | |
| 409 | + this.teamIdNew = teamIdNew; | |
| 410 | + } | |
| 411 | + | |
| 412 | + public String getReason() { | |
| 413 | + return reason; | |
| 414 | + } | |
| 415 | + | |
| 416 | + public void setReason(String reason) { | |
| 417 | + this.reason = reason; | |
| 418 | + } | |
| 419 | + | |
| 392 | 420 | public String getSieveType() { |
| 393 | 421 | return sieveType; |
| 394 | 422 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/TeamModel.java
View file @
f955bc3
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import lombok.Data; | |
| 6 | +import org.springframework.data.annotation.Id; | |
| 7 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 医院团队 | |
| 14 | + */ | |
| 15 | +@Document(collection = "lyms_team") | |
| 16 | +@Data | |
| 17 | +public class TeamModel extends BaseModel { | |
| 18 | + | |
| 19 | + @Id | |
| 20 | + private String id; | |
| 21 | + | |
| 22 | + private String teamName;//团队名称 | |
| 23 | + //团队包含的医生 | |
| 24 | + private List<String> doctorIdArr; | |
| 25 | + private String hospitalId; | |
| 26 | + | |
| 27 | + private Date created; | |
| 28 | + private Date modified; | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TeamController.java
View file @
f955bc3
| 1 | +package com.lyms.platform.operate.web.controller; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.common.annotation.TokenRequired; | |
| 5 | +import com.lyms.platform.common.base.BaseController; | |
| 6 | +import com.lyms.platform.common.result.BaseResponse; | |
| 7 | +import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
| 8 | +import com.lyms.platform.operate.web.facade.BabyHealthFacade; | |
| 9 | +import com.lyms.platform.operate.web.request.TeamModelRequest; | |
| 10 | +import com.lyms.platform.operate.web.service.PatientWeightService; | |
| 11 | +import com.lyms.platform.operate.web.service.TeamService; | |
| 12 | +import com.lyms.platform.permission.service.CouponService; | |
| 13 | +import com.lyms.platform.permission.service.UsersService; | |
| 14 | +import com.lyms.platform.pojo.TeamModel; | |
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 16 | +import org.springframework.stereotype.Controller; | |
| 17 | +import org.springframework.web.bind.annotation.*; | |
| 18 | + | |
| 19 | +import javax.servlet.http.HttpServletRequest; | |
| 20 | +import javax.servlet.http.HttpServletResponse; | |
| 21 | + | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 一贯制(团队)管理 | |
| 25 | + */ | |
| 26 | +@Controller | |
| 27 | +@RequestMapping("team") | |
| 28 | +public class TeamController extends BaseController { | |
| 29 | + | |
| 30 | + | |
| 31 | + @Autowired | |
| 32 | + private BabyHealthFacade babyHealthFacade; | |
| 33 | + @Autowired | |
| 34 | + private PatientWeightService patientWeightService; | |
| 35 | + @Autowired | |
| 36 | + private AutoMatchFacade autoMatchFacade; | |
| 37 | + | |
| 38 | + @Autowired | |
| 39 | + private UsersService usersService; | |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + private TeamService teamService; | |
| 43 | + | |
| 44 | + /** | |
| 45 | + *团队列表 | |
| 46 | + * @param hospitalId | |
| 47 | + * @param teamName | |
| 48 | + * @param page | |
| 49 | + * @param limit | |
| 50 | + * @param request | |
| 51 | + * @return | |
| 52 | + */ | |
| 53 | + @RequestMapping(value = "/queryList", method = RequestMethod.GET) | |
| 54 | + @ResponseBody | |
| 55 | + @TokenRequired | |
| 56 | + public BaseResponse queryList( | |
| 57 | + @RequestParam(value = "hospitalId", required = false) String hospitalId, | |
| 58 | + @RequestParam(value = "teamName", required = false) String teamName, | |
| 59 | + Integer page, Integer limit, HttpServletRequest request) { | |
| 60 | + return teamService.queryList(teamName, hospitalId, page, limit, getUserId(request)); | |
| 61 | + } | |
| 62 | + | |
| 63 | + @RequestMapping(value = "/addTeam", method = RequestMethod.POST) | |
| 64 | + @ResponseBody | |
| 65 | + @TokenRequired | |
| 66 | + public BaseResponse addTeam(@RequestBody TeamModelRequest team, HttpServletRequest request, HttpServletResponse response) { | |
| 67 | + BaseResponse baseResponse=new BaseResponse(); | |
| 68 | + baseResponse=teamService.addTeam(team); | |
| 69 | + return baseResponse; | |
| 70 | + } | |
| 71 | + | |
| 72 | + @RequestMapping(value = "/delTeam/{teamId}", method = RequestMethod.GET) | |
| 73 | + @ResponseBody | |
| 74 | + @TokenRequired | |
| 75 | + public BaseResponse delTeam(@PathVariable("teamId") String teamId,HttpServletRequest request, HttpServletResponse response) { | |
| 76 | + BaseResponse baseResponse=new BaseResponse(); | |
| 77 | + baseResponse=teamService.delTeam(teamId); | |
| 78 | + return baseResponse; | |
| 79 | + } | |
| 80 | + | |
| 81 | + @RequestMapping(value = "/optTeamDoc", method = RequestMethod.GET) | |
| 82 | + @ResponseBody | |
| 83 | + @TokenRequired | |
| 84 | + public BaseResponse optTeamDoc(String teamId,String docId,String opt, HttpServletRequest request, HttpServletResponse response) { | |
| 85 | + BaseResponse baseResponse=new BaseResponse(); | |
| 86 | + baseResponse=teamService.optTeamDoc(teamId,docId,opt); | |
| 87 | + return baseResponse; | |
| 88 | + } | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 团队医生列表 | |
| 94 | + * @param teamId | |
| 95 | + * @param request | |
| 96 | + * @param response | |
| 97 | + * @return | |
| 98 | + */ | |
| 99 | + @RequestMapping(value = "/teamDocList", method = RequestMethod.GET) | |
| 100 | + @ResponseBody | |
| 101 | + @TokenRequired | |
| 102 | + public BaseResponse teamDocList(String teamId,HttpServletRequest request, HttpServletResponse response) { | |
| 103 | + BaseResponse baseResponse=new BaseResponse(); | |
| 104 | + baseResponse=teamService.teamDocList(teamId); | |
| 105 | + return baseResponse; | |
| 106 | + } | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 没有在团队的医生列表 | |
| 110 | + * @param teamId | |
| 111 | + * @param request | |
| 112 | + * @param response | |
| 113 | + * @return | |
| 114 | + */ | |
| 115 | + @RequestMapping(value = "/teamNonDocList", method = RequestMethod.GET) | |
| 116 | + @ResponseBody | |
| 117 | + @TokenRequired | |
| 118 | + public BaseResponse teamNonDocList(String teamId,String hospitalId,HttpServletRequest request, HttpServletResponse response) { | |
| 119 | + BaseResponse baseResponse=new BaseResponse(); | |
| 120 | + baseResponse=teamService.teamNonDocList(teamId,hospitalId); | |
| 121 | + return baseResponse; | |
| 122 | + } | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 根据医生ID获取团队信息 | |
| 126 | + * @param docId | |
| 127 | + * @param request | |
| 128 | + * @param response | |
| 129 | + * @return | |
| 130 | + */ | |
| 131 | + @RequestMapping(value = "/getTeamByDocId", method = RequestMethod.GET) | |
| 132 | + @ResponseBody | |
| 133 | + @TokenRequired | |
| 134 | + public BaseResponse getTeamByDocId(String docId,HttpServletRequest request, HttpServletResponse response) { | |
| 135 | + BaseResponse baseResponse=new BaseResponse(); | |
| 136 | + baseResponse=teamService.getTeamByDocId(docId); | |
| 137 | + return baseResponse; | |
| 138 | + } | |
| 139 | + | |
| 140 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
f955bc3
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
| 15 | 15 | import com.lyms.platform.operate.web.request.NutritionInfoRequest; |
| 16 | 16 | import com.lyms.platform.operate.web.result.*; |
| 17 | +import com.lyms.platform.operate.web.service.TeamService; | |
| 17 | 18 | import com.lyms.platform.operate.web.utils.FunvCommonUtil; |
| 18 | 19 | import com.lyms.platform.operate.web.utils.ResolveUtils; |
| 19 | 20 | import com.lyms.platform.operate.web.utils.UnitConstants; |
| ... | ... | @@ -112,6 +113,10 @@ |
| 112 | 113 | @Autowired |
| 113 | 114 | @Qualifier("cfCheckItemService") |
| 114 | 115 | private CheckItemService checkItemService; |
| 116 | + | |
| 117 | + @Autowired | |
| 118 | + private TeamService teamService; | |
| 119 | + | |
| 115 | 120 | public static final Map<String,Integer> RISK_LEVEL = new HashMap<>(); |
| 116 | 121 | static |
| 117 | 122 | { |
| ... | ... | @@ -790,6 +795,17 @@ |
| 790 | 795 | result.setAddr(StringUtils.encryAddr(result.getAddr())); |
| 791 | 796 | } |
| 792 | 797 | } |
| 798 | + | |
| 799 | + //产团 | |
| 800 | + for (AntExManagerResult result : data) { | |
| 801 | + if(null!=result.getTeamIdNew()){ | |
| 802 | + TeamModel teamModel=this.mongoTemplate.findOne(new Query(Criteria.where("id").is(result.getTeamIdNew())),TeamModel.class); | |
| 803 | + if(null!=teamModel){ | |
| 804 | + result.setTeamName(teamModel.getTeamName()); | |
| 805 | + } | |
| 806 | + } | |
| 807 | + } | |
| 808 | + | |
| 793 | 809 | return data; |
| 794 | 810 | } |
| 795 | 811 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
f955bc3
| ... | ... | @@ -15,10 +15,12 @@ |
| 15 | 15 | import com.lyms.platform.common.utils.HttpClientUtil; |
| 16 | 16 | import com.lyms.platform.operate.web.request.MessagesResult; |
| 17 | 17 | import com.lyms.platform.operate.web.result.*; |
| 18 | +import com.lyms.platform.operate.web.service.TeamService; | |
| 18 | 19 | import com.lyms.platform.operate.web.utils.*; |
| 19 | 20 | import com.lyms.platform.operate.web.utils.UnitConstants; |
| 20 | 21 | import com.lyms.platform.permission.model.*; |
| 21 | 22 | import com.lyms.platform.permission.service.CheckItemService; |
| 23 | +import com.lyms.platform.pojo.*; | |
| 22 | 24 | import com.lyms.platform.query.*; |
| 23 | 25 | import net.sf.json.JSONArray; |
| 24 | 26 | import org.apache.commons.collections.CollectionUtils; |
| ... | ... | @@ -68,28 +70,6 @@ |
| 68 | 70 | import com.lyms.platform.permission.service.CouponService; |
| 69 | 71 | import com.lyms.platform.permission.service.OrganizationService; |
| 70 | 72 | import com.lyms.platform.permission.service.UsersService; |
| 71 | -import com.lyms.platform.pojo.AmniocentesisInfoModel; | |
| 72 | -import com.lyms.platform.pojo.AmniocentesisRecordModel; | |
| 73 | -import com.lyms.platform.pojo.AmniocentesisResultModel; | |
| 74 | -import com.lyms.platform.pojo.AntExChuModel; | |
| 75 | -import com.lyms.platform.pojo.AntenatalExaminationModel; | |
| 76 | -import com.lyms.platform.pojo.BabyCheckModel; | |
| 77 | -import com.lyms.platform.pojo.BabyModel; | |
| 78 | -import com.lyms.platform.pojo.BabyNerveMovementModel; | |
| 79 | -import com.lyms.platform.pojo.BabyNeuroPsychologicalModel; | |
| 80 | -import com.lyms.platform.pojo.BasicConfig; | |
| 81 | -import com.lyms.platform.pojo.DischargeAbstractBabyModel; | |
| 82 | -import com.lyms.platform.pojo.DischargeAbstractMotherModel; | |
| 83 | -import com.lyms.platform.pojo.ExerciseAppraisalModel; | |
| 84 | -import com.lyms.platform.pojo.FilePathModel; | |
| 85 | -import com.lyms.platform.pojo.MaternalDeliverModel; | |
| 86 | -import com.lyms.platform.pojo.Patients; | |
| 87 | -import com.lyms.platform.pojo.PersonModel; | |
| 88 | -import com.lyms.platform.pojo.PlantformConfigModel; | |
| 89 | -import com.lyms.platform.pojo.PostReviewModel; | |
| 90 | -import com.lyms.platform.pojo.ReferralApplyOrderModel; | |
| 91 | -import com.lyms.platform.pojo.ResidentsArchiveModel; | |
| 92 | -import com.lyms.platform.pojo.StopPregModel; | |
| 93 | 73 | |
| 94 | 74 | /** |
| 95 | 75 | * Created by Administrator on 2017/1/16 0016. |
| ... | ... | @@ -184,6 +164,9 @@ |
| 184 | 164 | @Qualifier("cfCheckItemService") |
| 185 | 165 | private CheckItemService checkItemService; |
| 186 | 166 | |
| 167 | + @Autowired | |
| 168 | + private TeamService teamService; | |
| 169 | + | |
| 187 | 170 | /** |
| 188 | 171 | * 建档查询 |
| 189 | 172 | * |
| 190 | 173 | |
| 191 | 174 | |
| ... | ... | @@ -3120,14 +3103,24 @@ |
| 3120 | 3103 | // private String jzxgn; |
| 3121 | 3104 | |
| 3122 | 3105 | String checkDoctor = ""; |
| 3106 | + String teamName=""; | |
| 3123 | 3107 | |
| 3124 | 3108 | if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getCheckDoctor())) { |
| 3125 | 3109 | Users users = usersService.getUsers(Integer.parseInt(data.getCheckDoctor())); |
| 3126 | 3110 | if (users != null && users.getYn() == YnEnums.YES.getId()) { |
| 3127 | 3111 | checkDoctor = users.getName(); |
| 3128 | 3112 | } |
| 3113 | + | |
| 3114 | + //医生所在团队 | |
| 3115 | + BaseObjectResponse tbase=teamService.getTeamByDocId(data.getCheckDoctor()); | |
| 3116 | + if(null!=tbase.getData()){ | |
| 3117 | + TeamModel tm=(TeamModel)(tbase.getData()); | |
| 3118 | + teamName=tm.getTeamName(); | |
| 3119 | + } | |
| 3129 | 3120 | } |
| 3130 | 3121 | map.put("checkDoctor", checkDoctor); |
| 3122 | + | |
| 3123 | + map.put("team",teamName); | |
| 3131 | 3124 | |
| 3132 | 3125 | String hospital = ""; |
| 3133 | 3126 | Organization organization = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
View file @
f955bc3
| ... | ... | @@ -374,6 +374,34 @@ |
| 374 | 374 | */ |
| 375 | 375 | private String sieveType; |
| 376 | 376 | |
| 377 | + private String teamIdOld;//旧医生团队 | |
| 378 | + private String teamIdNew;//新医生团队 | |
| 379 | + private String reason;//换团队的原因 | |
| 380 | + | |
| 381 | + public String getTeamIdOld() { | |
| 382 | + return teamIdOld; | |
| 383 | + } | |
| 384 | + | |
| 385 | + public void setTeamIdOld(String teamIdOld) { | |
| 386 | + this.teamIdOld = teamIdOld; | |
| 387 | + } | |
| 388 | + | |
| 389 | + public String getTeamIdNew() { | |
| 390 | + return teamIdNew; | |
| 391 | + } | |
| 392 | + | |
| 393 | + public void setTeamIdNew(String teamIdNew) { | |
| 394 | + this.teamIdNew = teamIdNew; | |
| 395 | + } | |
| 396 | + | |
| 397 | + public String getReason() { | |
| 398 | + return reason; | |
| 399 | + } | |
| 400 | + | |
| 401 | + public void setReason(String reason) { | |
| 402 | + this.reason = reason; | |
| 403 | + } | |
| 404 | + | |
| 377 | 405 | public String getSieveType() { |
| 378 | 406 | return sieveType; |
| 379 | 407 | } |
| ... | ... | @@ -1445,6 +1473,10 @@ |
| 1445 | 1473 | examinationModel.setOperaterUserId(operaterUserId); |
| 1446 | 1474 | examinationModel.setSieveType(sieveType); |
| 1447 | 1475 | |
| 1476 | + //产团 | |
| 1477 | + examinationModel.setTeamIdOld(teamIdOld); | |
| 1478 | + examinationModel.setTeamIdNew(teamIdNew); | |
| 1479 | + examinationModel.setReason(reason); | |
| 1448 | 1480 | |
| 1449 | 1481 | return examinationModel; |
| 1450 | 1482 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
View file @
f955bc3
| ... | ... | @@ -477,6 +477,36 @@ |
| 477 | 477 | //孕妇NT |
| 478 | 478 | private String wcNt; |
| 479 | 479 | |
| 480 | + | |
| 481 | + private String teamIdOld;//旧医生团队 | |
| 482 | + private String teamIdNew;//新医生团队 | |
| 483 | + private String reason;//换团队的原因 | |
| 484 | + | |
| 485 | + public String getTeamIdOld() { | |
| 486 | + return teamIdOld; | |
| 487 | + } | |
| 488 | + | |
| 489 | + public void setTeamIdOld(String teamIdOld) { | |
| 490 | + this.teamIdOld = teamIdOld; | |
| 491 | + } | |
| 492 | + | |
| 493 | + public String getTeamIdNew() { | |
| 494 | + return teamIdNew; | |
| 495 | + } | |
| 496 | + | |
| 497 | + public void setTeamIdNew(String teamIdNew) { | |
| 498 | + this.teamIdNew = teamIdNew; | |
| 499 | + } | |
| 500 | + | |
| 501 | + public String getReason() { | |
| 502 | + return reason; | |
| 503 | + } | |
| 504 | + | |
| 505 | + public void setReason(String reason) { | |
| 506 | + this.reason = reason; | |
| 507 | + } | |
| 508 | + | |
| 509 | + | |
| 480 | 510 | public String getWcNt() { |
| 481 | 511 | return wcNt; |
| 482 | 512 | } |
| ... | ... | @@ -2404,6 +2434,12 @@ |
| 2404 | 2434 | if (StringUtils.isNotEmpty(wcNt)) { |
| 2405 | 2435 | antExChuModel.setWcNt(wcNt); |
| 2406 | 2436 | } |
| 2437 | + | |
| 2438 | + //产团 | |
| 2439 | + antExChuModel.setTeamIdOld(teamIdOld); | |
| 2440 | + antExChuModel.setTeamIdNew(teamIdNew); | |
| 2441 | + antExChuModel.setReason(reason); | |
| 2442 | + | |
| 2407 | 2443 | return antExChuModel; |
| 2408 | 2444 | } |
| 2409 | 2445 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/TeamModelRequest.java
View file @
f955bc3
| 1 | +package com.lyms.platform.operate.web.request; | |
| 2 | + | |
| 3 | +import com.lyms.platform.pojo.TeamModel; | |
| 4 | + | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | + | |
| 8 | +public class TeamModelRequest extends TeamModel { | |
| 9 | + private List<String> doctorArr; | |
| 10 | + | |
| 11 | + public List<String> getDoctorArr() { | |
| 12 | + return doctorArr; | |
| 13 | + } | |
| 14 | + | |
| 15 | + public void setDoctorArr(List<String> doctorArr) { | |
| 16 | + this.doctorArr = doctorArr; | |
| 17 | + } | |
| 18 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
View file @
f955bc3
| ... | ... | @@ -83,6 +83,43 @@ |
| 83 | 83 | |
| 84 | 84 | private String sieveType; |
| 85 | 85 | |
| 86 | + private String teamName;//产团 | |
| 87 | + private String reason; | |
| 88 | + private String teamIdOld; | |
| 89 | + private String teamIdNew; | |
| 90 | + | |
| 91 | + public String getTeamIdOld() { | |
| 92 | + return teamIdOld; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setTeamIdOld(String teamIdOld) { | |
| 96 | + this.teamIdOld = teamIdOld; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public String getTeamIdNew() { | |
| 100 | + return teamIdNew; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setTeamIdNew(String teamIdNew) { | |
| 104 | + this.teamIdNew = teamIdNew; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public String getTeamName() { | |
| 108 | + return teamName; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public void setTeamName(String teamName) { | |
| 112 | + this.teamName = teamName; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public String getReason() { | |
| 116 | + return reason; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public void setReason(String reason) { | |
| 120 | + this.reason = reason; | |
| 121 | + } | |
| 122 | + | |
| 86 | 123 | public String getSieveType() { |
| 87 | 124 | return sieveType; |
| 88 | 125 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/TeamService.java
View file @
f955bc3
| 1 | +package com.lyms.platform.operate.web.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 4 | +import com.lyms.platform.common.result.BaseResponse; | |
| 5 | +import com.lyms.platform.operate.web.request.TeamModelRequest; | |
| 6 | +import com.lyms.platform.pojo.PatientWeight; | |
| 7 | +import com.lyms.platform.pojo.Patients; | |
| 8 | +import com.lyms.platform.pojo.WeightConfigModel; | |
| 9 | + | |
| 10 | +import java.util.Date; | |
| 11 | +import java.util.List; | |
| 12 | +import java.util.Map; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Created by cpf on 2021-10-15 15:25:13 | |
| 16 | + */ | |
| 17 | +public interface TeamService extends IBaseService { | |
| 18 | + | |
| 19 | + BaseResponse queryList(String teamName, String hospitalId, Integer page, Integer limit, Integer userId); | |
| 20 | + BaseResponse addTeam(TeamModelRequest team); | |
| 21 | + | |
| 22 | + BaseResponse delTeam(String teamId); | |
| 23 | + | |
| 24 | + BaseResponse optTeamDoc(String teamId, String docId,String opt); | |
| 25 | + | |
| 26 | + BaseResponse teamDocList(String teamId); | |
| 27 | + | |
| 28 | + BaseResponse teamNonDocList(String teamId, String hospitalId); | |
| 29 | + | |
| 30 | + BaseObjectResponse getTeamByDocId(String docId); | |
| 31 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TeamServiceImpl.java
View file @
f955bc3
| 1 | +package com.lyms.platform.operate.web.service.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 4 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 5 | +import com.lyms.platform.common.result.BaseResponse; | |
| 6 | +import com.lyms.platform.common.result.PageResult; | |
| 7 | +import com.lyms.platform.common.result.RespBuilder; | |
| 8 | +import com.lyms.platform.operate.web.request.TeamModelRequest; | |
| 9 | +import com.lyms.platform.operate.web.service.TeamService; | |
| 10 | +import com.lyms.platform.permission.model.Users; | |
| 11 | +import com.lyms.platform.permission.model.UsersQuery; | |
| 12 | +import com.lyms.platform.permission.service.UsersService; | |
| 13 | +import com.lyms.platform.pojo.BabyEyeCheck; | |
| 14 | +import com.lyms.platform.pojo.TeamModel; | |
| 15 | +import org.apache.commons.lang3.StringUtils; | |
| 16 | +import org.springframework.beans.BeanUtils; | |
| 17 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 18 | +import org.springframework.data.domain.Sort; | |
| 19 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 20 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 21 | +import org.springframework.data.mongodb.core.query.Query; | |
| 22 | +import org.springframework.stereotype.Service; | |
| 23 | + | |
| 24 | +import java.util.ArrayList; | |
| 25 | +import java.util.Date; | |
| 26 | +import java.util.List; | |
| 27 | + | |
| 28 | +@Service | |
| 29 | +public class TeamServiceImpl implements TeamService { | |
| 30 | + @Autowired | |
| 31 | + private UsersService usersService; | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + private MongoTemplate mongoTemplate; | |
| 35 | + | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public PageResult findPage(String sql, Integer currentPage, Integer pageSize, List<Object> params) { | |
| 39 | + return null; | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public <T> PageResult findMongoPage(Class<T> entity, Query query, Integer page, Integer limit) { | |
| 44 | + if(page == null) { | |
| 45 | + page = 1; | |
| 46 | + } | |
| 47 | + if(limit == null) { | |
| 48 | + limit = 15; | |
| 49 | + } | |
| 50 | + | |
| 51 | + Long count = mongoTemplate.count(query, entity); | |
| 52 | + query.skip((page - 1) * limit); | |
| 53 | + query.limit(limit); | |
| 54 | + List<T> rows = mongoTemplate.find(query, entity); | |
| 55 | + return new PageResult(count.intValue(), page, limit, rows); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public BaseResponse queryList(String teamName, String hospitalId, Integer page, Integer limit, Integer userId) { | |
| 60 | + Criteria criteria=new Criteria(); | |
| 61 | + if(StringUtils.isNotEmpty(hospitalId)){ | |
| 62 | + criteria.and("hospitalId").is(hospitalId); | |
| 63 | + } | |
| 64 | + PageResult pageResult = findMongoPage(TeamModel.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); | |
| 65 | + List<TeamModel> babyEyeChecks = (List<TeamModel>) pageResult.getGrid(); | |
| 66 | +// pageResult.setGrid(setDatas(babyEyeChecks)); | |
| 67 | + return RespBuilder.buildSuccess(pageResult); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @Override | |
| 71 | + public BaseResponse addTeam(TeamModelRequest teamReq) { | |
| 72 | + TeamModel teamModel=new TeamModel(); | |
| 73 | + BeanUtils.copyProperties(teamReq,teamModel); | |
| 74 | + teamModel.setCreated(new Date()); | |
| 75 | + this.mongoTemplate.save(teamModel); | |
| 76 | + return new BaseObjectResponse() | |
| 77 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public BaseResponse delTeam(String teamId) { | |
| 82 | + this.mongoTemplate.remove(new Query(Criteria.where("id").is(teamId)),TeamModel.class); | |
| 83 | + return new BaseObjectResponse() | |
| 84 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @Override | |
| 88 | + public BaseResponse optTeamDoc(String teamId, String docId,String opt) { | |
| 89 | + TeamModel teamModel=this.mongoTemplate.findOne(new Query(Criteria.where("id").is(teamId)),TeamModel.class); | |
| 90 | + | |
| 91 | + if("del".equals(opt)){ | |
| 92 | + teamModel.getDoctorIdArr().remove(docId); | |
| 93 | + } | |
| 94 | + if("add".equals(opt)){ | |
| 95 | + teamModel.getDoctorIdArr().add(docId); | |
| 96 | + } | |
| 97 | + this.mongoTemplate.save(teamModel); | |
| 98 | + return new BaseObjectResponse() | |
| 99 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 100 | + } | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * 查询团队医生列表 | |
| 104 | + * @param teamId | |
| 105 | + * @return | |
| 106 | + */ | |
| 107 | + @Override | |
| 108 | + public BaseResponse teamDocList(String teamId) { | |
| 109 | + TeamModel teamModel=this.mongoTemplate.findOne(new Query(Criteria.where("id").is(teamId)),TeamModel.class); | |
| 110 | + UsersQuery usersQuery = new UsersQuery(); | |
| 111 | + final List<Integer> ids=new ArrayList<>(); | |
| 112 | + for (String id : | |
| 113 | + teamModel.getDoctorIdArr()) { | |
| 114 | + ids.add(Integer.valueOf(id)); | |
| 115 | + } | |
| 116 | + usersQuery.setIds(ids); | |
| 117 | + List<Users> uLst=usersService.queryUsers(usersQuery); | |
| 118 | + return new BaseObjectResponse() | |
| 119 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(uLst); | |
| 120 | + } | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * 查询非团队医生 | |
| 124 | + * @param teamId | |
| 125 | + * @param hospitalId | |
| 126 | + * @return | |
| 127 | + */ | |
| 128 | + @Override | |
| 129 | + public BaseResponse teamNonDocList(String teamId, String hospitalId) { | |
| 130 | + List<TeamModel> tLst=this.mongoTemplate.find(new Query(Criteria.where("hospitalId").is(hospitalId)),TeamModel.class); | |
| 131 | + UsersQuery usersQuery = new UsersQuery(); | |
| 132 | + List<Integer> ids=new ArrayList<>(); | |
| 133 | + List<Integer> tIds=new ArrayList<>(); | |
| 134 | + | |
| 135 | + for (TeamModel teamModel : tLst) { | |
| 136 | + List<String> docIds=teamModel.getDoctorIdArr(); | |
| 137 | + for (int i = 0; i < docIds.size(); i++) { | |
| 138 | + tIds.add(Integer.valueOf(docIds.get(i))); | |
| 139 | + } | |
| 140 | + } | |
| 141 | + | |
| 142 | + usersQuery.setOrgId(Integer.parseInt(hospitalId)); | |
| 143 | + | |
| 144 | + List<Users> uLst=usersService.queryUsers(usersQuery); | |
| 145 | + | |
| 146 | + for (Users u : uLst) { | |
| 147 | + ids.add(u.getId()); | |
| 148 | + } | |
| 149 | + | |
| 150 | + ids.removeAll(tIds); | |
| 151 | + usersQuery.setIds(ids); | |
| 152 | + uLst=usersService.queryUsers(usersQuery); | |
| 153 | + | |
| 154 | + return new BaseObjectResponse() | |
| 155 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(uLst); | |
| 156 | + } | |
| 157 | + | |
| 158 | + @Override | |
| 159 | + public BaseObjectResponse getTeamByDocId(String docId) { | |
| 160 | + List<TeamModel> tLst=this.mongoTemplate.find(new Query(Criteria.where("doctorIdArr").is(docId)),TeamModel.class); | |
| 161 | + | |
| 162 | + return new BaseObjectResponse() | |
| 163 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(tLst.size()>0?tLst.get(0):null); | |
| 164 | + } | |
| 165 | + | |
| 166 | + public static void main(String[] args) { | |
| 167 | + List<Integer> l1=new ArrayList<>(); | |
| 168 | + l1.add(1); | |
| 169 | + l1.add(2); | |
| 170 | + l1.add(3); | |
| 171 | + l1.add(4); | |
| 172 | + List<Integer> l2=new ArrayList<>(); | |
| 173 | + l2.add(3); | |
| 174 | + l2.add(4); | |
| 175 | + l2.add(5); | |
| 176 | + l1.removeAll(l2); | |
| 177 | + System.out.println(l1); | |
| 178 | + } | |
| 179 | + | |
| 180 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
View file @
f955bc3