From c2d6e0a51f9e47e04a7a24a06141e4414d0ea418 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周五, 13 12月 2024 13:03:40 +0800 Subject: [PATCH] 222 --- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsTask/WmsRbLineRunMode.cs | 2 LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/index.vue | 23 ----- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/WmsRbLineRunModeService.cs | 5 - LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/component/editDialog.vue | 21 ----- CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/1、DataProcess_BZ12.cs | 126 +++++++++++++++++-------------- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/Dto/WmsRbLineRunModeInput.cs | 15 --- 6 files changed, 72 insertions(+), 120 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" index 70cb7ae..f70e50a 100644 --- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" @@ -117,64 +117,77 @@ //鏌ュ杩欏寘鎵�鏈夌殑鏁伴噺 var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); //鏌ヨ鏄惁鏈澘骞朵笖鍒ゆ柇鏈夋病鏈夋贩鎵� - var wms_rbline_runmode = wmsDB.wms_rbline_runmode.FirstOrDefault(); - if (wms_rbline_runmode != null) + //澧炲姞瀵瑰弬鏁伴厤缃殑绠$悊 銆怑ditby shaocx,2024-12-13銆� + var sysConfig = wmsDB.SysConfig.Where(x => x.Code == "LastPalletizingData").FirstOrDefault(); + if (sysConfig == null) { - //鏌ヨ鏄惁娣锋壒 - if (!string.IsNullOrEmpty(wms_rbline_runmode.PalletizingUPI)) - { - if (upiObj.PackageCode != wms_rbline_runmode.PalletizingUPI) - { - //鍐欏叆鎶ヨ淇℃伅 - await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_4); - - SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鐮佸寘閮ㄤ欢娣锋壒 "; - continue; - } - } - //鑾峰彇鐮佸灈鐩爣浣� - if (wms_rbline_runmode.PalletizingStation != 0) - { - place = wms_rbline_runmode.PalletizingStation.ToString(); - } - else - {//琛ㄧず杩欐槸 鍖呯殑绗竴鍧楁澘 - lastnum = 1; - wms_rbline_runmode.PalletizingUPI = upiObj.PackageCode; - if (obj.R_PalletizingStation1 == 1) - { - place = "1"; - } - else if (obj.R_PalletizingStation2 == 1) - { - place = "2"; - - } - else - { - //鍐欏叆鎶ヨ淇℃伅 - await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_6); - - SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鏃犲彲鐢ㄧ爜鍨涚洰鏍囦綅 "; - continue; - } - - wms_rbline_runmode.PalletizingStation = int.Parse(place); - } - //濡傛灉娆″簭绛変簬褰撻挶鍖呮�绘暟閲忥紝鏄惁鏈澘缃负true - if (upiObj.Shelf == upiList.Count()) - { - lastnum = 2; - wms_rbline_runmode.PalletizingUPI = null; - wms_rbline_runmode.PalletizingStation = 0; - } - - } - else - { - SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},琛╳ms_rbline_runmode鏃犳暟鎹� "; + SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"娌℃湁鑾峰彇鍒� LastPalletizingData 鐨勯厤缃俊鎭� "; continue; } + string palletizingUPI = ""; + int palletizingStation = 0; + + var config_value = sysConfig.Value; + if (config_value.IndexOf('|') > -1) + {//鏍煎紡涓� 鍖呰鍙穦绔欑偣 + var arr = config_value.Split('|'); + palletizingUPI = arr[0]; + palletizingStation = Convert.ToInt32(arr[1]); + } + else + {//琛ㄧず杩樻病鏈夐厤缃� + } + + //鏌ヨ鏄惁娣锋壒 + if (!string.IsNullOrEmpty(palletizingUPI)) + { + if (upiObj.PackageCode != palletizingUPI) + { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_4); + + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鐮佸寘閮ㄤ欢娣锋壒 "; + continue; + } + } + //鑾峰彇鐮佸灈鐩爣浣� + if (palletizingStation != 0) + { + place = palletizingStation.ToString(); + } + else + {//琛ㄧず杩欐槸 鍖呯殑绗竴鍧楁澘 + lastnum = 1; + palletizingUPI = upiObj.PackageCode; + if (obj.R_PalletizingStation1 == 1) + { + place = "1"; + } + else if (obj.R_PalletizingStation2 == 1) + { + place = "2"; + + } + else + { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_6); + + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鏃犲彲鐢ㄧ爜鍨涚洰鏍囦綅 "; + continue; + } + + palletizingStation = int.Parse(place); + } + //濡傛灉娆″簭绛変簬褰撻挶鍖呮�绘暟閲忥紝鏄惁鏈澘缃负true + if (upiObj.Shelf == upiList.Count()) + { + lastnum = 2; + palletizingUPI = null; + palletizingStation = 0; + } + + //鏌ヨ鏈夋病鏈夋搴忓皬浜庡綋鍓嶆搴忓苟涓旀病鏈夌爜鍨涚殑 var oldupi = upiList.Where(x => x.Shelf < upiObj.Shelf && (x.UpiStatus != (int)UpiStatusEnum.宸茬爜鍨� && x.UpiStatus != (int)UpiStatusEnum.鐮佸灈涓�)).FirstOrDefault(); if (oldupi != null) @@ -220,7 +233,8 @@ wmsDB.wms_rbline_task.Add(task); - + //鏇存柊閰嶇疆 + sysConfig.Value = palletizingUPI + "|" + palletizingStation; WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "BZ12绔欑偣", "鐮佸寘"); diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/component/editDialog.vue index 064d24c..5ff00e3 100644 --- a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/component/editDialog.vue +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/component/editDialog.vue @@ -50,27 +50,6 @@ </el-form-item> </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> - <el-form-item label="杩愯妯″紡鍚嶇О" prop="lineRunModeName"> - <el-input v-model="ruleForm.lineRunModeName" placeholder="璇疯緭鍏ヨ繍琛屾ā寮忓悕绉�" maxlength="50" show-word-limit clearable /> - - </el-form-item> - - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> - <el-form-item label="涓婁竴娆$爜鍨涙澘浠�" prop="palletizingUPI"> - <el-input v-model="ruleForm.palletizingUPI" placeholder="璇疯緭鍏ヤ笂涓�娆$爜鍨涙澘浠�" maxlength="50" show-word-limit clearable /> - - </el-form-item> - - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> - <el-form-item label="涓婁竴娆$爜鍨涚珯鐐�" prop="palletizingStation"> - <el-input-number v-model="ruleForm.palletizingStation" placeholder="璇疯緭鍏ヤ笂涓�娆$爜鍨涚珯鐐�" clearable /> - - </el-form-item> - - </el-col> </el-row> </el-form> <template #footer> diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/index.vue index fffe77b..18541b7 100644 --- a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/index.vue +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/wmsRbLineRunMode/index.vue @@ -5,7 +5,7 @@ <el-row> <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> <el-form-item label="鍏抽敭瀛�"> - <el-input v-model="queryParamsWmsRbLineRunMode.searchKey" clearable="" placeholder="BZ01澶勭悊鐨勬澘浠�,BZ01澶勭悊鐨勬壒娆″彿,BZ01澶勭悊鐨勮鍗曞彿,BZ01澶勭悊鐨勫寘瑁呭彿,杩愯妯″紡鍚嶇О,鍒涘缓浜�,淇敼浜�,涓婁竴娆$爜鍨涙澘浠�"/> + <el-input v-model="queryParamsWmsRbLineRunMode.searchKey" clearable="" placeholder="BZ01澶勭悊鐨勬澘浠�,BZ01澶勭悊鐨勬壒娆″彿,BZ01澶勭悊鐨勮鍗曞彿,BZ01澶勭悊鐨勫寘瑁呭彿,鍒涘缓浜�,淇敼浜�"/> </el-form-item> </el-col> @@ -39,24 +39,6 @@ <el-option v-for="(item,index) in getEnumLineRunModeData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> </el-select> - - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIWmsRbLineRunMode"> - <el-form-item label="杩愯妯″紡鍚嶇О"> - <el-input v-model="queryParamsWmsRbLineRunMode.lineRunModeName" clearable="" placeholder="璇疯緭鍏ヨ繍琛屾ā寮忓悕绉�"/> - - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIWmsRbLineRunMode"> - <el-form-item label="涓婁竴娆$爜鍨涙澘浠�"> - <el-input v-model="queryParamsWmsRbLineRunMode.palletizingUPI" clearable="" placeholder="璇疯緭鍏ヤ笂涓�娆$爜鍨涙澘浠�"/> - - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIWmsRbLineRunMode"> - <el-form-item label="涓婁竴娆$爜鍨涚珯鐐�"> - <el-input-number v-model="queryParamsWmsRbLineRunMode.palletizingStation" clearable="" placeholder="璇疯緭鍏ヤ笂涓�娆$爜鍨涚珯鐐�"/> </el-form-item> </el-col> @@ -95,13 +77,10 @@ <el-tag>{{ getEnumDesc(scope.row.lineRunMode, getEnumLineRunModeData_Index)}}</el-tag> </template> </el-table-column> - <el-table-column prop="lineRunModeName" label="杩愯妯″紡鍚嶇О" show-overflow-tooltip="" /> <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> - <el-table-column prop="palletizingUPI" label="涓婁竴娆$爜鍨涙澘浠�" show-overflow-tooltip="" /> - <el-table-column prop="palletizingStation" label="涓婁竴娆$爜鍨涚珯鐐�" show-overflow-tooltip="" /> <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wmsRbLineRunMode:update') || auth('wmsRbLineRunMode:delete')"> <template #default="scope"> <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWmsRbLineRunMode(scope.row)" v-auth="'wmsRbLineRunMode:update'"> 缂栬緫 </el-button> diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsTask/WmsRbLineRunMode.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsTask/WmsRbLineRunMode.cs index 730f849..dc6f201 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsTask/WmsRbLineRunMode.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsTask/WmsRbLineRunMode.cs @@ -54,7 +54,7 @@ public string? LineRunModeName { get; set; } /// <summary> - /// 涓婁竴娆$爜鍨涚紪鍙� + /// 涓婁竴娆$爜鍨涘寘瑁呭彿 /// </summary> [SugarColumn(ColumnName = "PalletizingUPI", ColumnDescription = "涓婁竴娆$爜鍨涘寘瑁呭彿", Length = 50)] public string? PalletizingUPI { get; set; } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/Dto/WmsRbLineRunModeInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/Dto/WmsRbLineRunModeInput.cs index bdc59fd..6bb6fa4 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/Dto/WmsRbLineRunModeInput.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/Dto/WmsRbLineRunModeInput.cs @@ -120,21 +120,6 @@ /// </summary> public Admin.NET.Application.RbRunModeEnum? LineRunMode { get; set; } - /// <summary> - /// 杩愯妯″紡鍚嶇О - /// </summary> - public string? LineRunModeName { get; set; } - - /// <summary> - /// 涓婁竴娆$爜鍨涙澘浠� - /// </summary> - public string? PalletizingUPI { get; set; } - - /// <summary> - /// 涓婁竴娆$爜鍨涚珯鐐� - /// </summary> - public int? PalletizingStation { get; set; } - } /// <summary> diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/WmsRbLineRunModeService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/WmsRbLineRunModeService.cs index 5209870..b045d09 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/WmsRbLineRunModeService.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/WmsRbLineRunMode/WmsRbLineRunModeService.cs @@ -130,19 +130,14 @@ || u.PlanNo.Contains(input.SearchKey.Trim()) || u.OrderId.Contains(input.SearchKey.Trim()) || u.PackageCode.Contains(input.SearchKey.Trim()) - || u.LineRunModeName.Contains(input.SearchKey.Trim()) || u.CreateUserName.Contains(input.SearchKey.Trim()) || u.UpdateUserName.Contains(input.SearchKey.Trim()) - || u.PalletizingUPI.Contains(input.SearchKey.Trim()) ) .WhereIF(!string.IsNullOrWhiteSpace(input.UPI), u => u.UPI.Contains(input.UPI.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.PlanNo), u => u.PlanNo.Contains(input.PlanNo.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.OrderId), u => u.OrderId.Contains(input.OrderId.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) .WhereIF(input.LineRunMode.HasValue, u => u.LineRunMode == input.LineRunMode) - .WhereIF(!string.IsNullOrWhiteSpace(input.LineRunModeName), u => u.LineRunModeName.Contains(input.LineRunModeName.Trim())) - .WhereIF(!string.IsNullOrWhiteSpace(input.PalletizingUPI), u => u.PalletizingUPI.Contains(input.PalletizingUPI.Trim())) - .WhereIF(input.PalletizingStation>0, u => u.PalletizingStation == input.PalletizingStation) .Select<WmsRbLineRunModeOutput>(); return query; } -- Gitblit v1.9.3