| | |
| | | public class KanBanManagerentDAL |
| | | { |
| | | public static ToMessage mes = new ToMessage(); //定义全局返回信息对象 |
| | | public static string ErpPath = AppSetting.GetAppSetting("ErpPath"); //获取ERP配置 |
| | | |
| | | |
| | | #region[车间看板,上生产信息] |
| | | public static ToMessage WorkShopProduceTopData(string wkshopcode) |
| | |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string分割转string[] |
| | | string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string分割转string[] //存储过程名 |
| | | sql = @"select * from h_v_JLKanBan_WorkshopTop where wkshp_code in @wkshoplist"; |
| | | dynamicParams.Add("@wkshoplist", wkshoplist); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | |
| | | try |
| | | { |
| | | string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string分割转string[] |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreLeftTop"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreLeftTop"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreLeftTop"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreLeftCenter"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreLeftCenter"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreLeftCenter"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data1 = DapperHelper.selecttable(sql); |
| | | for (int i = 0; i < wkshoplist.Length; i++) |
| | | { |
| | |
| | | Dictionary<object, object> dir = new Dictionary<object, object>(); |
| | | try |
| | | { |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreRightTop"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreRightTop"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreRightTop"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreRightCenter"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreRightCenter"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreRightCenter"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | var data1 = DapperHelper.selecttable(sql); |
| | | dir.Add("RightTop", data); |
| | | dir.Add("RightBottom", data1); |
| | |
| | | Dictionary<object, object> dir = new Dictionary<object, object>(); |
| | | try |
| | | { |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreLeftBottom_Top"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreLeftBottom_Top"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreLeftBottom_Top"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreLeftBottom_Bottom"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreLeftBottom_Bottom"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreLeftBottom_Bottom"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data1 = DapperHelper.selecttable(sql); |
| | | dir.Add("BottomLeftTop", data); |
| | | dir.Add("BottomLeftBottom", data1); |
| | |
| | | Dictionary<object, object> dir = new Dictionary<object, object>(); |
| | | try |
| | | { |
| | | sql = @"select * from h_v_JLKanBan_WorkShopCompreRightBottom"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWorkShopCompreRightBottom"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WorkShopCompreRightBottom"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | dir.Add("Y", data.Rows[0]["BaseQuantity"].ToString()); |
| | | dir.Add("B", data.Rows[1]["BaseQuantity"].ToString()); |
| | |
| | | try |
| | | { |
| | | //获取仓库生产加工单待入库列表 |
| | | sql = @"select * from h_v_JLKanBan_WareHouseTopLeft order by voucherdate"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWareHouseTopLeft order by voucherdate"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WareHouseTopLeft order by voucherdate"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | mes.code = "200"; |
| | | mes.message = "查询成功!"; |
| | |
| | | try |
| | | { |
| | | //获取仓库生产加工单待入库列表 |
| | | sql = @"select * from h_v_JLKanBan_WareHouseTopBottom order by voucherdate"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWareHouseTopBottom order by voucherdate"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WareHouseTopBottom order by voucherdate"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | mes.code = "200"; |
| | | mes.message = "查询成功!"; |
| | |
| | | string sql = ""; |
| | | try |
| | | { |
| | | sql = @"select * from h_v_JLKanBan_WareHouseRightTop"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWareHouseRightTop"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WareHouseRightTop"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | mes.code = "200"; |
| | | mes.message = "查询成功!"; |
| | |
| | | string sql = ""; |
| | | try |
| | | { |
| | | sql = @"select * from h_v_JLKanBan_WareHouseRightBottom"; |
| | | switch (ErpPath) |
| | | { |
| | | case "T+": |
| | | sql = @"select * from h_v_JLKanBan_TCloundWareHouseRightBottom"; |
| | | break; |
| | | case "T8": |
| | | sql = @"select * from h_v_JLKanBan_T8WareHouseRightBottom"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | var data = DapperHelper.selecttable(sql); |
| | | mes.code = "200"; |
| | | mes.message = "查询成功!"; |