WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -12,6 +12,7 @@
using WebAPI.Models;
using WebAPI.Service;
using Kingdee.BOS.WebApi.Client;
using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -1401,7 +1402,7 @@
            }
        }
        #region
        /// <summary>
        /// 生成金蝶云来料检验单
        /// </summary>
@@ -1647,9 +1648,306 @@
                return objJsonResult;
            }
        }
        #endregion
        #region 生成金蝶云来料检验单 2025/11/26
        [Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json2")]
        [HttpGet]
        public object set_SaveQCStockInCheckBill_Json2(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
            double HCheckQty, double HRightQty, double HBadQty,
            string HCheckResult, string HSupNumber,
            string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
            Int64 HSourceEntryID, string HSourceBillNo, string user,
            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
            Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID, string HBatchNo)
        {
            try
            {
                //获取生产汇报单最大InterID和单据号
                //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
                //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
                HBatchNo = HBatchNo ?? "";
                //保存
                oCN.BeginTran();
                //生产汇报单主表
                oCN.RunProc("Insert Into QC_POStockInCheckBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
                ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
                ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
                ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
                ") " +
                " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
                ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
                ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
                ",'" + HCheckResult.ToString() + "','', '','',''" +
                ") ");
                //生产汇报单子表
                oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
                      " (HInterID,HEntryID,HCloseMan,HCloseType" +
                      ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                      ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
                      "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
                      ") values("
                      + HInterID.ToString() + ",1,'',''" +
                      ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
                      ",0,0,0,0,''" +
                      ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
                      ") ");
                //同步金蝶
                //访问金蝶
                var loginRet = InvokeHelper.Login();
                var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
                if (isSuccess == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作失败,金蝶账号登录异常。" + loginRet;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                // string sql = @"select a.FID,a.FNUMBER Employee,d.FNUMBER Dept from Gy_Employee e
                //             join AIS20210811135644..T_HR_EMPINFO a on e.HNumber = a.FNUMBER
                //             join AIS20210811135644..T_BD_STAFFTEMP c on c.FID = a.FID
                //             join AIS20210811135644..T_BD_DEPARTMENT d on c.FDEPTID = d.FDEPTID
                //             where e.HItemID ='" + HKeeperID + "' ";
                // //查询质检员对应质检部门
                // ds = oCN.RunProcReturn(sql, "T_HR_EMPINFO");
                // LogService.Write("sql" + sql);
                // if (ds.Tables[0].Rows.Count == 0)
                // {
                //     objJsonResult.code = "0";
                //     objJsonResult.count = 0;
                //     objJsonResult.Message = "操作失败,质检员对应质检部门无数据。" + sql;
                //     objJsonResult.data = null;
                //     return objJsonResult;
                // }
                JObject model = new JObject();
                model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //单据类型 来料检验单JYD001_SYS
                model.Add("FBusinessType", "1"); //业务类型
                model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期
                model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //质检组织
                model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //来源组织
                //model.Add("FInspectDepId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Dept"].ToString() }); //质检部门
                //model.Add("FInspectorId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Employee"].ToString() }); //质检员
                model.Add("FISSYNCED", "false");//  是否已同步
                model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  报检日期
                model.Add("FBillNo", HBillNo);
               // LogService.Write("质检部门" + ds.Tables[0].Rows[0]["Dept"].ToString());
               // LogService.Write("质检员" + ds.Tables[0].Rows[0]["Employee"].ToString());
                JArray Fentity = new JArray();
                JObject FentityModel = new JObject();
                FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  物料内码
                FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//计量单位内码
                FentityModel.Add("FInspectQty", HCheckQty.ToString());//  检验数量
                FentityModel.Add("FQualifiedQty", HRightQty.ToString());//  合格数量
                FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());//  不合格数量
                FentityModel.Add("FInspectResult", HCheckResult.ToString());//  检验结果
                FentityModel.Add("FQCStatus", "1");//  质检状态
                FentityModel.Add("FIsRelated", false);//  不良品关联标志
                FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  源单类型
                FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//基本单位
                FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//基本单位检验数量
                FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  供应商
                                                                                                        //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // 仓库
                FentityModel.Add("FInspectTimes", "1"); // 检验次数
                FentityModel.Add("FTimeUnit", "24");//时间单位
                FentityModel.Add("FSAMPLEDAMAGEBEARER", "2");//样本破坏承担方
                FentityModel.Add("FISFIRSTINSPECT", false);//首检
                FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//基本单位合格数
                FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//基本单位接收数
                FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//币别
                FentityModel.Add("FIsSplitRow ", false);// 是否拆分行
                FentityModel.Add("FLot", new JObject() { ["Fnumber"] = HBatchNo.ToString() });//批号
                JArray Fentity2 = new JArray();
                JObject FentityModel2 = new JObject();
                FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  物料内码
                FentityModel2.Add("FPolicyStatus", "1");  //状态
                FentityModel2.Add("FPolicyQty", HRightQty.ToString() == "0" ? HBadQty.ToString() : HRightQty.ToString());    //数量
                FentityModel2.Add("FBasePolicyQty", HRightQty.ToString() == "0" ? HBadQty.ToString() : HRightQty.ToString()); //基本单位数量
                FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //使用决策
                FentityModel2.Add("FIsCheck", false);   //是否抽检
                FentityModel2.Add("FIsDefectProcess", false);  //不良处理
                FentityModel2.Add("FCanSale", false);   //可销售
                FentityModel2.Add("FIsMRBReview", false);   //MRP评审
                FentityModel2.Add("FIsReturn", true);   //判退
                FentityModel2.Add("FIsRelatedDefect", false);   //不良品关联标志
                Fentity2.Add(FentityModel2);
                FentityModel.Add("FPolicyDetail", Fentity2);
                JArray Fentity3 = new JArray();
                JObject FentityModel3 = new JObject();
                FentityModel3.Add("FDetailID", "0");//
                FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill");   //源单类型
                FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString());    //收料通知单单号
                FentityModel3.Add("FSrcInterId", HSLInterID.ToString());      //收料通知单主ID
                FentityModel3.Add("FSrcEntryId", HSLEntryID.ToString());    //收料通知单子ID
                FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString());    //源单行号
                FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" });  //  订单类型
                FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString());   //订单单号
                FentityModel3.Add("FOrderId", HSourceInterID.ToString());      //订单主ID
                FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString());  //订单子ID
                FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString());  //订单行号
                Fentity3.Add(FentityModel3);
                FentityModel.Add("FReferDetail", Fentity3);
                JArray Fentity4 = new JArray();
                JObject FentityModel4 = new JObject();
                FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect");   //单据转换规则
                FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY");    //收料通知单子表
                FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString());      //收料通知单主内码
                FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString());    //收料通知单子内码
                FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString());    //
                Fentity4.Add(FentityModel4);
                FentityModel.Add("FEntity_Link", Fentity4);
                Fentity.Add(FentityModel);
                model.Add("FEntity", Fentity); //明细信息
                JObject jsonRoot = new JObject()
                {
                    ["Creator"] = "",
                    ["NeedUpDateFields"] = new JArray(),
                    ["NeedReturnFields"] = new JArray(),
                    ["IsDeleteEntry"] = "false",
                    ["SubSystemId"] = "",
                    ["IsVerifyBaseDataField"] = "false",
                    //["IsAutoSubmitAndAudit"] = true,//自动调用提交和审核功能
                    ["Model"] = model
                };
                LogService.Write("检验单json:" + jsonRoot);
                string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//保存
                //判断保存是否成功
                if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    LogService.Write("来料检验单保存错误jsonRoot:" + jsonRoot);
                    LogService.Write("报错:" + result);
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = $"来料检验单同步金蝶云失败!单号:{HBillNo.ToString()}" + jsonRoot;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //提交审核
                string result1 = string.Empty;
                string result2 = string.Empty;
                var fID = JObject.Parse(result)["Result"]["Id"].ToString();
                var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
                var json = new
                {
                    Ids = fID,
                };
                K3CloudApiClient client = new K3CloudApiClient("http://47.96.97.237/k3cloud");
                //        K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
                result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交
                //result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//审核
                if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = $"来料检验单号:{fBillNo},提交失败" + result;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    DataSet ds1 = oCN.RunProcReturn("select * from MES_AccessoriesList  where  HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
                    for (var i = 0; i < ds1.Tables[0].Rows.Count; i++)
                    {
                        string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[i]["HFileName"]);
                        string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[i]["HFilePath"]);
                        string path = HFilePath;
                        FileInfo fi = new FileInfo(path);
                        long len = fi.Length;
                        byte[] buffer = new byte[len];
                        FileStream fs = new FileStream(path, FileMode.Open);
                        fs.Read(buffer, 0, (int)len);
                        //文件IO流
                        string a = Convert.ToBase64String(buffer);
                        ds = oCN.RunProcReturn("select * from  AIS20210811135644..T_QM_INSPECTBILL where FBILLNO='" + HBillNo + "'", "T_QM_INSPECTBILL");
                        HInterID = long.Parse(ds.Tables[0].Rows[0]["FID"].ToString());
                        string jsonStr = "{" +
                           " \"FileName\":\"" + HFileName + "\"," +
                               " \"FormId\":\"QM_InspectBill\"," +
                               " \"IsLast\":\"true\"," +
                               " \"InterId\":\"" + HInterID + "\"," +
                               " \"BillNo\":\"" + HBillNo + "\"," +
                               " \"AliasFileName\":\"test\"," +
                               " \"SendByte\":\"" + a + "\"" +
                           "}";
                        string _vlog = InvokeHelper.UpLoad("QM_InspectBill", jsonStr);
                        LogService.Write("json:" + jsonStr);
                        LogService.Write("_vlog:" + _vlog);
                        if (JObject.Parse(_vlog)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                        {
                            oCN.RollBack();
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"来料检验单号:{fBillNo},照片同步失败" + _vlog;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //string jsonStr = "{" +
                    //   " \"FileName\":\"" + HFileName + "\"," +
                    //       " \"FormId\":\"QM_InspectBill\"," +
                    //       " \"IsLast\":\"true\"," +
                    //       " \"InterId\":\"" + HInterID + "\"," +
                    //       " \"BillNO\":\"" + HBillNo + "\"," +
                    //       " \"AliasFileName\":\"test\"," +
                    //       " \"SendByte\":\"" + a + "\"," +
                    //   "}";
                    //var ret = client.AttachmentUpload(jsonStr);
                }
                oCN.Commit();
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存成功!";
                objJsonResult.data = 1;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
@@ -6121,6 +6419,61 @@
        }
        #endregion
        #region 不良品评审处理单 分页列表
        [Route("Sc_ProcessMangement/getGet_QC_NoPassProdDisposeBillListPage")]
        [HttpGet]
        public json Get_QC_NoPassProdDisposeBillListPage(string sWhere, string user, int page, int size)
        {
            DataSet ds;
            json res = new json();
            try
            {
                List<object> columnNameList = new List<object>();
                //判断权限
                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdDisposeBillMain_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_NoPassProdDisposeBillList " + page + "," + size + ",''", "h_p_QC_NoPassProdDisposeBillList");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_NoPassProdDisposeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_NoPassProdDisposeBillList");
                }
                //添加列名
                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列对象的列名
                }
                res.code = CodeConstant.SUCCEED;
                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                res.Message = "Sucess!";
                res.list = columnNameList;
                res.data = ds.Tables[0];
                return res;
            }
            catch (Exception e)
            {
                res.code = CodeConstant.FAIL;
                res.count = CountConstant.FAIL;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        #endregion
        #region 不良品评审处理单 删除
        [Route("Sc_ProcessMangement/DeleteQC_NoPassProdDisposeBill")]
@@ -6539,8 +6892,30 @@
                //进行需要进行的关闭/反关闭操作
                if (IsAudit == 0) //关闭提交
                {
                    //关闭前控制=========================================
                    string sql1 = "exec h_p_Sc_WorkBeginDotCheckBill_BeforeCloseCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Sc_WorkBeginDotCheckBill_BeforeCloseCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭失败!原因:关闭前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //关闭提交
                    if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    if (oBill.CloseBill(lngBillKey, oBill.omodel.HBillNo, "h_p_Sc_WorkBeginDotCheckBill_AfterCloseCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
@@ -6559,8 +6934,31 @@
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭前控制=========================================
                    string sql1 = "exec h_p_Sc_WorkBeginDotCheckBill_BeforeUnCloseCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Sc_WorkBeginDotCheckBill_BeforeUnCloseCtrl    ");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭失败!原因:反关闭前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反关闭提交
                    if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    if (oBill.CancelClose(lngBillKey, oBill.omodel.HBillNo, "h_p_Sc_WorkBeginDotCheckBill_AfterUnCloseCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
@@ -6727,6 +7125,45 @@
        }
        #endregion
        #region 不良品评审处理单 出站单下推查询
        [Route("Sc_ProcessMangement/Get_Sc_StationOutBill")]
        [HttpGet]
        public object Get_Sc_StationOutBill(string HID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = "select * from h_v_MES_StationOutBillList where hmainid='" + HID + "'";
                ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList");
                //添加列名
                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.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region 不良品评审处理验收单