username@email.com
2023-12-14 78b0883ddf8329fa8693d78b01e1e0a7f5b6972e
班次分组和横幅ID
7个文件已修改
159 ■■■■■ 已修改文件
zhengcaioa/DTO/OrderBanciDTO.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IOrderBanciService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/OrderBanci.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/OrderBanciService.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/OrderBanci/Edit.cshtml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/OrderBanciDTO.cs
@@ -27,6 +27,9 @@
        public int? Hang { get; set; }
        public int? Lie { get; set; }
        public string Fenzu { get; set; }
        public int? BannerId { get; set; }
        public string Shangxiawu { get; set; }
        public string ShangxiawuName { get; set; }
@@ -76,4 +79,15 @@
        public string ClassID { get; set; }
    }
    public class BanciFanhui
    {
        public string name { get; set; }
        public string value { get; set; }
    }
}
zhengcaioa/IServices/IOrderBanciService.cs
@@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using zhengcaioa.Models;
namespace IServices
{
@@ -28,5 +28,9 @@
        List<OrderBanciZuoweiDTO> GetOrderBanciZuoweiList(string banciId);
        List<OrderBanci> GetDangQianBanciList(string id);
    }
}
zhengcaioa/Model/OrderBanci.cs
@@ -21,5 +21,8 @@
        public int? Renshu { get; set; }
        public int? Hang { get; set; }
        public int? Lie { get; set; }
        public string Fenzu { get; set; }
        public int? BannerId { get; set; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -4840,6 +4840,13 @@
                entity.Property(e => e.Lie)
                  .HasColumnName("lie");
                entity.Property(e => e.Fenzu)
               .HasColumnName("Fenzu");
                entity.Property(e => e.BannerId)
                   .HasMaxLength(50)
                   .HasColumnName("BannerId");
                entity.Property(e => e.Shijian)
                    .HasColumnType("datetime")
                    .HasColumnName("shijian");
zhengcaioa/Services/OrderBanciService.cs
@@ -55,6 +55,9 @@
                    updateproject.Renshu = entity.Renshu;
                    updateproject.Hang = entity.Hang;
                    updateproject.Lie = entity.Lie;
                    updateproject.Fenzu = entity.Fenzu;
                    updateproject.BannerId = entity.BannerId;
                }
                if(entity.Hang.HasValue && entity.Lie.HasValue)
                {
@@ -230,6 +233,10 @@
                             Lie = a.Lie ?? 0,
                             Fenzu = a.Fenzu,
                             BannerId = a.BannerId??0,
                             Creater = a.Creater,
                             Createtime = a.Createtime,
@@ -365,6 +372,9 @@
                             Hang = a.Hang ?? 0,
                             Lie = a.Lie ?? 0,
                             Fenzu = a.Fenzu,
                             BannerId = a.BannerId ?? 0,
                             Creater = a.Creater,
                             Createtime = a.Createtime,
@@ -451,5 +461,40 @@
            return list;
        }
        public List<OrderBanci> GetDangQianBanciList(string id)
        {
            List<OrderBanci> list = new List<OrderBanci>();
            try
            {
                var orderBanci = _context.OrderBancis.Find(id);
                if (orderBanci != null)
                {
                    list = _context.OrderBancis.Where(x => x.RecStatus == "A"  &&  x.Fenzu == orderBanci.Fenzu).OrderBy(x => x.Shijian).ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return list;
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs
@@ -710,5 +710,49 @@
            }
            return new JsonResult(returnMsg);
        }
        //获取当前的培训
        public IActionResult GetDangQianBanciList(string id)
        {
            ReturnMsg<List<BanciFanhui>> returnMsg = new ReturnMsg<List<BanciFanhui>>();
            returnMsg.code = 2;
            try
            {
                List<OrderBanci> orderBanciDTOs = _orderBanciService.GetDangQianBanciList(id);
                List<BanciFanhui> banciFanhuis = new List<BanciFanhui>();
                if (orderBanciDTOs != null && orderBanciDTOs.Count > 0)
                {
                    foreach (var orderBanciDTO in orderBanciDTOs)
                    {
                        BanciFanhui banciFanhui = new BanciFanhui();
                        banciFanhui.name = orderBanciDTO.Shijian.HasValue ? orderBanciDTO.Shijian.Value.ToString("yyyy-MM-dd") : "";
                        banciFanhui.value = orderBanciDTO.Id;
                        banciFanhuis.Add(banciFanhui);
                    }
                }
                returnMsg.code = 1;
                returnMsg.count = orderBanciDTOs.Count;
                returnMsg.returnObj = banciFanhuis;
            }
            catch (Exception ex)
            {
                returnMsg.code = 2;
                returnMsg.error = "没有获取到token";
                returnMsg.count = 0;
            }
            return new JsonResult(returnMsg);
        }
    }
}
zhengcaioa/zhengcaioa/Views/OrderBanci/Edit.cshtml
@@ -213,6 +213,46 @@
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">分组</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <input class="form-control" label="人数" name="Fenzu" id="Fenzu" labtype="txt" addvisible="true" maxlength="50" editvisible="true" reg="" ismust="true" type="text" value="@Model.Fenzu" />
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">横幅ID</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <input class="form-control" label="人数" name="BannerId" id="BannerId" labtype="txt" addvisible="true" maxlength="10" editvisible="true" reg="" ismust="true" type="text" value="@Model.BannerId" oninput="if(value.length>8)value=value.slice(0,10)" onkeyup="value=value.replace(/[^\d]/g,'')">
                                    </div>
                                </div>