|
@@ -19,8 +19,10 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.dal.entity.TeacherContracts;
|
|
|
import com.ym.mec.biz.service.TeacherContractsService;
|
|
|
+import com.ym.mec.biz.service.TeacherService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
|
|
@@ -34,6 +36,9 @@ public class TeacherContractController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TeacherService teacherService;
|
|
|
|
|
|
@ApiOperation(value = "是否需要签订协议")
|
|
|
@GetMapping("/isRequireSign")
|
|
@@ -44,6 +49,13 @@ public class TeacherContractController extends BaseController {
|
|
|
}
|
|
|
|
|
|
if (sysUser.getTenantId() == 1) {
|
|
|
+ //判断分部
|
|
|
+ Teacher teacher = teacherService.get(sysUser.getId());
|
|
|
+
|
|
|
+ if(teacher == null || (teacher.getOrganId() == 55 ||teacher.getOrganId() == 59)){
|
|
|
+ return succeed(false);
|
|
|
+ }
|
|
|
+
|
|
|
TeacherContracts teacherContracts = teacherContractsService.queryByUserId(sysUser.getId());
|
|
|
if (teacherContracts == null) {
|
|
|
return succeed(true);
|