| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Security.Claims; |
| | | using Microsoft.Extensions.Options; |
| | | using Model.ModelVm; |
| | | using Model.ModelVm.BllQualityVm; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Printing; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Security.Claims; |
| | | using System.Threading.Tasks; |
| | | using Wms.Tools; |
| | | using WMS.Entity.BllQualityEntity; |
| | | using WMS.IBLL.IBllQualityServer; |
| | | using Model.ModelVm.BllQualityVm; |
| | | using Model.ModelVm; |
| | | using Wms.Tools; |
| | | using Microsoft.Extensions.Options; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading.Tasks; |
| | | using System.Linq; |
| | | |
| | | |
| | | namespace Wms.Controllers |
| | |
| | | /// 构造函数 |
| | | /// </summary> |
| | | /// <param name="qualityServer">质检信息</param> |
| | | public BllQualityController(IQualityInspectServer qualityServer,IInspectionRequest inspectionRequestServer, IOptions<ApiUrlConfig> setting) |
| | | public BllQualityController(IQualityInspectServer qualityServer, IInspectionRequest inspectionRequestServer, IOptions<ApiUrlConfig> setting) |
| | | { |
| | | _qualityServer = qualityServer; |
| | | _inspectionRequestServer = inspectionRequestServer; |
| | |
| | | var bolls = _qualityServer.GetBllQualityList(model); |
| | | |
| | | return Ok(new { code = 0, msg = "质检信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取需要质检的批次号 |
| | | /// </summary> |
| | | /// <param name="pageIndex">页码</param> |
| | | /// <param name="pageSize">页大小</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetInspectLotNoList(int pageIndex, int pageSize) |
| | | { |
| | | try |
| | | { |
| | | var data = _qualityServer.GetInspectLotNoList(pageIndex, pageSize); |
| | | |
| | | return Ok(new { code = 0, msg = "需要质检的批次号", data = data }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | /// <param name="model">查询条件</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetInspectionRequest(BllQualityInspectionRequestVm model) |
| | | public IActionResult GetInspectionRequest(BllQualityInspectionRequestVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// <param name="model">查询条件</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetSamplingDetails(BllSamplingDetailsVm model) |
| | | public IActionResult GetSamplingDetails(BllSamplingDetailsVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// <param name="model">主键ID</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult DelSamplingDetails(IdVm model) |
| | | public IActionResult DelSamplingDetails(IdVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | var models = _inspectionRequestServer.DelSamplingDetails(model, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, count=0, msg = "删除取样记录成功", data = models }); |
| | | return Ok(new { code = 0, count = 0, msg = "删除取样记录成功", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | |
| | | [HttpPost] |
| | | public IActionResult upLoadRequest(IdVm model) |
| | | public IActionResult upLoadRequest(IdVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | var userName = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier)?.Value; |
| | | |
| | | |
| | | return Ok(new { code = 0, count = 0, msg = "上传图片成功!"}); |
| | | return Ok(new { code = 0, count = 0, msg = "上传图片成功!" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除请验单信息 |
| | |
| | | |
| | | var models = _inspectionRequestServer.DelInspectionRequest(model, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, count=0, msg = "删除请验单信息成功", data = models }); |
| | | return Ok(new { code = 0, count = 0, msg = "删除请验单信息成功", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | |
| | | |
| | | if (string.IsNullOrWhiteSpace(userId)) |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | |
| | | string url = _config.WcsHost + _config.IssueComApiUrl; |
| | | var models = _inspectionRequestServer.OutWhInspectionRequest(model, int.Parse(userId), url); |
| | | |
| | | return Ok(new { code = 0, count=0, msg = "取样出库操作成功!", data = models }); |
| | | return Ok(new { code = 0, count = 0, msg = "取样出库操作成功!", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 完成请验单据 |
| | |
| | | } |
| | | |
| | | string url = _config.WcsHost + _config.IssueComApiUrl; |
| | | var models = _inspectionRequestServer.ClossInspectionRequest(model, int.Parse(userId),url); |
| | | var models = _inspectionRequestServer.ClossInspectionRequest(model, int.Parse(userId), url); |
| | | |
| | | return Ok(new { code = 0, msg = "完成请验单", data = models }); |
| | | } |