|
@@ -1915,7 +1915,7 @@ WHERE
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1923,10 +1923,13 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> GoodsStorageList(GoodsStorageListDto dto)
|
|
|
{
|
|
|
+ var currUserInfo = JwtHelper.SerializeJwt(HttpContext.Request.Headers.Authorization);
|
|
|
+
|
|
|
+
|
|
|
if (dto.PortType < 1 || dto.PortType > 3) return Ok(JsonView(false, MsgTips.Port));
|
|
|
if (dto.PageIndex < 1 || dto.PageSize < 1) return Ok(JsonView(false, MsgTips.PageIndex));
|
|
|
|
|
|
- return Ok(await _goodsRep.GoodsStorageList(dto));
|
|
|
+ return Ok(await _goodsRep.GoodsStorageList(dto, currUserInfo?.UserId ?? 0));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1968,6 +1971,38 @@ WHERE
|
|
|
return Ok(await _goodsRep.GoodsStorageOp(dto, currUserInfo.UserId));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> GoodsStorageConfirmStatusChange(GoodsStorageConfirmDto dto)
|
|
|
+ {
|
|
|
+ if (dto.Id < 1) return Ok(JsonView(false, MsgTips.Id));
|
|
|
+
|
|
|
+ if (!Enum.IsDefined(typeof(GoodsAuditDepEnum),(int)dto.AuditDep))
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, $"审核部门类型超出可用范围!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!Enum.IsDefined(typeof(GoodsConfirmEnum), (int)dto.ConfirmStatus))
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, $"入库审核状态超出可用范围!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dto.ConfirmStatus == GoodsConfirmEnum.WaitConfirm || dto.ConfirmStatus == GoodsConfirmEnum.PartConfirmed)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, $"入库审核状态(待确认、部分确认)不可用!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ var currUserInfo = JwtHelper.SerializeJwt(HttpContext.Request.Headers.Authorization);
|
|
|
+ if (currUserInfo == null) return Ok(JsonView(false, "请传入token!"));
|
|
|
+
|
|
|
+ return Ok(await _goodsRep.GoodsStorageConfirmStatusChange(dto, currUserInfo.UserId));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1986,7 +2021,6 @@ WHERE
|
|
|
return Ok(await _goodsRep.GoodsStorageDel(id, currUserInfo.UserId));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -2111,13 +2145,13 @@ WHERE
|
|
|
return Ok(JsonView(false, sb.ToString()));
|
|
|
}
|
|
|
int[] idArray = dto.Label
|
|
|
- .Split(',')
|
|
|
- .Select(x =>
|
|
|
- {
|
|
|
- if (int.TryParse(x, out var id)) return id;
|
|
|
- return id;
|
|
|
- })
|
|
|
- .ToArray();
|
|
|
+ .Split(',')
|
|
|
+ .Select(x =>
|
|
|
+ {
|
|
|
+ if (int.TryParse(x, out var id)) return id;
|
|
|
+ return id;
|
|
|
+ })
|
|
|
+ .ToArray();
|
|
|
return Ok(await _goodsRep.GoodsReceiveAudit(idArray, currUserInfo.UserId, dto.AuditEnum));
|
|
|
}
|
|
|
|