雅达-修改返回类型并增加属性
修改了 `MES_U9C.cs` 文件中的 `U9CCreateBarCodeByAssignQty` 方法的返回类型,从 `ApiAction<BarcodeCreateInput>` 改为 `ApiAction<List<string>>`,并在方法内部相应地初始化了 `ApiAction` 对象。同时,增加了对 `result.Data.IsSuccess` 的判断,并在成功时将 `action.Data` 赋值为 `result.Data.Data`。
在 `PrintSemiProdLabel.cs` 文件中,删除了一行空白行,并修改了异常处理时的日志信息,将 `WMS.RePrint.Scan.ScanException` 改为 `WMS.PrintSemiProdLabel.Scan.ScanException`。
在 `U9CParameter.cs` 文件中,`BarcodeCreateByAssignQtyInput` 类和 `BarcodeCreateByAssignQtyParam` 类中增加了两个属性:`CreateBarCodeItemQty` 和 `LabelQty`,并添加了相应的注释。
| | |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction<BarcodeCreateInput>> U9CCreateBarCodeByAssignQty(BarcodeCreateByAssignQtyInput input) |
| | | public async Task<ApiAction<List<string>>> U9CCreateBarCodeByAssignQty(BarcodeCreateByAssignQtyInput input) |
| | | { |
| | | Logger.Interface.Info($"/**\r\n *进入半成品生成条码接口....\r\n */\r\n"); //固定写法 |
| | | var action = new ApiAction<BarcodeCreateInput>(); |
| | | var action = new ApiAction<List<string>>(new List<string>()); |
| | | try |
| | | { |
| | | if (input.IsLogin) |
| | |
| | | var result = JsonConvert.DeserializeObject<BarcodeCreateByAssignQtyResult>(response.Message); |
| | | if (result != null) |
| | | { |
| | | if (result.Success) |
| | | if (result.Success && result.Data.IsSuccess) |
| | | { |
| | | Logger.Interface.Info($"半成品生成条码接口提交Json: {JsonConvert.SerializeObject(param)},返回Json: {response.Message}"); |
| | | action.Data = result.Data.Data; |
| | | } |
| | | else |
| | | { |
| | |
| | | catch (Exception ex) |
| | | { |
| | | //action.CatchExceptionWithLog(ex, $"扫描[{input.SN}]异常"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("WMS.RePrint.Scan.ScanException", input.SN)); |
| | | action.CatchExceptionWithLog(ex, Biz.L("WMS.PrintSemiProdLabel.Scan.ScanException", input.SN)); |
| | | } |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | |
| | | |
| | | public class BarcodeCreateByAssignQtyInput: BarcodeCreateInput |
| | | { |
| | | /// <summary> |
| | | /// 入库单行总数量 |
| | | /// </summary> |
| | | public int CreateBarCodeItemQty { get; set; } |
| | | /// <summary> |
| | | /// 包装装箱数量 |
| | | /// </summary> |
| | | public int LabelQty { get; set; } |
| | | } |
| | | |
| | |
| | | { |
| | | public string BarCodeRuleID { get; set; } |
| | | public List<CreateBarCodeEntitys> CreateBarCodeEntitys { get; set; } |
| | | /// <summary> |
| | | /// 入库单行总数量 |
| | | /// </summary> |
| | | public int CreateBarCodeItemQty { get; set; } |
| | | /// <summary> |
| | | /// 包装装箱数量 |
| | | /// </summary> |
| | | public int LabelQty { get; set; } |
| | | } |
| | | |