|
@@ -17,6 +17,7 @@ import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.utils.PageUtils;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
import com.ozs.common.utils.bean.BeanUtils;
|
|
|
+import com.ozs.system.domain.vo.SysRegionVO;
|
|
|
import com.ozs.system.service.ISysDictDataService;
|
|
|
import com.ozs.system.service.SysRegionService;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -30,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
@@ -54,8 +56,10 @@ public class BaseExpertController extends BaseController {
|
|
|
private BaseProfessionalService baseProfessionalService;
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
+ @Resource
|
|
|
+ private SysRegionService sysRegionService;
|
|
|
|
|
|
- @ApiOperation(value = "新增专家库", notes = "必传 专家库名称")
|
|
|
+ @ApiOperation(value = "新增专家库" , notes = "必传 专家库名称")
|
|
|
@PostMapping("/insertExpert")
|
|
|
@PreAuthorize("@ss.hasPermi('base:expert:insertExpert')")
|
|
|
@Log(title = ModularConstans.expert, businessType = BusinessType.INSERT)
|
|
@@ -82,6 +86,10 @@ public class BaseExpertController extends BaseController {
|
|
|
if (!ObjectUtils.isEmpty(list1) && list1.size() > 0) {
|
|
|
return error("身份证号已经存在");
|
|
|
}
|
|
|
+ SysRegionVO sysRegionVO = sysRegionService.selectInfoByCode(baseExpertVo.getLocalArea());
|
|
|
+ if (ObjectUtils.isEmpty(sysRegionVO)) {
|
|
|
+ return error("该区域在数据库中不存在");
|
|
|
+ }
|
|
|
return toAjax(baseExpertService.insertExpert(baseExpertVo));
|
|
|
}
|
|
|
|
|
@@ -124,6 +132,10 @@ public class BaseExpertController extends BaseController {
|
|
|
return error("身份证号已经存在");
|
|
|
}
|
|
|
}
|
|
|
+ SysRegionVO sysRegionVO = sysRegionService.selectInfoByCode(baseExpert.getLocalArea());
|
|
|
+ if (ObjectUtils.isEmpty(sysRegionVO)) {
|
|
|
+ return error("该区域在数据库中不存在");
|
|
|
+ }
|
|
|
return toAjax(baseExpertService.updateById(baseExpert));
|
|
|
}
|
|
|
|