VueWebApi/DLL/DAL/QualityManagementDAL.cs
@@ -905,7 +905,7 @@
                // --------------查询指定数据--------------
                var total = 0; //总条数
                var sql = @"select *  from(
                            select A.code,A.name,A.status,A.checktype,A.sampmethod,A.sampscare,A.suitobject,A.descr,A.suitpart,A.lm_date,U.username,
                            select A.code,A.name,A.status,A.checktype,A.sampmethod,A.sampscare,A.suitobject,A.stepcode,S.stepname,A.descr,A.suitpart,A.lm_date,U.username,
                            case when A.suitobject='P' then
                            STUFF(( SELECT ';' + partname
                            FROM TMateriel_Info
@@ -919,7 +919,8 @@
                            FOR XML PATH('')), 1, 1,'')
                            end as suitpartname
                            from TStepCheckStandard A
                     left join TUser U on  A.lm_user=U.usercode
                            left join TUser U on  A.lm_user=U.usercode
                            left join TStep S on A.stepcode=S.stepcode
                            ) as AA 
                            where " + search;
                var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
@@ -970,7 +971,7 @@
        #endregion
        #region[质检方案新增/编辑提交]
        public static ToMessage QualityInspectionAddEditSave(string qualityinsptcode, string qualityinsptname, string status, string checktype, string sampmethod, string sampscare, string suitobject, string suitpart, string descr, string checkitem, string type, string username)
        public static ToMessage QualityInspectionAddEditSave(string qualityinsptcode, string qualityinsptname, string status, string checktype, string sampmethod, string sampscare, string suitobject, string suitpart, string descr,string stepcode, string checkitem, string type, string username)
        {
            var sql = "";
            List<object> list = new List<object>();
@@ -985,8 +986,8 @@
                {
                    case "Add": //新增
                        //写入质检方案主表
                        sql = @"insert into  TStepCheckStandard(code,name,status,checktype,sampmethod,sampscare,suitobject,suitpart,descr,lm_user,lm_date)
                                values(@code,@name,@status,@checktype,@sampmethod,@sampscare,@suitobject,@suitpart,@descr,@lm_user,@lm_date)";
                        sql = @"insert into  TStepCheckStandard(code,name,status,checktype,sampmethod,sampscare,suitobject,suitpart,stepcode,descr,lm_user,lm_date)
                                values(@code,@name,@status,@checktype,@sampmethod,@sampscare,@suitobject,@suitpart,@stepcode,@descr,@lm_user,@lm_date)";
                        list.Add(new
                        {
                            str = sql,
@@ -1000,6 +1001,7 @@
                                sampscare = sampscare,
                                suitobject = suitobject,
                                suitpart = suitpart,
                                stepcode= stepcode,
                                descr = descr,
                                lm_user = username,
                                lm_date = date
@@ -1051,7 +1053,7 @@
                        list.Add(new { str = sql, parm = new { code = qualityinsptcode } });
                        //修改质检方案主表
                        sql = @"update TStepCheckStandard set name=@name,status=@status,checktype=@checktype,sampmethod=@sampmethod,sampscare=@sampscare,
                                suitobject=@suitobject,suitpart=@suitpart,descr=@descr
                                suitobject=@suitobject,suitpart=@suitpart,stepcode=@stepcode,descr=@descr
                                where code=@code";
                        list.Add(new
                        {
@@ -1066,6 +1068,7 @@
                                sampscare = sampscare,
                                suitobject = suitobject,
                                suitpart = suitpart,
                                stepcode = stepcode,
                                descr = descr,
                            }
                        });