dengjunjie
7 天以前 bc43fe34a67fa68bcfb3a51b79308fad0be11c08
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs
@@ -54,7 +54,7 @@
                if (response.resultCode != "0")
                {
                    SendErrorToUpstream(8, "", response.resultMsg ?? "上游接口返回失败", "");
                    //SendErrorToUpstream(8, "", response.resultMsg ?? "上游接口返回失败", "");
                    return responseContent.Error(response.resultMsg ?? "上游接口返回失败");
                }
@@ -82,7 +82,7 @@
            catch (Exception ex)
            {
                Db.Ado.RollbackTran();
                SendErrorToUpstream(8, "", ex.Message, "");
                //SendErrorToUpstream(8, "", ex.Message, "");
                return responseContent.Error("同步失败: " + ex.Message);
            }
        }
@@ -179,8 +179,12 @@
                                #endregion
                                else
                                {
                                    if (cabinOrder == null || cabinOrder.OdrderStatus == "已完成")
                                        throw new Exception($"入库单已完成");
                                    if (cabinOrder.OdrderStatus == "已完成")
                                        return new ApiResponse<Dt_InventoryInfo>
                                        {
                                            code = "0",
                                            msg = "成功"
                                        };
                                    Dt_CabinOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Goods_no == detail.productCode && x.Batch_num == detail.batchNo && x.Status == 1).First();
                                    if (cabinOrderDetail == null || cabinOrderDetail.OrderDetailStatus == "已完成")
                                        throw new Exception($"入库单明细已完成");
@@ -229,7 +233,7 @@
                                            ProductionDate = detail.finishDate.ToString("yyyy-MM-dd"),
                                            ShelfLife = 0,
                                            ValidityPeriod = cabinOrderDetail.Exp_date,
                                            Remark = "WCS回传创建"
                                            Remark = "智能立库"
                                        };
                                        BaseDal.Db.Insertable(inventoryInfo).ExecuteCommand();
                                    }
@@ -263,7 +267,7 @@
                                                ERPStockQuantity = 0,
                                                Status = false,
                                                ProductionDate = detail.finishDate.ToString("yyyy-MM-dd"),
                                                ValidityPeriod = inventoryInfo.ValidityPeriod,
                                                ValidityPeriod = inventoryInfo.ValidityPeriod.ObjToDate(),
                                                Remark = "自动创建"
                                            };
                                            BaseDal.Db.Insertable(inventory_Batch).ExecuteCommand();