| | |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction<LOG_LABEL_PRINT>> GetRePrintInfo(RePrintInput input) |
| | | public async Task<ApiAction> GetRePrintInfo(RePrintInput input) |
| | | { |
| | | var result = new ApiAction<LOG_LABEL_PRINT>(); |
| | | var result = new ApiAction(); |
| | | try |
| | | { |
| | | //先查出工单条码中是否存在 |
| | |
| | | result.LocaleMsg = new($"条码不存在!"); |
| | | return result; |
| | | } |
| | | |
| | | result.Data = await Biz.Db.Queryable<LOG_LABEL_PRINT>() |
| | | string printParam = ""; |
| | | var labelPrint = await Biz.Db.Queryable<LOG_LABEL_PRINT>() |
| | | .WhereIF(input.ReqType == 0, q => q.SN.Equals(woSn.SN) || q.SN.Equals(woSn.FLOW_SN)) //白盒标签 |
| | | .WhereIF(input.ReqType == 1, q => q.SN.Equals(woSn.OUTER_SN)) //箱标签 |
| | | .WhereIF(input.ReqType == 1, q => q.SN.Equals(woSn.OUTER_SN) && q.PRINT_LABEL != "InStoreLabel") //箱标签-客户 |
| | | .WhereIF(input.ReqType == 2, q => q.SN.Equals(woSn.OUTER_SN) && q.PRINT_LABEL == "InStoreLabel") //箱标签-入库 |
| | | .FirstAsync(); |
| | | //如果查不到就去行为日志查 |
| | | if (labelPrint.IsNullOrEmpty() && input.ReqType == 1) |
| | | { |
| | | printParam = Biz.Db.Queryable<MES_WIP_ACT>().Where(q => (q.SN.Equals(input.Code) || q.FLOW_SN.Equals(input.Code)) && q.ACT_VALUE_4 == "Customer").First()?.ACT_VALUE_3 ?? ""; |
| | | } |
| | | else |
| | | { |
| | | printParam = labelPrint.PRINT_PARAM; |
| | | } |
| | | result.Data = printParam; |
| | | result.LocaleMsg = new($"重打条码[{input.Code}]的标签成功"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | else |
| | | { |
| | | result.LocaleMsg = new($"出货信息存在!"); |
| | | result.Data = "InStore"; |
| | | result.Data = "InStoreLabel"; |
| | | } |
| | | } |
| | | catch (Exception ex) |