| | |
| | | //[Route("api")] |
| | | [ApiDescriptionSettings("Pda相关接口", Name = "PdaService", Order = 100)] |
| | | [Route("api/[Controller]")] |
| | | [DisableOpLog] |
| | | public class PdaService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly IRepository<EquipmentBaseInfo, MasterDbContextLocator> _equipmentBaseInfoRep; |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet("getWorkPieceProcess")] |
| | | [DisableOpLog] |
| | | public async Task<WorkPieceProcessPdaOutput> getWorkPieceProcess([FromQuery] WorkPieceProcessPdaSearch input) |
| | | { |
| | | var workPieceProcesss = await _workPieceProcessRep.DetachedEntities |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet("getWorkPieceByOP80NewCode")] |
| | | [DisableOpLog] |
| | | public async Task<WorkPieceInfoOutput> getWorkPieceByOP80NewCode([FromQuery] WorkPieceByOP80NewCodeInputSearch input) |
| | | { |
| | | |
| | | if (string.IsNullOrEmpty(input.OP80NewCode)) |
| | | { |
| | | throw Oops.Oh($"请输入OP80打印成品码或二维码!"); |
| | | throw Oops.Oh($"请输入成品码或工件码!"); |
| | | } |
| | | if (input.OP80NewCode.Length > 22) |
| | | { |
| | | throw Oops.Oh($"工件码或成品码{input.OP80NewCode}长度不正确!"); |
| | | } |
| | | string OP80NewCode = input.OP80NewCode.Trim(); |
| | | var workPieceInfo = await _workPieceInfoRep.DetachedEntities |