王 垚
2021-12-10 742d7030e86066437d8005007337821302bd7e61
src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
@@ -82,10 +82,11 @@
        }
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            //this.View.ShowMessage(e.BarItemKey.ToUpper().ToString());
            base.BarItemClick(e);
            try
            {
                //LogHelper.Info("生产计划平台按钮:" + e.BarItemKey.ToUpper().ToString());
                LogHelper.Info("生产计划平台按钮:" + e.BarItemKey.ToUpper().ToString());
                if (e.BarItemKey.ToUpper() == "BTEXPORT")
                {
                    ExportExcel();
@@ -169,6 +170,11 @@
                if (e.BarItemKey.ToUpper() == "TBRELEASE")
                {
                    Release();
                }
                //下达
                if (e.BarItemKey.ToUpper() == "TB_RELEASE")
                {
                    ReleaseForLMes();
                }
            }
@@ -291,7 +297,7 @@
        /// </summary>
        public void ExportExcel()
        {
            List<string> Title = new List<string> {"销售订单号", "生产订单号*","生产订单明细行号*", "生产车间*", "生产资源", "产品代码*", "产品名称", "规格型号", "计量单位",
            List<string> Title = new List<string> {"组织编码","销售订单号", "生产订单号*","生产订单明细行号*", "生产车间编码*", "生产资源编码","员工编码", "物料编码*", "物料名称", "规格型号", "计量单位",
                "批次号","销售订单数量","生产订单数量","总齐套数量","交货日期*","订单等级*"};
            /*
             ,"T0","T1","T2","T3","T4","T5","T6","T7",
@@ -2226,7 +2232,7 @@
                            FMoSeq = dr["FMoSeq"].ToString(),
                        });
                    }
                    LogHelper.Info($"日计划用料清单,数据准备完成,保存到Model实体,总行数:{DayPlanMaterial.Count},耗时:" );
                    LogHelper.Info($"日计划用料清单,数据准备完成,保存到Model实体,总行数:{DayPlanMaterial.Count},耗时:");
                    var fidList = DayPlanMaterial.Select(x => x.FEntryID).Distinct().ToList();
                    int i = 1;
                    int jdtmmm = 1;
@@ -2296,7 +2302,7 @@
                                ["IsDeleteEntry"] = "true",
                                ["SubSystemId"] = "",
                                ["IsVerifyBaseDataField"] = "false",
                                ["IsAutoSubmitAndAudit"] = true,//自动调用提交和审核功能
                                //["IsAutoSubmitAndAudit"] = true,//自动调用提交和审核功能
                                ["Model"] = Fentity
                            };
                            CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
@@ -3052,5 +3058,13 @@
                //LogHelper.Error("选单失败:" + ex.Message);
            }
        }
        //同步数据至LMES
        public void ReleaseForLMes()
        {
            string sql = $"exec Realese_Sc_ICMOBillStatus_Tmp";
            string result =DBServiceHelper.ExecuteScalar<string>(Context,sql,"");
            this.View.ShowMessage(result);
        }
    }
}