1
duhe
5 天以前 41035163614a1a4a6a344760d7023f452ed24417
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -23,6 +23,7 @@
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
        public WebS.WebService1 oWebs = new WebS.WebService1();
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
@@ -521,7 +522,7 @@
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-2-015]数量控制," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -2649,6 +2650,7 @@
        [HttpGet]
        public object set_ShowBillJudge(string HBillNo)
        {
            string sReturn = "";
            try
            {
                ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_DelCtrl  '" + HBillNo + "'", "h_p_MES_StationOutBill_DelCtrl");
@@ -2664,7 +2666,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-038]" + Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
                    objJsonResult.Message = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -2679,11 +2681,34 @@
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "[0000-1-038]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
@@ -4320,5 +4345,49 @@
            }
        }
        #endregion
        #region 工序汇报单同步至金蝶云
        /// <summary>
        /// 工序汇报单同步至金蝶云
        /// </summary>
        /// <returns></returns>
        [Route("Cj_StationOutBill/set_SaveStationOutBill_CLD_Json")]
        [HttpGet]
        public object set_SaveStationOutBill_CLD_Json(Int64 HInterID, string HBillNo, string HMaker)
        {
            try
            {
                if (oWebs.set_SaveStationOutBill_CLD(HInterID, HBillNo, HMaker, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "同步至金蝶云失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}