jhz
2023-03-21 d84518084c3027a684333929ad80b51a0c32845b
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -143,7 +143,7 @@
                string HBillNo = mainList[0].HBillNo;//递入type得到的单据号
                DateTime HDate = mainList[0].HDate;//日期
                int HYear = DateTime.Now.Year;
                double HPeriod = 1;
                double HPeriod = DateTime.Now.Month;
                string HRemark = mainList[0].HRemark;//备注
                string HMaker = mainList[0].HMaker;//制单人
                long HMaterID = mainList[0].HMaterID;//产品ID
@@ -231,24 +231,24 @@
                    return objJsonResult;
                }
                //string sErrMsg = "";
                //if (oSystemParameter.ShowBill(ref sErrMsg))
                //{
                //    if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺")
                //    {
                //        if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
                //        {
                //            //设置转工序
                //            oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                //        }
                //    }
                //}
                if (IsProNo == 1 && OperationType == 1)
                string sErrMsg = "";
                if (oSystemParameter.ShowBill(ref sErrMsg))
                {
                    //设置转工序
                    oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                    if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺")
                    {
                        if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
                        {
                            //设置转工序
                            oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                        }
                    }
                    else if (IsProNo == 1 && OperationType == 1)
                    {
                        //设置转工序
                        oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                    }
                }
                //是否勾选默认工艺路线
                if (HStandard)
@@ -354,6 +354,46 @@
        #endregion
        #region 工艺路线列表 查询系统参数
        /// <summary>
        /// 返回工艺路线列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("LEMS/MES_XT_List")]
        [HttpGet]
        public object MES_XT_List(string sWhere)
        {
            try
            {
                string flag = "flase";
                string sErrMsg = "";
                if (oSystemParameter.ShowBill(ref sErrMsg))
                {
                    if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y")
                    {
                        flag = "true";
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                objJsonResult.data = flag;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 工艺路线 文件上传
        [Route("Gy_RoutingBill/Gy_RoutingBillimport")]
        [HttpPost]