|  |  |  | 
|---|
|  |  |  | private json objJsonResult = new json(); | 
|---|
|  |  |  | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
|---|
|  |  |  | DataSet ds; | 
|---|
|  |  |  | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 车间工序全程跟踪报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/OrderProcFlowAllReportList")] | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 计件工资报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/EmployeePiecePayReport")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object EmployeePiecePayReport(string sWhere) | 
|---|
|  |  |  | public object EmployeePiecePayReport(string sWhere, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取需要拼接的字符串 | 
|---|
|  |  |  | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "计件工资报表"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (sql_splice != "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sWhere += sql_splice; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string czymc = ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl"); | 
|---|
|  |  |  | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ","; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sWhere += ",''"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePayReport " + sWhere + "", "h_p_Sc_EmployeePiecePayReport"); | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 计件工资汇总报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/EmployeePiecePaySumReport")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object EmployeePiecePaySumReport(string sWhere) | 
|---|
|  |  |  | public object EmployeePiecePaySumReport(string sWhere, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取需要拼接的字符串 | 
|---|
|  |  |  | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "计件工资汇总报表"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (sql_splice != "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sWhere += sql_splice; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string czymc = ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl"); | 
|---|
|  |  |  | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ","; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sWhere += ",''"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePaySumReport " + sWhere + "", "h_p_Sc_EmployeePiecePaySumReport"); | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 工资汇报日报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/EmployeePieceWorkReport")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object EmployeePieceWorkReport(string sWhere) | 
|---|
|  |  |  | public object EmployeePieceWorkReport(string sWhere, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取需要拼接的字符串 | 
|---|
|  |  |  | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "工序汇报日报表"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (sql_splice != "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sWhere += sql_splice; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string czymc = ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl"); | 
|---|
|  |  |  | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ","; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sWhere += ",''"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePieceWorkReport " + sWhere + "", "h_p_Sc_EmployeePieceWorkReport"); | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 生产车间工序报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPReport")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object WorkShopProcessWIPReport(string sWhere) | 
|---|
|  |  |  | public object WorkShopProcessWIPReport(string sWhere,string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取需要拼接的字符串 | 
|---|
|  |  |  | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "生产车间工序报表"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(sql_splice != "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sWhere += sql_splice; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string czymc = ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl"); | 
|---|
|  |  |  | for(int i = 0; i < ds.Tables[0].Rows.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"])+","; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sWhere += ",''"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPReport"); | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 工序在制品报表 查询 | 
|---|
|  |  |  | [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPSumReport")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object WorkShopProcessWIPSumReport(string sWhere) | 
|---|
|  |  |  | public object WorkShopProcessWIPSumReport(string sWhere, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //获取需要拼接的字符串 | 
|---|
|  |  |  | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "工序在制品报表"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (sql_splice != "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sWhere += sql_splice; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string czymc = ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl"); | 
|---|
|  |  |  | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ","; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sWhere += ",''"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPSumReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPSumReport"); | 
|---|