1
wtt
2025-10-15 7d1ce3d6438e820c0fb69480f5d50cd68e271dd4
WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
@@ -59,6 +59,86 @@
        }
        #endregion
        #region 工序派工单列表(职员查看自己任务)
        [Route("Sc_ProcExchSendWorkBill/Sc_ProcExchSendWorkBillListByEmp")]
        [HttpGet]
        public object Sc_ProcExchSendWorkBillListByEmp(string sWhere, string user,int HEmpID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = $"exec  h_p_Sc_ProcExchSendWorkBillListByEmp '{sWhere}','{user}',{HEmpID} ";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_ProcExchSendWorkBillListByEmp");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 派工平台查询工序流转卡数据
        [Route("Sc_ProcExchSendWorkBill/Sc_ProcessExchangeHEmpList")]
        [HttpGet]
        public object Sc_ProcessExchangeHEmpList(string sWhere, string user)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                List<object> columnNameList = new List<object>();
                //得到信息(委外标记为0时,流转标记为1时)
                //ds = oCN.RunProcReturn("select  * from h_v_Sc_ProcessExchangeBillList_Sec  where 下道流转工序<>'转' and 委外标记=0 and 流转标记=1  and 工序号='" + sProcNo + "' and 序列号='" + HSEQNumber + "'", "h_v_Sc_ProcessExchangeBillList_Sec");
                ds = oCN.RunProcReturn("select  * from h_v_Sc_ProcessExchangeArrangementHEmpList  where 1=1 " + sWhere, "h_v_Sc_ProcessExchangeArrangementHEmpList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "[0000-1-037]Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region 查询工序流转卡数据
        [Route("Sc_ProcExchSendWorkBill/GetProcessExchangeBillSub")]
        [HttpGet]