| | |
| | | public static GridMessage gidmes = new GridMessage(); //定义全局返回信息对象 |
| | | public static string strProcName = ""; //定义全局sql变量 |
| | | public static List<SqlParameter> listStr = new List<SqlParameter>(); //定义全局参数集合 |
| | | |
| | | public static SqlParameter[] parameters; //定义全局SqlParameter参数数组 |
| | | |
| | | |
| | |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[FastReport打印] |
| | | public static PrintMessage MesOrderFastReportPrintSearch(string username, string mesordercode) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | PrintMessage ms = new PrintMessage(); |
| | | //获取工单工序任务数据 |
| | | sql = @"select A.seq,A.wo_code,P.partcode,P.partname,P.partspec,R.name as routename,M.plan_qty as orderqty,@username as lm_user,@createdate as lm_date, |
| | | B.stepcode,B.stepname,A.plan_qty,(case when A.good_qty=0 then '' end) as good_qty,(case when A.ng_qty=0 then '' end) as ng_qty,A.wo_code+';'+B.stepcode as stepqrcode |
| | | from TK_Wrk_Step A |
| | | left join TK_Wrk_Man M on A.wo_code=M.wo_code |
| | | left join TFlw_Rout R on A.route_code=R.code |
| | | left join TMateriel_Info P on M.materiel_code=P.partcode |
| | | left join TStep B on A.step_code=B.stepcode |
| | | where A.wo_code=@mesordercode "; |
| | | dynamicParams.Add("@username", username); |
| | | dynamicParams.Add("@createdate", DateTime.Now.ToString()); |
| | | dynamicParams.Add("@mesordercode", mesordercode); |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data.Rows.Count > 0) |
| | | { |
| | | ms.code = "200"; |
| | | ms.Message = "查询成功!"; |
| | | ms.data = data; |
| | | } |
| | | else |
| | | { |
| | | ms.code = "300"; |
| | | ms.Message = "无生产任务数据!"; |
| | | ms.data = null; |
| | | } |
| | | |
| | | return ms; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |