Browse Source

20211014修改医院排序

master
zy_Java 4 years ago
parent
commit
611ae17c16
  1. 54
      src/main/java/com/ccsens/carbasics/api/RoleController.java
  2. 3
      src/main/resources/mapper_dao/OrganizationDao.xml

54
src/main/java/com/ccsens/carbasics/api/RoleController.java

@ -41,33 +41,33 @@ public class RoleController {
@RequestMapping(value = "/show", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CRoleVo.QueryRole> queryByProjectId(@ApiParam @Validated @RequestBody QueryDto<CRoleDto.QueryRoleById> params) {
params.getParam().setNum(0);
// CRoleVo.QueryRole queryRole = roleService.queryShowRole(params.getParam(), params.getUserId());
CRoleVo.QueryRole queryRole = roleCarService.queryShowRoleCar(params.getParam(), params.getUserId());
// List<CRoleVo.RoleInfo> r1 = new ArrayList<>();
// List<CRoleVo.RoleInfo> r2 = new ArrayList<>();
// //处理角色,只查看自己所属的角色
// if(ObjectUtil.isNotNull(queryRole)){
// if(CollectionUtil.isNotEmpty(queryRole.getVisibleList())){
// queryRole.getVisibleList().forEach(roleInfo -> {
// if(roleInfo.getMine() == 1){
// r1.add(roleInfo);
// }else {
// r2.add(roleInfo);
// }
// });
// }
// if(CollectionUtil.isNotEmpty(queryRole.getInvisibleList())){
// queryRole.getInvisibleList().forEach(roleInfo -> {
// if(roleInfo.getMine() == 1){
// r1.add(roleInfo);
// }else {
// r2.add(roleInfo);
// }
// });
// }
// }
// queryRole.setVisibleList(r1);
// queryRole.setInvisibleList(r2);
CRoleVo.QueryRole queryRole = roleService.queryShowRole(params.getParam(), params.getUserId());
// CRoleVo.QueryRole queryRole = roleCarService.queryShowRoleCar(params.getParam(), params.getUserId());
List<CRoleVo.RoleInfo> r1 = new ArrayList<>();
List<CRoleVo.RoleInfo> r2 = new ArrayList<>();
//处理角色,只查看自己所属的角色
if(ObjectUtil.isNotNull(queryRole)){
if(CollectionUtil.isNotEmpty(queryRole.getVisibleList())){
queryRole.getVisibleList().forEach(roleInfo -> {
if(roleInfo.getMine() == 1){
r1.add(roleInfo);
}else {
r2.add(roleInfo);
}
});
}
if(CollectionUtil.isNotEmpty(queryRole.getInvisibleList())){
queryRole.getInvisibleList().forEach(roleInfo -> {
if(roleInfo.getMine() == 1){
r1.add(roleInfo);
}else {
r2.add(roleInfo);
}
});
}
}
queryRole.setVisibleList(r1);
queryRole.setInvisibleList(r2);
return JsonResponse.newInstance().ok(queryRole);
}

3
src/main/resources/mapper_dao/OrganizationDao.xml

@ -407,6 +407,7 @@
t1.detail_id = t2.detail_id
and t1.detail_id = t2.detail_id
and t2.detail_id = t3.detail_id
GROUP BY t1.detail_id
)h
LEFT JOIN
(
@ -457,6 +458,8 @@
</choose>
)t on h.detail_id = t.detail_id
LEFT JOIN t_qcp_questionnaire_detail d on h.detail_id = d.id and rec_status = 0
WHERE
d.submit_status = 1
ORDER BY `value` DESC
</select>

Loading…
Cancel
Save