| | |
| | | { |
| | | try |
| | | { |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose = ""; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = ""; |
| | | if (SystemValue.isAllowRuning_MainTaskDecompose && SystemValue.isStartedModel) |
| | | { |
| | | using (DbModel context = new DbModel()) |
| | |
| | | var errMsg = ""; |
| | | if (!MyExtendHelper.IsNoFinishedOutTaskGroupbyArea(context, ref errMsg)) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose += "不允许分解出库任务:" + errMsg + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "不允许分解出库任务:" + errMsg + SysGloble.SPLIT_STR; |
| | | isAllowDecomposeOutTask = false; |
| | | } |
| | | //var _list = MyExtendHelper.GetHasCatogryStationCodeAreaList(); |
| | |
| | | var _list = MyExtendHelper.GetHasCatogryAndNoFinishedOutStoreTaskStationCodeAreaList(context, ref dict_hasNoFinishedOutStoreTaskStationCodeAreaList); |
| | | if (_list != null && _list.Count >= 2) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose += "不允许分解出库任务:四个出库口目前有" + _list.Count + "个被占用了,超过了设定值:" + 2 + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "不允许分解出库任务:四个出库口目前有" + _list.Count + "个被占用了,超过了设定值:" + 2 + SysGloble.SPLIT_STR; |
| | | isAllowDecomposeOutTask = false; |
| | | } |
| | | if (isAllowDecomposeOutTask) |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose += "分解线程出现异常:" + ex.Message + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "分解线程出现异常:" + ex.Message + SysGloble.SPLIT_STR; |
| | | Log4NetHelper.WriteErrorLog(LogType.CCWCFService, "HandlerIssuingTask出现异常:" + ex.Message, ex); |
| | | } |
| | | Thread.Sleep(2000);//休眠2秒 |
| | |
| | | result = SingleHandlerForOutTask(context, doMain); |
| | | |
| | | if (result.result) context.SaveChanges(); |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose = result.resMsg + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = result.resMsg + SysGloble.SPLIT_STR; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | SystemWarningMsg._lbl_Alert_MainTaskDecompose += "没有要分解的任务" + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "没有要分解的任务" + SysGloble.SPLIT_STR; |
| | | } |
| | | } |
| | | |