yl
2022-09-06 fc4894cace1eb65732b5f75767ce5657bc4d586e
看板滚动公告查询接口开发
已修改3个文件
54 ■■■■■ 文件已修改
VueWebApi/Controllers/KanBanManagerentController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/BLL/KanBanManagerentBLL.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Controllers/KanBanManagerentController.cs
@@ -193,5 +193,22 @@
            return TJson.toJson(mes);
        }
        #endregion
        #region[车间看板公告]
        /// <summary>
        /// 车间看板公告
        /// </summary>
        /// <param name="shopcode">车间编码</param>
        /// <returns></returns>
        [Route(template: "WkspReportNotice")]
        [HttpPost]
        public HttpResponseMessage WkspReportNotice(string shopcode)
        {
            mes = KanBanManagerentBLL.WkspReportNotice(shopcode);
            return TJson.toJson(mes);
        }
        #endregion
    }
}
VueWebApi/DLL/BLL/KanBanManagerentBLL.cs
@@ -97,5 +97,13 @@
            return KanBanManagerentDAL.WareHouseRightBottomData();
        }
        #endregion
        #region[车间看板公告]
        public static ToMessage WkspReportNotice(string shopcode)
        {
            return KanBanManagerentDAL.WkspReportNotice(shopcode);
        }
        #endregion
    }
}
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -233,7 +233,6 @@
                        inner join TK_Wrk_Man M on A.wo_code=M.wo_code
                        where DateDiff(dd,A.lm_date,getdate())<=7 and M.wkshp_code in @shopcode
                        group by B.name order by cont desc";
                dynamicParams.Add("@shopcode", shopcode);
                var data = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
                mes.code = "200";
                mes.Message = "查询成功!";
@@ -418,5 +417,33 @@
            return mes;
        }
        #endregion
        #region[车间看板公告]
        public static ToMessage WkspReportNotice(string shopcode)
        {
            string sql = "";
            var dynamicParams = new DynamicParameters();
            try
            {
                string[] selects = Array.ConvertAll<string, string>(shopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string分割转string[]
                //获取车间公告信息
                sql = @"select contents  from TSystemAnnouncement
                       where wksp_code in @shopcode";
                var data = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
                mes.code = "200";
                mes.Message = "查询成功!";
                mes.data = data;
            }
            catch (Exception e)
            {
                mes.code = "300";
                mes.count = 0;
                mes.Message = e.Message;
                mes.data = null;
            }
            return mes;
        }
        #endregion
    }
}