yangle
2022-11-03 7a5552edd1e2bf2bfd55e60808a1ae103e1e34fa
WebAPI/Controllers/LMESController.cs
@@ -174,13 +174,13 @@
        /// <returns></returns>
        [Route("LEMS/MES_Sc_ProcessExchangeIssue")]
        [HttpGet]
        public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HEntryId)
        public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HSourceSub1ID, string HSourceSub2ID, string HSourceSub3ID, string HEntryId)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn($"exec REALESE_Sc_ProcessExchangeIssue '{HGroupID}','{HSourceID}','{HEntryId}' ", "REALESE_Sc_ProcessExchangeIssue");
                ds = oCN.RunProcReturn($"exec REALESE_Sc_ProcessExchangeIssue '{HGroupID}','{HSourceID}','{HSourceSub1ID}','{HSourceSub2ID}','{HSourceSub3ID}','{HEntryId}' ", "REALESE_Sc_ProcessExchangeIssue");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
@@ -196,7 +196,42 @@
                return objJsonResult;
            }
        }
        /// <summary>
        /// 工序流转卡指派日期
        /// </summary>
        /// <returns></returns>
        [Route("LEMS/MES_Sc_ProcessExchangePlanDate")]
        [HttpGet]
        public object MES_Sc_ProcessExchangePlanDate(string HPlanBeginDate, string HPlanEndDate, string HEntryId)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"
update Sc_ProcessExchangeBillSub set
HPlanBeginDate = '{0}',
HPlanEndDate = '{1}'
where cast(HInterID as varchar(20))  +'-'+  cast(HEntryID as varchar(20)) in
(
 select * from fn_Split('{2}',',')
)", HPlanBeginDate, HPlanEndDate, HEntryId);
                oCN.RunProc(sql);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "异常!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 工序流转卡反下达
        /// </summary>