//创建机加车间日报表信息
        public ActionResult addDayBb(T_jxzztjb tjjb)
        {
            tjjb.Addtime = DateTime.Now;
            tjjb.del_f   = true;
            bool state = false;

            if (tjjb.ImgName_ID == 0)
            {
                var Imgstr_name = Request["ImgName_ID"];
                var temp        = Seb_NumberService.LoadEntities(x => x.Ttext == Imgstr_name && x.Items == 1).FirstOrDefault();
                if (temp != null)
                {
                    tjjb.ImgName_ID = temp.ID;
                }
                else
                {
                    Seb_Number sb = new Seb_Number();
                    sb.Items = 1;
                    sb.Ttext = Imgstr_name;
                    var rtmp = Seb_NumberService.AddEntity(sb);
                    tjjb.ImgName_ID = rtmp.ID;
                    state           = true;
                }
            }
            if (tjjb.ID > 0)
            {
                T_jxzztjbService.EditEntity(tjjb);
            }
            else
            {
                T_jxzztjbService.AddEntity(tjjb);
            }
            return(Json(new { ret = "ok", state = state }, JsonRequestBehavior.AllowGet));
        }
        //创建结构车间日报表信息
        public ActionResult addDayBbJG(T_jgzztjb tjjb)
        {
            tjjb.Addtime = DateTime.Now;
            tjjb.del_f   = true;
            bool state = false;
            long ImgId = 0;

            if (tjjb.ImgName_ID == 0)
            {
                var Imgstr_name = Request["ImgName_ID"];
                var temp        = Seb_NumberService.LoadEntities(x => x.Ttext == Imgstr_name && x.Items == 1).FirstOrDefault();
                if (temp != null)
                {
                    tjjb.ImgName_ID = temp.ID;
                    ImgId           = temp.ID;
                }
                else
                {
                    Seb_Number sb = new Seb_Number();
                    sb.Items = 1;
                    sb.Ttext = Imgstr_name;
                    var rtmp = Seb_NumberService.AddEntity(sb);
                    tjjb.ImgName_ID = rtmp.ID;
                    ImgId           = rtmp.ID;
                    state           = true;
                }
            }
            if (tjjb.ID > 0)
            {
                T_jgzztjbService.EditEntity(tjjb);
            }
            else
            {
                if (Request["PersonGroupYorN"] == "true")
                {
                    var personidAry = Request["GroupPersonsID"].Split(',');
                    foreach (var a in personidAry)
                    {
                        if (a.Trim().Length > 0)
                        {
                            tjjb.UPslt_ID = Convert.ToInt64(a);
                            T_jgzztjbService.AddEntity(tjjb);
                        }
                        else
                        {
                            continue;
                        }
                    }
                }
                else
                {
                    T_jgzztjbService.AddEntity(tjjb);
                }
            }
            return(Json(new { ret = "ok", state = state }, JsonRequestBehavior.AllowGet));
        }