using RS.Model; using RS.SQLServerDAL; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RS.BLL { public class BRecipeWoekManage { SRecipeWork sRecipeWork = new SRecipeWork(); public Dictionary ScrDic(List strings, int type) { return sRecipeWork.ScrDic(strings, type); } public Dictionary FluDic(List strings, int type) { return sRecipeWork.FluDic(strings, type); } #region 作业配方 /// /// 查找所有作业配方 /// /// public DataTable GetRecipeWork() { return sRecipeWork.SelRecipeWorkInfo(); } public bool IsExistWorkRecipe(string recipeName) { return sRecipeWork.IsExistWorkRecipeInfo(recipeName); } public bool DelWorkRecipeInfo(string recipeName) { return sRecipeWork.DelWorkRecipe(recipeName); } /// /// 更新作业配方 /// /// /// public bool UpdateWorkRecipe(RecipeWork recipeWork, string work_recipe_name) { return sRecipeWork.UpdateWorkRecipe(recipeWork, work_recipe_name); } /// /// 保存作业配方 /// /// /// public bool SavePecipeWork(RecipeWork pecipeWork) { return sRecipeWork.SavePecipeWork(pecipeWork); } /// /// 得到所有配方名称 /// /// /// public List GetRecipeWorkName(out int len) { return sRecipeWork.SelRecipeWorkNameInfo(out len); } /// /// 根据总配方名 查询当前作业配方内容 /// /// /// public RecipeWork GetTotalWorkRecipe(string recipeName) { return sRecipeWork.GetTotalWorkRecipeInfo(recipeName); } /// /// 查询当前机台配方是否存在 /// /// /// public bool SelRecipeNameInfo(string recipeName,string scrMachine) { return sRecipeWork.SelRecipeName(recipeName, scrMachine); } /// /// 在配方表中查询 配方名 /// /// /// public bool SelRecipeNameInRecipeInfo(string recipeName,string machineRecipe) { return sRecipeWork.SelRecipeNameInRecipe(recipeName, machineRecipe); } public bool SelRecipeNameInRecipeInfo(string recipeName ) { return sRecipeWork.SelRecipeNameInRecipe(recipeName); } /// /// 根据 配方名 查询冲洗臂配方 /// /// /// public FlushRecipeArm SelectFlushRecipeArmInfo(string recipeName,string state) { return sRecipeWork.SelectFlushRecipeArm(recipeName,state); } /// /// 根据 配方名 查询擦洗臂配方 /// /// /// public ScrubbingRecipeArm SelectScrubbingRecipeArmInfo(string recipeName,string state) { return sRecipeWork.SelectScrubbingRecipeArm(recipeName,state); } #endregion 作业配方 /// /// 根据配方名称 查找该配方下的所有步骤 /// /// /// public DataTable GetRecipeScrInfo(string scrName,string scrMachine) { return sRecipeWork.GetRecipeScr(scrName, scrMachine); } /// /// 根据配方名 查询当前配方步骤 /// /// /// public RecipeInDetail[] GetScrmachineRecipe(string recipeName) { return sRecipeWork.GetScrmachineRecipeInfo(recipeName); } public RecipeInDetail[] GetScrmachineRecipeAll(string recipeName) { return sRecipeWork.GetScrmachineRecipeAllInfo(recipeName); } /// /// 保存配方详细信息 /// /// /// public bool SaveRecipeScrInfo(RecipeInDetail[] recipeInDetail,string scr) { return sRecipeWork.SaveRecipeScr(recipeInDetail,scr); } /// /// 更新-配方下-详细的步骤 /// /// /// public bool UpdateRecipeScr(RecipeInDetail[] recipeInDetail, string scr_machine) { return sRecipeWork.UpdateRecipeScr(recipeInDetail, scr_machine); } /// /// 添加默认配方展示 /// /// public bool AddRecipeModelInfo() { return sRecipeWork.AddRecipeModel(); } /// /// 根据配方名 查询改配方相同的数据信息 /// /// /// public List GetRecipeSameInfo(string reciepName) { return sRecipeWork.GetRecipeSame(reciepName); } /// /// 根据配方名 查询改配方相同的数据信息 /// /// /// public List GetRecipeSameInfoAdd(string reciepName) { return sRecipeWork.GetRecipeSameAdd(reciepName); } /// /// 删除机台上的配方名 /// /// /// public bool DelMachineRecipeInfo(string recipeName,string nowMachineName) { return sRecipeWork.DelMachineRecipe(recipeName, nowMachineName); } /// /// 删除配方详细信息 /// /// /// public bool DelRecipeScrInfo(string recipeName,string scr_machine) { return sRecipeWork.DelRecipeScrInfo(recipeName, scr_machine); } /// /// 查询 当前机台的有什么配方 页面展示 /// /// /// public DataTable GetMachineRecipeScrInfo(string machineName) { return sRecipeWork.GetMachineRecipeScr(machineName); } /// /// 查询机台上的 配方 选择第一个 用于默认配方展示 /// /// /// public string GetMachineOneRecipeScrInfo(string machineName) { return sRecipeWork.GetMachineOneRecipeScr(machineName); } /// /// 查询当前机台 有没有这个配方 /// /// 配方名 /// 机台 /// public bool FindMachineRecipeScrInfo(string recipeName, string machine) { return sRecipeWork.FindMachineRecipeScr(recipeName, machine); } /// /// 绑定配方绑定关系 /// /// /// public bool SaveRecipeMachine(RecipeMachine recipeMachine) { return sRecipeWork.SaveRecipeMachineInfo(recipeMachine); } /// /// 更新-机台配方绑定关系 /// /// /// public bool UpdateRecipeMachineInfo(RecipeMachine recipeMachine, string scrRecipeName) { return sRecipeWork.UpdateRecipeMachineInfo(recipeMachine, scrRecipeName); } /// /// 保存作业日志 /// /// /// public bool SaveWorkLogInfo(OperateJobLog operateJobLog) { return sRecipeWork.SaveWorkLog(operateJobLog); } /// /// 更新作业配方-结束时间-完成状态 /// /// /// public bool UpdateWorkLogInfo(string logNum, string EndTime,string finishState,int pieces) { return sRecipeWork.UpdateWorkLog(logNum, EndTime, finishState, pieces); } /// /// 更新保存 /// /// /// public bool infoChange (RecipeInDetail[] recipeInDetail, string scr_recipe_name) { return sRecipeWork.infoChange(recipeInDetail,scr_recipe_name); } /// /// 删除 /// /// /// public bool infoChange(string scr_recipe) { return sRecipeWork.infoChange(scr_recipe); } #region 冲洗臂 /// /// 冲洗臂保存 /// /// /// public bool SaveFlushRecipeArmInfo(FlushRecipeArm flushRecipeArm) { return sRecipeWork.SaveFlushRecipeArm(flushRecipeArm); } /// /// 判断冲洗臂是否重复 /// /// /// /// public bool whetherRepeat(string scrub_recipe_name, string scrub_type) { return sRecipeWork.whetherRepeat(scrub_recipe_name, scrub_type); } public List SelFlushRecipeArmInfo(string type) { return sRecipeWork.SelFlushRecipeArm(type); } /// /// 删除配方 冲洗臂 /// /// /// public bool DeleteFlushRecipeArmInfo(string name) { return sRecipeWork.DeleteFlushRecipeArm(name); } /// /// 更新配方 冲洗臂 /// /// /// public bool UpdateFlushRecipeArmInfo(FlushRecipeArm name) { return sRecipeWork.UpdateFlushRecipeArm(name); } public bool UpdateFlushRecipeArm(FlushRecipeArm flushRecipeArm, string oldName) { return sRecipeWork.UpdateFlushRecipeArm(flushRecipeArm, oldName); } #endregion 冲洗臂 #region 擦洗臂 /// /// 保存擦洗臂配方 /// /// /// public bool SaveScrubbingRecipeArmInfo(ScrubbingRecipeArm scrubbingRecipeArm) { return sRecipeWork.SaveScrubbingRecipeArm(scrubbingRecipeArm); } /// /// 判断擦洗臂配方是否重复 /// /// /// /// public bool whetherScrubbing(string flush_recipe_name, string flush_type) { return sRecipeWork.whetherScrubbing(flush_recipe_name, flush_type); } /// /// 根据机台类别查询 擦洗臂配方 /// /// 1:SCR1机台 ..4SCR4机台 /// public List SelScrubbingRecipeArmInfo(string type) { return sRecipeWork.SelScrubbingRecipeArm(type); } /// /// 查询擦洗臂配方 /// /// public DataTable GetScruRecipeScrInfo(int state) { return sRecipeWork.GetScruRecipeScr(state); } /// /// 查询冲洗臂配方 /// /// public DataTable GetFluRecipeScr(int state) { return sRecipeWork.GetFluRecipeScr(state); } /// /// 更新配方 擦洗臂 /// /// /// public bool UpdateScrubRecipeArmInfo(ScrubbingRecipeArm name,string oldName) { return sRecipeWork.UpdateScrubRecipeArm(name,oldName); } public bool UpdatWorkRecipeInfo(RecipeWork name) { return sRecipeWork.UpdatWorkRecipe(name); } /// /// 删除配方 擦洗臂 /// /// /// public bool DeletScrubRecipeArmInfo(string name) { return sRecipeWork.DeletScrubRecipeArm(name); } #endregion 擦洗臂 /// /// 配方新增下拉 /// /// /// /// public List GetWorkMachineRecipeScrInfo(string machineName, out int len) { return sRecipeWork.GetWorkMachineRecipeScr(machineName, out len); } /// /// 查询是否存在了这个作业配方名 /// /// /// false不存在true存在 public bool whetherExist(string work_recipe_name) { return sRecipeWork.whetherExist(work_recipe_name); } /// /// 删除作业配方 /// /// 作业配方名称 /// public bool deleteRecipe(string work_recipe_name) { return sRecipeWork.deleteRecipe(work_recipe_name); } /// /// 删除机台上的老配方名 /// /// 之前的配方名 /// 新的配方名 /// ///创建人id /// public bool SaveDelMachineRecipe(string oldName,string scr) { return sRecipeWork.SaveDelMachineRecipe(oldName,scr); } /// /// 更新作业配方 /// /// public bool Updatetb_work_recipe(string oldName, string newName, string scr) { return sRecipeWork.Updatetb_work_recipe(oldName,newName, scr); } /// /// 判断 单元配方是否 已经被选择 /// /// /// /// public bool chooseUnitRecipe(string scrNum,string unitRecipeName) { return sRecipeWork.ExistChoosedUnitRecip(scrNum, unitRecipeName); } /// /// 查询配方步骤 /// /// ///创建人id /// public int recipeAllStep(string scr_recipe_name, string scr_machine) { return sRecipeWork.recipeAllStep(scr_recipe_name, scr_machine); } /// /// 查询当前 /// /// 配方SCR /// 擦洗臂还是冲洗臂 /// 选择的配方名 /// public bool whetherDelete(string scr, string _arm, string armName) { return sRecipeWork.whetherDelete(scr, _arm, armName); } /// /// 查询配方时间 /// /// /// /// public int selAllTime(string scr_recipe_name, string scr_machine) { return sRecipeWork.selAllTime(scr_recipe_name, scr_machine); } } }