Commit e3f82f72 by 张晓

技术员中心点参数检验

1 parent 639a4274
......@@ -5,6 +5,7 @@ import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.dto.EngineerBusinessDTO;
import com.dituhui.pea.order.service.EngineerBusinessService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -25,10 +26,14 @@ public class EngineerCenterPoiController {
@GetMapping("/engineer-center/list")
public Result<?> getEngineerCenterList(@Validated EngineerBusinessDTO.Request engineerReq) {
// 获取工程师基础信息列表
// 获取工程师中心点信息列表
if (!"group".equals(engineerReq.getLevelType())) {
return Result.failed("请切换到分站级别查看");
}
if (StringUtils.isEmpty(engineerReq.getLevelValue())) {
return Result.failed("分站参数不能为空");
}
Result<?> res = null;
try {
EngineerBusinessDTO.Result result = new EngineerBusinessDTO.Result();
......@@ -46,7 +51,16 @@ public class EngineerCenterPoiController {
@PostMapping("/engineer-center/update")
public Result<?> engineerCenterUpdate(@RequestBody EngineerBusinessDTO.EngineerCenterUpdateReqDTO req) {
// 获取工程师技能信息修改
// 工程师中心点信息修改
if (StringUtils.isEmpty(req.getEngineerCode())) {
return Result.failed("工程师参数不能为空");
}
if (StringUtils.isEmpty(req.getAddress())) {
return Result.failed("工程师地址不能为空");
}
if (StringUtils.isEmpty(req.getLocation())) {
return Result.failed("工程师坐标不能为空");
}
try {
engineerBusinessService.updateEngineerCenter(req);
} catch (BusinessException e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!