| | |
| | | |
| | | |
| | | #region[工序检验记录列表查询] |
| | | public static ToMessage StepCheckTableSearch(string wocode, string partcode, string partname, string partapec, string stepname, string standname, string checktype, string checkresult, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage StepCheckTableSearch(string stu_torgcode,string stu_torgtypecode, string wocode, string partcode, string partname, string partapec, string stepname, string standname, string checktype, string checkresult, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | switch (stu_torgtypecode) |
| | | { |
| | | case "": |
| | | break; |
| | | case "D": |
| | | search += "and L.org_code=@stu_torgcode "; |
| | | dynamicParams.Add("@stu_torgcode", stu_torgcode); |
| | | break; |
| | | case "W": |
| | | search += "and C.org_code=@stu_torgcode "; |
| | | dynamicParams.Add("@stu_torgcode", stu_torgcode); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | | search += "and A.wo_code like '%'+@wocode+'%' "; |
| | |
| | | left join TStep S on A.step_code=S.stepcode |
| | | left join TStepCheckStandard T on A.checkstaned_code=T.code |
| | | left join TUser U on A.check_user=U.usercode |
| | | left join TK_Wrk_Man M on A.wo_code=M.wo_code |
| | | left join TOrganization C on A.torg_code=C.org_code |
| | | left join TOrganization L on C.parent_id=L.id |
| | | where A.check_type in('FirstCheck','PatroCheck','EndCheck') " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | |
| | | #endregion |
| | | |
| | | #region[工序检验记录导出] |
| | | public static ToMessage StepCheckTableOutExcel(string wocode, string partcode, string partname, string partapec, string stepname, string standname, string checktype, string checkresult, string prop, string order) |
| | | public static ToMessage StepCheckTableOutExcel(string stu_torgcode,string stu_torgtypecode, string wocode, string partcode, string partname, string partapec, string stepname, string standname, string checktype, string checkresult, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | switch (stu_torgtypecode) |
| | | { |
| | | case "": |
| | | break; |
| | | case "D": |
| | | search += "and L.org_code=@stu_torgcode "; |
| | | dynamicParams.Add("@stu_torgcode", stu_torgcode); |
| | | break; |
| | | case "W": |
| | | search += "and G.org_code=@stu_torgcode "; |
| | | dynamicParams.Add("@stu_torgcode", stu_torgcode); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (wocode != "" && wocode != null) |
| | | { |
| | | search += "and A.wo_code like '%'+@wocode+'%' "; |
| | |
| | | left join TStepCheckStandard T on A.checkstaned_code=T.code |
| | | left join TStepCheckStandardSub C on A.checkstaned_code=C.stepstaned_code and B.checkitem_code=C.stepcheckitem_code |
| | | left join TUser U on A.check_user=U.usercode |
| | | left join TK_Wrk_Man K on A.wo_code=K.wo_code |
| | | left join TOrganization G on A.torg_code=G.org_code |
| | | left join TOrganization L on G.parent_id=L.id |
| | | where A.check_type in('FirstCheck','PatroCheck','EndCheck') " + search; |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |
| | | data.TableName = "Table"; //设置DataTable的名称 |