Quellcode durchsuchen

Merge branch 'dev' of liuwenbin/patient-co-management into dev

yeshijie vor 7 Jahren
Ursprung
Commit
f27cf6351c

+ 10 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1551,7 +1551,13 @@ public class DoctorInfoService extends BaseService {
    }
    public List<Map<String,Object>>  getDoctorManagerRole(String code) {
    /**
     *
     * @param code 医生code
     * @param authenCode 权限code
     * @return
     */
    public List<Map<String,Object>>  getDoctorManagerRole(String code,String authenCode) {
        //获取医生在后台管理系统的权限  wlly_user的code是wlyy_doctor的code
        String sql=" select f.url url,f.code code from " +
                " wlyy_user u," +
@ -1563,6 +1569,9 @@ public class DoctorInfoService extends BaseService {
                " ru.role_id=rf.role_id and" +
                " rf.feature_id=f.id and" +
                " u.`code`='"+code+"'";
        if(StringUtils.isNotEmpty(authenCode)){
            sql+=" and f.code='"+authenCode+"'";
        }
        return jdbcTemplate.queryForList(sql);
    }
}

+ 6 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -13,6 +13,7 @@ import com.yihu.wlyy.entity.education.HealthEduArticle;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.common.account.RoleService;
@ -64,6 +65,8 @@ public class JMJkEduArticleService extends BaseService {
    private CommonUtil commonUtil;
    @Autowired
    private SignPatientLabelInfoService signPatientLabelInfoService;
    @Autowired
    private DoctorInfoService doctorInfoService;
    /**
     *
@ -970,8 +973,9 @@ public class JMJkEduArticleService extends BaseService {
        //当管理员具有审核权限时,添加文章不需认证,添加后自动认证,
        Doctor doctor = doctorDao.findByCode(userCode);
        if(doctor.getLevel()==10){
            List<RoleWithAuthorityCheck> list = doctorDao.findEduAuthority(userCode,operatorRoleCode);
            if(list.size()>0){
//            List<RoleWithAuthorityCheck> list = doctorDao.findEduAuthority(userCode,operatorRoleCode);
            List<Map<String, Object>> list = doctorInfoService.getDoctorManagerRole(userCode,"Manage_Article_Authentication");
            if(list.size()>0&&!StringUtils.isEmpty(list.get(0).get("code"))){
                isAuthentication = 1;
            }
        }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

@ -112,7 +112,7 @@ public class FileUploadController extends BaseController {
     * @throws IOException
     * @throws IllegalStateException
     */
    @RequestMapping(value = "image", method = RequestMethod.POST/* , headers = "Accept=image/png" */)
    @RequestMapping(value = "image", method = RequestMethod.POST  /*,headers = "Accept=image/png"*/ )
    @ResponseBody
    public String image(HttpServletRequest request, HttpServletResponse response) {
        if (isneiwang) {

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -2056,13 +2056,14 @@ public class DoctorController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/getDoctorManagerRole", method = RequestMethod.GET)
    public String getDoctorManagerRole(
            @ApiParam(required = false, name = "code", value = "医生code") @RequestParam(value = "code", required = false) String code
            @ApiParam(required = false, name = "code", value = "医生code") @RequestParam(value = "code", required = false) String code,
            @ApiParam(required = false, name = "authenCode", value = "权限code,如:Manage_Article_Authentication") @RequestParam(value = "authenCode", required = false) String authenCode
    ) {
        try {
            if (org.springframework.util.StringUtils.isEmpty(code)) {
                code = super.getUID();
            }
            List<Map<String, Object>> returnData = doctorInfoService.getDoctorManagerRole(code);
            List<Map<String, Object>> returnData = doctorInfoService.getDoctorManagerRole(code,authenCode);
            return write(200, "获取成功", "data", returnData);
        } catch (Exception e) {
            error(e);