This commit is contained in:
shuo.wang
2025-04-14 18:07:53 +08:00
parent 86f3d359ad
commit 9fb39c20f8
3 changed files with 18 additions and 0 deletions

View File

@@ -110,5 +110,6 @@ public interface LineService {
Integer updatePartnerName(String username,Long lineId);
Integer updateRegionId(Long regionId,Long lineId);
Boolean hasRegionId(Long lineId);
}

View File

@@ -651,6 +651,18 @@ public class LineServiceImpl implements LineService {
return lineInfoDAO.updateLineInfo(lineInfo);
}
@Override
public Boolean hasRegionId(Long lineId) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if (lineInfo.getRegionId() != null&&lineInfo.getRegionId() != 0 ){
return true;
}
return false;
}
/**
* 计算预期时间
* @param startTime

View File

@@ -185,5 +185,10 @@ public class LineInfoController {
public ResponseResult<Integer> updateLineRegion(@RequestParam("regionId")Long regionId,@RequestParam("lineId")Long lineId) {
return ResponseResult.success(lineService.updateRegionId(regionId,lineId));
}
@ApiOperation("判断是否有所属大区/分公司 0否 1是")
@GetMapping("/hasLineRegion")
public ResponseResult<Boolean> hasLineRegion(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(lineService.hasRegionId(lineId));
}
}