WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1478,6 +1478,26 @@
                }
                if (IsAudit == 1) //反审核提交
                {
                    //反审核前控制=========================================
                    DataSet ds = oCN.RunProcReturn("Exec h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl " + lngBillKey, "h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl");
                    if (ds == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + "反审核前判断失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //=========================================================
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
@@ -1856,11 +1876,11 @@
            try
            {
                string sql = @"select 
                            c.HEmpID
                            ISNULL(c.HEmpID,0) HEmpID
                            ,e.HName HEmpName
                            ,c.HDeptID
                            ,ISNULL(c.HDeptID,0) HDeptID
                            ,d.HName HDeptName
                            ,d.HEmpID HManagerID
                            ,ISNULL(d.HEmpID,0) HManagerID
                            ,e1.HName HManagerName
                            from Gy_Czygl as c
                            left join Gy_Employee as e on c.HEmpID = e.HItemID
@@ -1923,7 +1943,7 @@
                    else
                    {
                        sWhere = " and HCusID in (";
                        for(var i = 0; i < ds.Tables[0].Rows.Count; i++)
                        for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            if (i < ds.Tables[0].Rows.Count - 1)
                            {
@@ -1935,6 +1955,8 @@
                            }
                        }
                    }
                    //sWhere = " and 1=1 ";
                }
                objJsonResult.code = "1";
@@ -2062,6 +2084,8 @@
                List<object> columnNameList0 = new List<object>();
                List<object> columnNameList1 = new List<object>();
                List<object> columnNameList2 = new List<object>();
                List<object> columnNameList3 = new List<object>();
                List<object> columnNameList4 = new List<object>();
                string sql = "exec h_p_Xs_SeOrderBill_lookdown " + HInterID;
                ds = oCN.RunProcReturn(sql, "h_p_Xs_SeOrderBill_lookdown");
@@ -2090,9 +2114,27 @@
                    columnNameList2.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                //添加 销售出库单 列名
                foreach (DataColumn col in ds.Tables[3].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList3.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                //添加 工序流转卡 列名
                foreach (DataColumn col in ds.Tables[4].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList4.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                columnNameListSum.Add(columnNameList0);
                columnNameListSum.Add(columnNameList1);
                columnNameListSum.Add(columnNameList2);
                columnNameListSum.Add(columnNameList3);
                columnNameListSum.Add(columnNameList4);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -2111,5 +2153,42 @@
            }
        }
        #endregion
        #region 销售订单 根据主内码与子内码获取销售订单数据
        [Route("Xs_SeOrderBill/loadXs_SeOrderBill_Push")]
        [HttpGet]
        public object loadXs_SeOrderBill_Push(long HInterID,long HSubID)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_SeOrderBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    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
    }
}