You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

504 lines
17 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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