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[生产开报工扫码获取工单对应工序任务(自制)]
@@ -2521,7 +2555,7 @@
                        }
                        //是否末道
                        if (json[i].last_choke == "Y")
                       else if (json[i].last_choke == "Y")
                        {
                            decimal this_reportqty = decimal.Parse(json[i].report_qty.ToString()); //报工数量(合格)
                            decimal this_ngqty = decimal.Parse(json[i].ng_qty.ToString()); //不良数量
@@ -3033,7 +3067,7 @@
                                wo_code=json[i].wo_code.ToString(),
                                step_seq=json[i].step_seq.ToString(),
                                step_code=json[i].step_code.ToString(),
                                repair_qty = decimal.Parse(json[i].report_qty),
                                report_qty = decimal.Parse(json[i].report_qty),
                                ng_qty = decimal.Parse(json[i].ng_qty),
                                bad_qty = decimal.Parse(json[i].bad_qty),
                            }