1
zrg
2025-10-17 82de67c48acaf472a6f8bb8b53f3f4feec9f5e54
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -52,7 +52,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "开工单无编辑权限!";
                        objJsonResult.Message = "[3790-2-003]开工单无编辑权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -63,7 +63,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "进站单无编辑权限!";
                        objJsonResult.Message = "[3790-2-003]进站单无编辑权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -81,7 +81,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "错误的流转卡内码!";
                    objJsonResult.Message = "[3790-2-004]错误的流转卡内码!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -90,7 +90,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "流水号没有选择!请输入流水号后回车!";
                    objJsonResult.Message = "[3790-2-002]流水号没有选择!请输入流水号后回车!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -99,7 +99,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "流水号没有选择!";
                    objJsonResult.Message = "[3790-2-005]流水号没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -108,7 +108,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "流转卡号没有选择!";
                    objJsonResult.Message = "[3790-2-006]流转卡号没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -155,7 +155,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "产品没有选择!";
                    objJsonResult.Message = "[0000-2-007]产品没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -169,7 +169,7 @@
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "生产资源没有选择!";
                            objJsonResult.Message = "[0000-2-006]生产资源没有选择!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -180,7 +180,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "工作中心没有选择!";
                    objJsonResult.Message = "[0000-2-010]工作中心没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -188,7 +188,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "当前工序没有选择!";
                    objJsonResult.Message = "[0000-2-011]当前工序没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -196,7 +196,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "接收个数不能为0!";
                    objJsonResult.Message = "[3790-2-007]接收个数不能为0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -206,7 +206,7 @@
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "判断首道工序失败,不允许保存!";
                    objJsonResult.Message = "[3790-2-008]判断首道工序失败,不允许保存!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -218,7 +218,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存前判断失败!";
                    objJsonResult.Message = "[0000-2-012]保存前判断失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -226,7 +226,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.Message = "[0000-1-051]保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -242,7 +242,7 @@
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据号重复!";
                        objJsonResult.Message = "[0000-2-013]单据号重复!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -342,7 +342,7 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作类型无效!";
                    objJsonResult.Message = "[操作类型无效]操作类型无效!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -353,7 +353,7 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "判断数量失败!";
                    objJsonResult.Message = "[0000-2-015]判断数量失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -362,19 +362,38 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "判断数量失败!";
                    objJsonResult.Message = "[0000-2-015]判断数量失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
                if (oSystemParameter.ShowBill(ref sReturn) == true)
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                    if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") //系统参数  判断客户
                    {
                        if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
                        {
                            oCN.RollBack();
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message =DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
                        {
                            oCN.RollBack();
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "[0000-2-015]" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",1");
                //判断是否是 首道工序
                ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a  " +
@@ -396,7 +415,7 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存后控制判断失败!";
                    objJsonResult.Message = "[0000-2-016]保存后控制判断失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                   
@@ -406,7 +425,7 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.Message = "[0000-1-051]保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -447,7 +466,7 @@
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "新增单据成功!";
                objJsonResult.Message = "[0000-1-050]新增单据成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
@@ -456,7 +475,7 @@
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-051]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -544,7 +563,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条形码不能为空!";
                    objJsonResult.Message = "[0000-2-019]条形码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -557,13 +576,13 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "工序号错误或者当前工序号不允许进站,请重新输入!";
                    objJsonResult.Message = "[3790-2-013]工序号错误或者当前工序号不允许进站,请重新输入!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.Message = "[0000-1-037]Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
@@ -571,7 +590,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -593,30 +612,30 @@
                    oCN.RunProc("exec h_p_MES_StationInBillSubBindSource_Insert " + HProcExchInterID.ToString() + " , " + HProcExchEntryID.ToString() + "," + HInterID.ToString() + " ");
                    ds = oCN.RunProcReturn($@"select * from
(
 select
a.HICMOInterID,a.HICMOEntryID,b.HProcID
from Sc_ProcessExchangeBillMain a with(nolock)
inner join Sc_ProcessExchangeBillSub b with(nolock)  on a.HInterID=b.HinterID
Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
) a
inner join (
select a.HICMOInterID,a.HICMOEntryID,isnull(c.HItemID,0) HProcID
from Sc_PPBomBillMain a with(nolock)
inner join Sc_PPBomBillSub b with(nolock)  on a.HInterID=b.HInterID
left join Gy_Process c on b.HProcName = c.HName
)b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain");
                                            (
                                             select
                                            a.HICMOInterID,a.HICMOEntryID,b.HProcID
                                            from Sc_ProcessExchangeBillMain a with(nolock)
                                            inner join Sc_ProcessExchangeBillSub b with(nolock)  on a.HInterID=b.HinterID
                                            Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
                                            ) a
                                            inner join (
                                            select a.HICMOInterID,a.HICMOEntryID,isnull(c.HItemID,0) HProcID
                                            from Sc_PPBomBillMain a with(nolock)
                                            inner join Sc_PPBomBillSub b with(nolock)  on a.HInterID=b.HInterID
                                            left join Gy_Process c on b.HProcName = c.HName
                                            )b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain");
                    if (ds.Tables[0].Rows.Count > 0) {
                        objJsonResult.Message = "需要绑定配件!";
                        objJsonResult.Message = "[0000-2-026]需要绑定配件!";
                    }
                    else
                    {
                        objJsonResult.Message = "不需要绑定配件!";
                        objJsonResult.Message = "[0000-2-027]不需要绑定配件!";
                    }
                }
                else {
                    objJsonResult.Message = "不需要绑定配件!";
                    objJsonResult.Message = "[0000-2-027]不需要绑定配件!";
                }
                objJsonResult.code = "1";
@@ -628,7 +647,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -694,13 +713,13 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到职员信息!";
                    objJsonResult.Message = "[0000-2-028]未查询到职员信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.Message = "[0000-1-037]Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
@@ -708,7 +727,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -832,10 +851,10 @@
        }
        #endregion
        #region 返回工序进站接收单列表-分页
        [Route("Cj_StationInBill/get_Display_ByPage")]
        #region 返回工序进站接收单列表
        [Route("Cj_StationInBill/get_Display_Eng")]
        [HttpGet]
        public object get_Display_ByPage(string sWhere, string user, string Organization, int page, int size, string HBillSubType)
        public object get_Display_Eng(string sWhere, string user, string HBillSubType)
        {
            try
            {
@@ -866,6 +885,89 @@
                    }
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_MES_StationInBillList_Eng order by hmainid desc", "h_v_MES_StationInBillList_Eng");
                }
                else
                {
                    string sql1 = "select * from h_v_MES_StationInBillList_Eng where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList_Eng");
                }
                //添加列名
                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列对象的列名
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 返回工序进站接收单列表-分页
        [Route("Cj_StationInBill/get_Display_ByPage")]
        [HttpGet]
        public object get_Display_ByPage(string sWhere, string user, string Organization, int page, int size, string HBillSubType)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (HBillSubType == "SUB")
                {
                    //判断是否有查询权限
                    if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Sub_Query", 1, false, user))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "[3790-1-004]开工单无查询权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    //判断是否有查询权限
                    if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Query", 1, false, user))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "[3790-1-004]进站单无查询权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
@@ -887,7 +989,7 @@
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.Message = "[0000-1-037]Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
@@ -896,7 +998,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.Message = "[0000-1-010]查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -908,14 +1010,15 @@
        [HttpGet]
        public object set_ShowBillJudge(string HBillNo)
        {
            string sReturn = "";
            try
            {
            {
                ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_DelCtrl  '" + HBillNo + "'", "h_p_MES_StationInBill_DelCtrl");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "判断关联失败!";
                    objJsonResult.Message = "[0000-2-018]判断关联失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -931,18 +1034,41 @@
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.Message = "[0000-1-037]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;
                if (oSystemParameter.ShowBill(ref sReturn) == true)
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") //系统参数  判断客户
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
        }
        #endregion
@@ -997,7 +1123,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "开工单审核失败!无权限!";
                        objJsonResult.Message = "[3790-1-006]开工单审核失败!无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1008,7 +1134,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "进站单审核失败!无权限!";
                        objJsonResult.Message = "[3790-1-006]进站单审核失败!无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1018,7 +1144,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据ID为0,不能审核!";
                    objJsonResult.Message = "[0000-1-009]单据ID为0,不能审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1030,7 +1156,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能再次审核";
                        objJsonResult.Message = "[0000-1-023]单据已审核!不能再次审核";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1039,7 +1165,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.Message = "[0000-1-045]单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1052,7 +1178,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                    objJsonResult.Message = "[0000-1-024]审核失败!原因:审核前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
@@ -1061,7 +1187,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.Message = "[0000-1-025]审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1071,7 +1197,7 @@
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功!";
                    objJsonResult.Message = "[0000-1-029]审核成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1079,7 +1205,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.Message = "[0000-1-025]审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1089,7 +1215,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败!" + e.ToString();
                objJsonResult.Message = "[0000-1-025]审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -1168,7 +1294,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "开工单反审核失败!无权限!";
                        objJsonResult.Message = "[3790-1-007]开工单反审核失败!无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1180,7 +1306,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "进站单反审核失败!无权限!";
                        objJsonResult.Message = "[3790-1-007]进站单反审核失败!无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1192,7 +1318,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据ID为0,不能反审核!";
                    objJsonResult.Message = "[0000-1-009]单据ID为0,不能反审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1204,7 +1330,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不需要反审核!";
                        objJsonResult.Message = "[0000-1-018]单据未审核!不需要反审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1213,7 +1339,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.Message = "[0000-1-005]单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1226,7 +1352,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                    objJsonResult.Message = "[0000-1-027]反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
@@ -1235,7 +1361,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.Message = "[0000-1-027]反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1245,7 +1371,7 @@
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功!";
                    objJsonResult.Message = "[0000-1-019]反审核成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1253,7 +1379,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.Message = "[0000-1-028]反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1262,7 +1388,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "反审核失败!" + e.ToString();
                objJsonResult.Message = "[0000-1-028]反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -1369,7 +1495,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "开工单无权限关闭!";
                        objJsonResult.Message = "[3790-1-008]开工单无权限关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1380,7 +1506,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "进站单无权限关闭!";
                        objJsonResult.Message = "[3790-1-008]进站单无权限关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1391,7 +1517,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.Message = "[0000-1-009]HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1413,7 +1539,7 @@
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不需要再关闭!";
                            objJsonResult.Message = "[0000-1-033]单据已关闭!不需要再关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -1447,7 +1573,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.Message = "[0000-1-034]关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1464,7 +1590,7 @@
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已反关闭!不需要再反关闭!";
                            objJsonResult.Message = "[0000-1-035]单据已反关闭!不需要再反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -1498,7 +1624,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.Message = "[0000-1-036]反关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1508,7 +1634,7 @@
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "执行成功!";
                objJsonResult.Message = "[0000-1-037]执行成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
@@ -1517,7 +1643,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "执行失败!" + e.ToString();
                objJsonResult.Message = "[0000-1-037]执行失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -1585,7 +1711,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "开工单无权限!";
                        objJsonResult.Message = "[3790-1-005]开工单无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1596,7 +1722,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "进站接收单无权限!";
                        objJsonResult.Message = "[3790-1-005]进站接收单无权限!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
@@ -1614,7 +1740,7 @@
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "只能删除本人的单据!";
                                objJsonResult.Message = "[0000-1-011]只能删除本人的单据!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
@@ -1987,7 +2113,7 @@
                File.Delete(fileurl);      //删除指定文件
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.Message = "[0000-1-008]删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -1995,7 +2121,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-007]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }