Commit 8ba47fdc491bd5ac317571ff33d2560d6a238f52
1 parent
e7097ac85d
Exists in
dev
#fix:优化建档列表产检医生查询逻辑增加冗余
Showing 3 changed files with 11 additions and 10 deletions
platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml
View file @
8ba47fd
... | ... | @@ -349,7 +349,7 @@ |
349 | 349 | </select> |
350 | 350 | |
351 | 351 | <select id="getUserId" resultType="java.lang.Integer"> |
352 | - select id from users where org_id=#{orgId} and name=#{doctorName} | |
352 | + select id from users where org_id=#{orgId} and name=#{doctorName} ORDER BY id DESC LIMIT 0,1 | |
353 | 353 | |
354 | 354 | </select> |
355 | 355 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
8ba47fd
... | ... | @@ -398,7 +398,7 @@ |
398 | 398 | //如果建档医生是空则创建医生 |
399 | 399 | if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())) { |
400 | 400 | |
401 | - Integer dockerId = usersService.getUserId(patient.getHospitalId(), yunRequest.getLastCheckEmployeeName()); | |
401 | + Integer dockerId = usersService.getUserId(patient.getHospitalId(), yunRequest.getLastCheckEmployeeName().trim()); | |
402 | 402 | if (dockerId != null) { |
403 | 403 | patient.setLastCheckEmployeeId(String.valueOf(dockerId)); |
404 | 404 | } else { |
... | ... | @@ -408,8 +408,8 @@ |
408 | 408 | users.setType(UserTypeEnum.NORMAL_USER.getId()); //1普通用户 |
409 | 409 | //users.setDeptId(deptId); |
410 | 410 | users.setOrgId(Integer.valueOf(patient.getHospitalId())); |
411 | - users.setName(yunRequest.getLastCheckEmployeeName()); | |
412 | - users.setAccount(yunRequest.getLastCheckEmployeeName()); | |
411 | + users.setName(yunRequest.getLastCheckEmployeeName().trim()); | |
412 | + users.setAccount(yunRequest.getLastCheckEmployeeName().trim()); | |
413 | 413 | //users.setPhone(phone); |
414 | 414 | users.setEnable(1); |
415 | 415 | // users.setZhiChenId(zhiCId); |
... | ... | @@ -1924,7 +1924,7 @@ |
1924 | 1924 | //如果建档医生是空则创建医生 |
1925 | 1925 | if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())) { |
1926 | 1926 | |
1927 | - Integer dockerId = usersService.getUserId(hospitalId, yunRequest.getLastCheckEmployeeName()); | |
1927 | + Integer dockerId = usersService.getUserId(hospitalId, yunRequest.getLastCheckEmployeeName().trim()); | |
1928 | 1928 | if (dockerId != null) { |
1929 | 1929 | patient.setLastCheckEmployeeId(String.valueOf(dockerId)); |
1930 | 1930 | } else { |
... | ... | @@ -1934,8 +1934,8 @@ |
1934 | 1934 | users.setType(UserTypeEnum.NORMAL_USER.getId()); //1普通用户 |
1935 | 1935 | //users.setDeptId(deptId); |
1936 | 1936 | users.setOrgId(Integer.valueOf(StringUtils.isNotEmpty(patient.getHospitalId()) ? patient.getHospitalId() : hospitalId)); |
1937 | - users.setName(yunRequest.getLastCheckEmployeeName()); | |
1938 | - users.setAccount(yunRequest.getLastCheckEmployeeName()); | |
1937 | + users.setName(yunRequest.getLastCheckEmployeeName().trim()); | |
1938 | + users.setAccount(yunRequest.getLastCheckEmployeeName().trim()); | |
1939 | 1939 | //users.setPhone(phone); |
1940 | 1940 | users.setEnable(1); |
1941 | 1941 | // users.setZhiChenId(zhiCId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
8ba47fd
... | ... | @@ -3325,12 +3325,12 @@ |
3325 | 3325 | patientsQuery.setHighRiskFileCode(patientManagerRequest.getHighRiskFileCode()); |
3326 | 3326 | // System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); |
3327 | 3327 | if (StringUtils.isNotEmpty(patientManagerRequest.getLastCheckEmployeeId())){ |
3328 | - /* Integer userCheckId = usersService.getUserId(hospitalId,patientManagerRequest.getLastCheckEmployeeId()); | |
3328 | + Integer userCheckId = usersService.getUserId(hospitalId,patientManagerRequest.getLastCheckEmployeeId()); | |
3329 | 3329 | if (userCheckId!=null){ |
3330 | 3330 | patientsQuery.setLastCheckEmployeeId(String.valueOf(userCheckId)); |
3331 | - }else {*/ | |
3331 | + }else { | |
3332 | 3332 | patientsQuery.setLastCheckEmployeeId(patientManagerRequest.getLastCheckEmployeeId()); |
3333 | - //} | |
3333 | + } | |
3334 | 3334 | } |
3335 | 3335 | |
3336 | 3336 | |
... | ... | @@ -3449,6 +3449,7 @@ |
3449 | 3449 | System.out.println(patients.getId() + ";no user bookbuildingDoctor" + patients.getBookbuildingDoctor()); |
3450 | 3450 | } |
3451 | 3451 | } |
3452 | + //TODO 优化产检医生是汉字的逻辑 | |
3452 | 3453 | String lastCheckEmployeeId = ""; |
3453 | 3454 | if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())) { |
3454 | 3455 | Users user = usersService.getUsers(Integer.valueOf(patients.getLastCheckEmployeeId())); |