| | |
| | | using Model.ModelVm.PdaVm; |
| | | using WMS.IBLL.IPdaServer; |
| | | using Model.ModelDto; |
| | | using Model.ModelVm; |
| | | using Wms.Tools; |
| | | using Utility; |
| | | using System.Security.Cryptography; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | | [Route("api/[controller]/[action]")] |
| | | [ApiController] |
| | | [Authorize] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public class PdaSoController : ControllerBase |
| | | { |
| | | #region 依赖注入 |
| | |
| | | /// <param name="model">PalletNo:托盘条码</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task IsEnableOkPalletNo(PdaSoVm model) |
| | | { |
| | | await _pdaSoSvc.IsEnableOkPalletNo(model.PalletNo); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取单据列表 |
| | | /// 根据托盘号获取单据列表 |
| | | /// </summary> |
| | | /// <param name="model">PalletNo:托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<List<string>> GetRunSoNoticeList(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetRunSoNoticeList(model.PalletNo, model.Type); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取PDA平库出库单据列表 |
| | | /// </summary> |
| | | /// <param name="type"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<List<string>> GetRunNoticeList(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetRunNoticeList(model.Type); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model">PalletNo:托盘码、SoNo:单据号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task GetSoSkuLotNoListByPallet(PdaSoVm model) |
| | | public async Task<List<DetailIdSkuLotNo>> GetSoSkuLotNoListByPallet(PdaSoVm model) |
| | | { |
| | | var models = await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo); |
| | | return await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model">SoDetailId:出库单明细ID、PalletNo:托盘码</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<OutPdaInfo> GetOutlets(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetOutlets(model.SoDetailId, model.PalletNo); |
| | |
| | | /// <param name="model">SoDetailId:出库单明细ID</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<OutPdaInfo> GetPlanAndFinishQty(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetPlanAndFinishQty(model.SoDetailId); |
| | | var data = await _pdaSoSvc.GetPlanAndFinishQty(model.SoDetailId); |
| | | return data; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取箱码信息(根据箱码在库存箱码明细中查询) |
| | | /// </summary> |
| | | /// <param name="model">BoxNo:箱码号</param> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<dynamic> GetDataComBoxInfo(PdaSoVm model) |
| | | public async Task<List<BoxInfo>> GetDataComBoxInfo(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetDataComBoxInfo(model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3); |
| | | var data = await _pdaSoSvc.GetDataComBoxInfo(model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3); |
| | | return data; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model">BoxNo:箱码号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<dynamic> GetAllotPlnInfo(PdaSoVm model) |
| | | public async Task<List<BoxInfo>> GetAllotPlnInfo(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetAllotPlnInfo(model.SoDetailId, model.PalletNo); |
| | | } |
| | |
| | | /// <param name="model">SoDetailId:出库单明细ID、PalletNo:托盘码</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SoSetPick(PdaSoVm model) |
| | | public async Task SoSetPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | |
| | | _pdaSoSvc.SoSetPick(model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, msg = "拣货完成", data = "" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | await _pdaSoSvc.SoSetPick(model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, _userManager.UserId); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model">SoDetailId:出库单明细ID、PalletNo:托盘码</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SoSetQtyPick(PdaSoVm model) |
| | | public async Task SoSetQtyPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | |
| | | _pdaSoSvc.SoSetQtyPick(model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, msg = "拣货完成", data = "" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | await _pdaSoSvc.SoSetQtyPick(model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, _userManager.UserId); |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="model">空托盘出库</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult IssuePlnOutHouse(OutModePalletVm model) |
| | | public async Task<string> IssuePlnOutHouse(OutModePalletVm model) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | |
| | | var strMsg = _pdaSoSvc.IssuePlnOutHouse(model, int.Parse(UserId), _config.WcsHost + _config.IssueComApiUrl); |
| | | |
| | | if (strMsg == "") |
| | | { |
| | | return Ok(new { code = 0, msg = "空托盘出库成功!" }); |
| | | } |
| | | else |
| | | { |
| | | return Ok(new { code = 1, msg = strMsg }); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return await _pdaSoSvc.IssuePlnOutHouse(model, _userManager.UserId, _config.WcsHost + _config.IssueComApiUrl); |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetPingKuInfoByPallet(string soNo, string palletNo) |
| | | public async Task<List<BoxInfo>> GetPingKuInfoByPallet(string soNo, string palletNo) |
| | | { |
| | | try |
| | | { |
| | | var list = _pdaSoSvc.GetPingKuInfoByPallet(soNo, palletNo); |
| | | return Ok(new { data = list, code = 0, msg = "获取平库托盘信息成功" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "获取平库托盘信息错误:" + e.Message }); |
| | | } |
| | | return await _pdaSoSvc.GetPingKuInfoByPallet(soNo, palletNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult PlaneExportSuccess(string soNo, string palletNo) |
| | | public async Task PlaneExportSuccess(string soNo, string palletNo) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | int uid = Convert.ToInt32(UserId); |
| | | |
| | | _pdaSoSvc.PlaneExportSuccess(soNo, palletNo, uid); |
| | | |
| | | return Ok(new { data = "", code = 0, msg = "平库出库成功" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "平库出库错误:" + e.Message }); |
| | | } |
| | | |
| | | await _pdaSoSvc.PlaneExportSuccess(soNo, palletNo, _userManager.UserId); |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetSampleType(string palletNo) |
| | | public async Task<string> GetSampleType(string palletNo) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | |
| | | var type = _pdaSoSvc.GetSampleType(palletNo); |
| | | |
| | | return Ok(new { data = type, code = 0, msg = "获取取样类型" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "获取取样类型错误:" + e.Message }); |
| | | } |
| | | |
| | | return await _pdaSoSvc.GetSampleType(palletNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetAsnNoByPallet(string palletNo) |
| | | public async Task<List<string>> GetAsnNoByPallet(string palletNo) |
| | | { |
| | | try |
| | | { |
| | | var type = _pdaSoSvc.GetAsnNoByPallet(palletNo); |
| | | |
| | | return Ok(new { data = type, code = 0, msg = "获取入库单据" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "获取入库单据错误:" + e.Message }); |
| | | } |
| | | |
| | | return await _pdaSoSvc.GetAsnNoByPallet(palletNo); |
| | | } |
| | | /// <summary> |
| | | /// 取样出库拣货(标签) |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SampleSoSetPick(PdaSoVm model) |
| | | public async Task SampleSoSetPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | int uid = Convert.ToInt32(UserId); |
| | | |
| | | _pdaSoSvc.SampleSoSetPick(model.Type, model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, model.AsnNo, uid); |
| | | |
| | | return Ok(new { data = "", code = 0, msg = "(标签)取样出库拣货" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "(标签)取样出库拣货错误:" + e.Message }); |
| | | } |
| | | |
| | | await _pdaSoSvc.SampleSoSetPick(model.Type, model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, model.AsnNo, _userManager.UserId); |
| | | } |
| | | /// <summary> |
| | | /// 取样出库拣货(无标签) |
| | |
| | | /// <param name="model">SoDetailId:出库单明细ID、PalletNo:托盘码</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SampleSoSetQtyPick(PdaSoVm model) |
| | | public async Task SampleSoSetQtyPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | |
| | | _pdaSoSvc.SampleSoSetQtyPick(model.Type, model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, model.AsnNo, int.Parse(userId)); |
| | | |
| | | return Ok(new { data = "", code = 0, msg = "(无标签)取样出库拣货" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "(无标签)取样出库拣货错误:" + e.Message }); |
| | | } |
| | | await _pdaSoSvc.SampleSoSetQtyPick(model.Type, model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, model.AsnNo, _userManager.UserId); |
| | | } |
| | | #region 拣货拼托 |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SoSetPinPick(PdaSoVm model) |
| | | public async Task SoSetPinPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | |
| | | _pdaSoSvc.SoSetPinPick(model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, model.PalletNoNew, int.Parse(userId)); |
| | | return Ok(new { code = 0, msg = "拣货完成", data = "" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | await _pdaSoSvc.SoSetPinPick(model.SoNo, model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, model.PalletNoNew, _userManager.UserId); |
| | | } |
| | | /// <summary> |
| | | /// 拼托出库pda拣货-数量 |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SoSetQtyPinPick(PdaSoVm model) |
| | | public async Task SoSetQtyPinPick(PdaSoVm model) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | |
| | | _pdaSoSvc.SoSetQtyPinPick(model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, model.PalletNoNew, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, msg = "拣货完成", data = "" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | await _pdaSoSvc.SoSetQtyPinPick(model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty, model.PalletNoNew, _userManager.UserId); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetSampleType2(string palletNo) |
| | | public async Task<string> GetSampleType2(string palletNo) |
| | | { |
| | | try |
| | | { |
| | | var type = _pdaSoSvc.GetSampleType2(palletNo); |
| | | |
| | | return Ok(new { data = type, code = 0, msg = "根据托盘号获取取样类型" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "根据托盘号获取取样类型:" + e.Message }); |
| | | } |
| | | |
| | | return await _pdaSoSvc.GetSampleType2(palletNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetInspectionNo() |
| | | public async Task<List<string>> GetInspectionNo() |
| | | { |
| | | try |
| | | { |
| | | var qcNoStr = _pdaSoSvc.GetInspectionNo(); |
| | | |
| | | return Ok(new { data = qcNoStr, code = 0, msg = "获取待出库或待取样的请验单" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "获取待出库或待取样的请验单:" + e.Message }); |
| | | } |
| | | |
| | | return await _pdaSoSvc.GetInspectionNo(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="qcNo">请验单</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetInspectionRequestInfo(string qcNo) |
| | | public async Task<InspectionRequestDto> GetInspectionRequestInfo(string qcNo) |
| | | { |
| | | try |
| | | { |
| | | var info = _pdaSoSvc.GetInspectionRequestInfo(qcNo); |
| | | |
| | | return Ok(new { data = info, code = 0, msg = "获取请验单相关信息" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "获取请验单相关信息:" + e.Message }); |
| | | } |
| | | |
| | | return await _pdaSoSvc.GetInspectionRequestInfo(qcNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SampleSetPick(SampleSoVm model) |
| | | public async Task SampleSetPick(SampleSoVm model) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | int uid = Convert.ToInt32(UserId); |
| | | |
| | | _pdaSoSvc.SampleSetPick(model.QcNo, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, uid); |
| | | |
| | | return Ok(new { data = "", code = 0, msg = "(标签)取样出库拣货" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "(标签)取样出库拣货错误:" + e.Message }); |
| | | } |
| | | |
| | | await _pdaSoSvc.SampleSetPick(model.QcNo, model.PalletNo, model.BoxNo, model.BoxNo3, model.PickQty, _userManager.UserId); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SampleSetQtyPick(SampleSoVm model) |
| | | public async Task SampleSetQtyPick(SampleSoVm model) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | int uid = Convert.ToInt32(UserId); |
| | | |
| | | _pdaSoSvc.SampleSetQtyPick(model.QcNo, model.PalletNo, model.PickQty, uid); |
| | | |
| | | return Ok(new { data = "", code = 0, msg = "(数量)取样出库拣货" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { data = "", code = 1, msg = "(数量)取样出库拣货错误:" + e.Message }); |
| | | } |
| | | |
| | | await _pdaSoSvc.SampleSetQtyPick(model.QcNo, model.PalletNo, model.PickQty, _userManager.UserId); |
| | | } |
| | | |
| | | #endregion |