|
@@ -60,6 +60,14 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> QueryNewClientData(NewClientDataQueryDto dto)
|
|
|
{
|
|
|
+ #region 参数验证
|
|
|
+ if (dto.OperationUserId < 0)
|
|
|
+ return Ok(JsonView(false, "请传入有效的OperationUserId参数!"));
|
|
|
+
|
|
|
+ if (dto.PortType < 0)
|
|
|
+ return Ok(JsonView(false, "请传入有效的PortType参数!"));
|
|
|
+ #endregion
|
|
|
+
|
|
|
JsonView jw = new JsonView();
|
|
|
try
|
|
|
{
|
|
@@ -94,6 +102,17 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostNewClientDataDetails(NewClientDataDetailsDto dto)
|
|
|
{
|
|
|
+ #region 参数验证
|
|
|
+ if (dto.Id < 0)
|
|
|
+ return Ok(JsonView(false, "请传入有效的Id参数!"));
|
|
|
+
|
|
|
+ if (dto.UserId < 0)
|
|
|
+ return Ok(JsonView(false, "请传入有效的UserId参数!"));
|
|
|
+
|
|
|
+ if (dto.PortType < 0)
|
|
|
+ return Ok(JsonView(false, "请传入有效的PortType参数!"));
|
|
|
+ #endregion
|
|
|
+
|
|
|
JsonView jw = new JsonView();
|
|
|
try
|
|
|
{
|
|
@@ -127,6 +146,19 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> NewClientOp(NewClientOpDto dto)
|
|
|
{
|
|
|
+ #region 参数验证
|
|
|
+
|
|
|
+ if (dto.CreateUserId < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的CreateUserId参数!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dto.PortType < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的PortType参数!"));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
try
|
|
|
{
|
|
|
Domain.Result result = await _clientDataRepository.NewClientOp(dto);
|
|
@@ -163,6 +195,22 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> NewClientDel(DelBaseDto dto)
|
|
|
{
|
|
|
+ #region 参数验证
|
|
|
+ if (dto.Id < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的Id参数!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dto.DeleteUserId < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的DeleteUserId参数!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dto.PortType < 0 )
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的PortType参数!"));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
var res = await _clientDataRepository.DelNewClientData(dto);
|
|
|
if (res.Code != 0)
|
|
|
{
|
|
@@ -247,6 +295,18 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostBatchAssignment(BatchAssignmentDto dto)
|
|
|
{
|
|
|
+ #region 参数验证
|
|
|
+ if (dto.UserId < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的UserId参数!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dto.PortType < 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请传入有效的PortType参数!"));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
var res = await _clientDataRepository._BatchAssignment(dto);
|
|
|
if (res.Code != 0)
|
|
|
{
|