xiaojiao
6 小时以前 557f02072fa311eefe3123aa44afebac22adc465
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs
@@ -59,11 +59,15 @@
        public WebResponseContent ReceiveWeightResultFromWCS(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string barcode = saveModel.MainData["barcode"].ToString();
                string weight = saveModel.MainData["weight"].ToString();
                if (weight == null || weight == "0")
                {
                    throw new Exception($"托盘号:【{barcode}】,重量不对不符合规定");
                }
                Dt_taskinfo taskInfo = Dt_taskinfoRepository.Instance.FindFirst(x => x.task_barcode == barcode);
                if (null == taskInfo)
@@ -73,7 +77,7 @@
                //没有组盘信息,说明该重量是空托盘的重量
                if (null == boxHead)
                {
                    Dt_EmptyPallet dt_Empty= Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
                    Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
                    if (null == dt_Empty)
                    {
                        Dt_EmptyPallet dt_Empty1 = new Dt_EmptyPallet();
@@ -474,7 +478,15 @@
                content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() =>
                {
                    //获取空货位
                    Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction();
                    Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(2);
                    LogRecord.WriteLog((int)LogEnum.InBound, $"托盘条码:{barcode},分配的货位号{emptyLocation.location_id},货位状态:{emptyLocation.location_state}");
                    VV_ContainerInfo_EmptyPallet SelectLocation = VV_ContainerInfo_EmptyPalletRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id);
                    VV_ContainerInfo conInfohw = VV_ContainerInfoRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id);
                    if (SelectLocation != null || conInfohw != null)
                    {
                        LogRecord.WriteLog((int)LogEnum.InBound, $"分配的货位已有货,货位号{emptyLocation.location_id}");
                        throw new Exception($"分配的货位已有货,货位号{SelectLocation.location_id}");
                    }
                    Dt_taskinfo taskinfo = new Dt_taskinfo();
                    taskinfo.task_id = Guid.NewGuid();