|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ozs.base.domain.BaseExpert;
|
|
|
import com.ozs.base.domain.vo.BaseExpertVo;
|
|
|
+import com.ozs.base.domain.vo.BaseProfessionalVo;
|
|
|
import com.ozs.base.service.BaseExpertService;
|
|
|
import com.ozs.common.annotation.Log;
|
|
|
import com.ozs.common.constant.ModularConstans;
|
|
@@ -12,6 +13,8 @@ import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
+import com.ozs.common.utils.bean.BeanUtils;
|
|
|
+import com.ozs.system.service.SysRegionService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.joda.time.DateTime;
|
|
@@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 专家库管理
|
|
@@ -38,6 +42,8 @@ public class BaseExpertController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private BaseExpertService baseExpertService;
|
|
|
+ @Autowired
|
|
|
+ private SysRegionService sysRegionService;
|
|
|
|
|
|
@ApiOperation(value = "新增专家库", notes = "必传 专家库名称")
|
|
|
@PostMapping("/insertExpert")
|
|
@@ -90,6 +96,14 @@ public class BaseExpertController extends BaseController {
|
|
|
}
|
|
|
IPage<BaseExpert> page = baseExpertService.page(new Page<BaseExpert>(baseExpertVo.getPageNum(), baseExpertVo.getPageSize()), lw);
|
|
|
// todo 把 localArea 翻译为 省/市/县,存localAreaName中,(使用SysRegionService的getParentAdministrativeDivisionNames方法)
|
|
|
+ List<BaseExpert> records = page.getRecords();
|
|
|
+ for (BaseExpert baseExpert : records) {
|
|
|
+ if (StringUtils.isNotNull(baseExpert.getLocalArea())) {
|
|
|
+ String parentAdministrativeDivisionNames = sysRegionService.getParentAdministrativeDivisionNames(baseExpert.getLocalArea());
|
|
|
+ baseExpert.setLocalAreaName(parentAdministrativeDivisionNames);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ page.setRecords(records);
|
|
|
return success(page);
|
|
|
}
|
|
|
|