xiaojiao
6 小时以前 557f02072fa311eefe3123aa44afebac22adc465
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToAPP/InboundBoxingAction.cs
@@ -13,6 +13,7 @@
using WIDESEA.Services.IServices.ToApp;
using WIDESEA.Services.Repositories;
using WIDESEA.Services.Services;
using WIDESEA_Common.LogEnum;
using WIDESEA_Entity.DomainModels;
@@ -56,6 +57,9 @@
                // æ ‡å‡†å€¼
                string Standard_value = saveModel.MainData["Standard_value"].ToString();
                // äº§åœ°
                string Placeoforigin = saveModel.MainData["Placeoforigin"].ToString();
                if (string.IsNullOrEmpty(madeUnit) || string.IsNullOrEmpty(materielId) || string.IsNullOrEmpty(materielType) || string.IsNullOrEmpty(NewOrOld))
                    throw new Exception($"厂家/轮对/型号/检修类型都不能为空");
@@ -101,6 +105,8 @@
                if (dt_EmptyPallet == null)
                    throw new Exception($"托盘码:【{rfid}】,在托盘管理中,无该托盘,请先添加托盘信息");
            
                //判断轴承有效期是否超过2å¹´
                if (DateTime.Now > Convert.ToDateTime(ProductDate).AddYears(2))
@@ -126,7 +132,7 @@
                    newBoxDetail.boxdtl_materielid = materielId;
                    newBoxDetail.boxdtl_qty = "1";
                    newBoxDetail.boxdtl_operator = UserContext.Current.UserTrueName;
                    newBoxDetail.boxdtl_inboundUnit = "智粤";
                    newBoxDetail.boxdtl_inboundUnit = "北京动车段";
                    newBoxDetail.boxdtl_standard = NewOrOld;
                    newBoxDetail.boxdtl_carType = materielId;
                    newBoxDetail.boxdtl_type = materielType;
@@ -146,7 +152,7 @@
                    Dt_mes_goods_info info = new Dt_mes_goods_info();
                    info.mesInfo_id = Guid.NewGuid();
                    info.mesInfo_inUnit = "智粤";
                    info.mesInfo_inUnit = "北京动车段";
                    info.mesInfo_madeUnit = madeUnit;
                    info.mesInfo_carType = materielId;
                    info.mesInfo_type = materielType;
@@ -157,6 +163,7 @@
                    info.mesInfo_qrCode = qrCode;
                    info.mesInfo_createDate = DateTime.Now;
                    info.mesInfo_bak_3 = Standard_value; // ä»¥åŽæ ‡å‡†å€¼ä»Žè¿™é‡ŒèŽ·å– è‚–佼新增
                    info.mesInfo_bak_4 = Placeoforigin; // è½´æ‰¿çš„产地
                    Dt_mes_goods_infoRepository.Instance.Add(info, true);
@@ -164,7 +171,16 @@
                    //获取空货位
                    Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction();
                    Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(1);
                    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 tmpTaskInfo = CommonFunction.AddWMSTask_BoxPalletIn(emptyLocation, rfid, materielId, qrCode, materielType);
                    //修改货位状态