yl
2022-12-05 3004bd5c7daa7d85ed691818ab96bde207aeeedc
VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -776,6 +776,40 @@
        }
        #endregion
        #region[MES工单工序任务查看SOP,获取SOP文件下拉列表]
        public static ToMessage SearchWorkStepSopList(string partcode, string routecode,string stepcode)
        {
            string sql = "";
            var dynamicParams = new DynamicParameters();
            try
            {
                //获取SOP文件信息
                sql = @"select id,define_name,file_path   from TK_Sop_Matfile where materiel_code=@partcode and eqptype_code in(
                        select distinct T.code  from TMateriel_Route A
                        inner join TFlw_Rtdt B on A.route_code=B.rout_code
                        inner join TFlw_Rteqp E on B.step_code=E.step_code
                        inner join TEqpInfo  Q on E.eqp_code=Q.code
                        inner join TEqpType T on Q.eqptype_code=T.code
                        where A.materiel_code=@partcode and A.route_code=@routecode and B.step_code=@stepcode)";
                dynamicParams.Add("@partcode", partcode);
                dynamicParams.Add("@routecode", routecode);
                dynamicParams.Add("@stepcode", stepcode);
                var data = DapperHelper.selectdata(sql, dynamicParams);
                mes.code = "200";
                mes.Message = "查询成功!";
                mes.data = data;
            }
            catch (Exception e)
            {
                mes.code = "300";
                mes.count = 0;
                mes.Message = e.Message;
                mes.data = null;
            }
            return mes;
        }
        #endregion
        #region[生产开报工扫码获取工单对应工序任务(自制)]