yangle
2022-07-27 ac5677185ebfa2752af6f013e5fb4b417e48f4bc
销售订单 动态列
齐套分析明细列
3个文件已修改
94 ■■■■ 已修改文件
WebAPI/Controllers/SCGL/日计划管理/JIT_CompleteController..cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_CompleteController..cs
@@ -25,11 +25,16 @@
        /// <returns></returns>
        [Route("JIT_Complete/JIT_CompleteDetailList")]
        [HttpGet]
        public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID)
        public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID,string HMainICMOInterID,string HICMOInterID)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where ä¸»ç”Ÿäº§è®¢å•子内码 = '" + HMainICMOEntryID + "' " + sWhere + "  order by æ—¥è®¡åˆ’日期,物料ID  desc ", "h_v_JIT_MOMaterReadysBill");
                string sql = "";
                if (HMainICMOEntryID != "-1" && HMainICMOInterID != "-1" && HICMOInterID != "-1")
                {
                    sql = "and ä¸»ç”Ÿäº§è®¢å•子内码 = '" + HMainICMOEntryID + "' and ä¸»ç”Ÿäº§è®¢å•主内码='" + HMainICMOInterID + "' and æ—¥è®¡åˆ’订单主内码='" + HICMOInterID + "'";
                }
                ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where 1=1 " +sql + sWhere + "  order by æ—¥è®¡åˆ’日期,物料ID  desc ", "h_v_JIT_MOMaterReadysBill");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -643,7 +643,6 @@
        {
            try
            {
                oCN.BeginTran();
                Stopwatch sw = new Stopwatch();
                omdelMian = JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(sWhere);
                string sql = $"exec JIT_qtfx {omdelMian.HProdORGID},{omdelMian.HWorkShopID},'{user}' ";
@@ -653,7 +652,14 @@
                DataTable resulTable = ds.Tables[0];
                if (resulTable.Rows[0][0].ToString().Contains("失败"))
                {
                    return resulTable.Rows[0][0].ToString();
                    //释放齐套操作 é¿å…å¤šäººåŒæ—¶è¿›è¡Œé½å¥—分析
                    oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 ");
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = resulTable.Rows[0][0].ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
@@ -664,7 +670,14 @@
                string fDayPlanFEntryids = string.Empty;
                if (BomList.Count == 0)
                {
                    return "没有需要进行齐套分析的数据";
                    //释放齐套操作 é¿å…å¤šäººåŒæ—¶è¿›è¡Œé½å¥—分析
                    oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 ");
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "没有需要进行齐套分析的数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
@@ -1045,8 +1058,6 @@
                sw.Stop();//结束计时
                LogService.Write("齐套分析运行总时长:" + sw.Elapsed);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "操作成功";
@@ -1055,7 +1066,6 @@
            }
            catch (Exception e)
            {
                oCN.RollBack();
                LogService.Write("操作失败:" + e.Message.ToString());
                objJsonResult.code = "0";
                objJsonResult.count = 0;
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -90,22 +91,60 @@
                    ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// è¿”回销售订单动态列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Xs_SeOrderBill/DyColList")]
        [HttpGet]
        public object DyColList(string sWhere, string user)
        {
            try
            {
                //判断查询权限
                if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_IF_SeOrderBillList");
                List<object> listCol = new List<object>();
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    listCol.Add(JsonConvert.DeserializeObject(str));
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = listCol;
                return objJsonResult;
            }
            catch (Exception e)
            {