public static string GetKanabakari(string constructionCode, int siyoCode)
        {
            string code = BasicSpecificationDetail.GetKanabakariCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(KANABAKARI_ERROR);
            }

            if (code == Kanabakari._265 || code == Kanabakari._265_KUCHI)
            {
                return("265");
            }
            else if (code == Kanabakari._240 || code == Kanabakari._240_PLUS || code == Kanabakari._240_PLUS_KUCHI || code == Kanabakari._240_KUCHI ||
                     code == Kanabakari._240_PLUS_T || code == Kanabakari._240_PLUS_T_SHIKAKU)
            {
                return("240");
            }
            else if (code == Kanabakari._260 || code == Kanabakari._260_PLUS || code == Kanabakari._260_PLUS_KUCHI)
            {
                return("260");
            }
            else
            {
                throw new ApplicationException(KANABAKARI_UNSUPPORT_ERROR);
            }
        }
Пример #2
0
        private static List <HouseTypeGroupStandardItem> Get(string constructionCode, int houseTypeGroupId, string planNo)
        {
            var items    = new List <HouseTypeGroupStandardItem>();
            var siyoCode = tbl_siyo_boss.GetSiyoCode(constructionCode, planNo);

            if (IsUsingNew(constructionCode, siyoCode))
            {
                var newItems = HouseTypeGroupStandardItems_New.Get(houseTypeGroupId);
                newItems.ForEach(p => items.Add(Convert(p)));
            }
            else
            {
                var oldItems = HouseTypeGroupStandardItems_Old.Get(houseTypeGroupId);
                oldItems.ForEach(p => items.Add(Convert(p)));

                var isHotaru0 = BasicSpecificationDetail.IsISmartICubeISmileIPaletteIHead4(constructionCode, siyoCode);

                if (isHotaru0)
                {
                    var hotaruItems = items.FindAll(p => p.ItemName == "House_ƒzƒ^ƒ‹");
                    hotaruItems.ForEach(p => p.Quantity = 0);
                }
            }

            return(items);
        }
Пример #3
0
        private static bool IsUsingNew(string constructionCode, int siyoCode)
        {
            if (BasicSpecificationDetail.IsIPalette(constructionCode, siyoCode))
            {
                return(false);
            }

            return(Construction.IsNewStandardQtyRule(constructionCode));
        }
        public static bool IsIPalette(string constructionCode, int siyoCode)
        {
            var code = BasicSpecificationDetail.GetHouseTypeCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(HOUSE_TYPE_ERROR);
            }

            return(code == HouseType.IPALETTE);
        }
        public static bool IsIHead(string constructionCode, int siyoCode)
        {
            var code = BasicSpecificationDetail.GetHouseTypeCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(HOUSE_TYPE_ERROR);
            }

            return
                (code == HouseType.IHEAD20 ||
                 code == HouseType.IHEAD30 ||
                 code == HouseType.IHEAD40);
        }
        //SpecificationDetailCodeまで見て何かを判定したいメソッド
        //このへんやりすぎかも・・・

        public static bool IsICubeOrISmileOrIPalette(string constructionCode, int siyoCode)
        {
            //i-smileはi-cubeと仕様がほぼ一緒なので、まとめて判断しちゃおう

            var code = BasicSpecificationDetail.GetHouseTypeCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(HOUSE_TYPE_ERROR);
            }

            return(code == HouseType.ICUBE ||
                   code == HouseType.ICUBE2 ||
                   code == HouseType.ISMILE ||
                   code == HouseType.IPALETTE);
        }
        //GlassWoolコメントを記述するフラグ
        public static bool CanDrawGlassWool(string constructionCode, int siyoCode)
        {
            var code = BasicSpecificationDetail.GetHouseTypeCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(HOUSE_TYPE_ERROR);
            }

            if (code == HouseType.ISMART ||
                code == HouseType.ISMART2 ||
                code == HouseType.ICUBE ||
                code == HouseType.ICUBE2 ||
                code == HouseType.ISMILE ||
                code == HouseType.IPALETTE)
            {
                return(true);
            }

            var shoureiCode = BasicSpecificationDetail.Get(constructionCode, siyoCode, "0123");

            if (shoureiCode == null)
            {
                return(false);
            }

            if (shoureiCode == "0010")
            {
                return(true);
            }

            var boukaCode = BasicSpecificationDetail.Get(constructionCode, siyoCode, "0102");

            if (boukaCode == null)
            {
                return(false);
            }

            //省令準耐火がなしか未定で、準耐火仕様が準耐火だったらTrue
            if ((shoureiCode == "0020" || shoureiCode == "9999") && boukaCode == "0030")
            {
                return(true);
            }

            return(false);
        }
        public static bool IsISmartICubeISmileIPaletteIHead4(string constructionCode, int siyoCode)
        {
            var code = BasicSpecificationDetail.GetHouseTypeCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(HOUSE_TYPE_ERROR);
            }
            return
                (code == HouseType.IHEAD40 ||
                 code == HouseType.ICUBE ||
                 code == HouseType.ICUBE2 ||
                 code == HouseType.ISMILE ||
                 code == HouseType.ISMART ||
                 code == HouseType.ISMART2 ||
                 code == HouseType.IPALETTE);
        }
Пример #9
0
        public static List <Setting> Get(string constructionCode, int siyoCode)
        {
            int houseType;

            if (BasicSpecificationDetail.IsISmart(constructionCode, siyoCode)) //頻繁に呼ぶわけじゃないし、見やすさ優先で。
            {
                houseType = 4;
            }
            else if (BasicSpecificationDetail.IsICubeOrISmileOrIPalette(constructionCode, siyoCode))
            {
                houseType = 3;
            }
            else if (BasicSpecificationDetail.IsIHead(constructionCode, siyoCode))
            {
                var kanabakari = BasicSpecificationDetail.GetKanabakari(constructionCode, siyoCode);
                if (kanabakari == "265")
                {
                    houseType = 1;
                }
                else if (kanabakari == "240")
                {
                    houseType = 2;
                }
                else if (kanabakari == "260")
                {
                    houseType = 5;
                }
                else
                {
                    throw new ApplicationException(KANABAKARI_ERROR);
                }
            }
            else
            {
                houseType = 2; //一般工法はI-HEAD(240)と同等に扱う
            }
            var db  = Setting.GetDatabase();
            var sql = @"
                SELECT * FROM Settings
                WHERE
                    HouseTypeId IS NULL OR
                    HouseTypeId = " + houseType;

            return(db.ExecuteQuery <Setting>(sql));
        }
        public static bool IsKanabakari240Plus(string constructionCode, int siyoCode)
        {
            string code = BasicSpecificationDetail.GetKanabakariCode(constructionCode, siyoCode);

            if (code == null)
            {
                throw new ApplicationException(KANABAKARI_ERROR);
            }

            if (code == Kanabakari._240_PLUS || code == Kanabakari._240_PLUS_KUCHI || code == Kanabakari._240_PLUS_T || code == Kanabakari._240_PLUS_T_SHIKAKU)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        //とりあえずこれ使え

        /// <summary>
        /// <para>加工依頼前はSiyoDataBrokerを参照する</para>
        /// <para>加工依頼後はBasicSpecificationDetailsを参照する</para>
        /// </summary>
        private static string Get(string constructionCode, int siyoCode, string specCode)
        {
            if (ConstructionSchedule.IsBeforeProcessRequest(constructionCode))
            {
                var kihon = tbl_siyo_kihon.Get(constructionCode, siyoCode, specCode);
                if (kihon == null)
                {
                    return(null);
                }

                return(kihon.siyoDetailCd);
            }
            else
            {
                var detail = BasicSpecificationDetail.Get(constructionCode, specCode);
                if (detail == null)
                {
                    return(null);
                }

                return(detail.SpecificationDetailCode);
            }
        }
 public static string GetMizumawariSiyoCode(string constructionCode, int siyoCode)
 {
     return(BasicSpecificationDetail.Get(constructionCode, siyoCode, "0112"));
 }
 public static string GetZehPlanCode(string constructionCode, int siyoCode)
 {
     return(BasicSpecificationDetail.Get(constructionCode, siyoCode, "0133"));
 }
 public static string GetHouseTypeCode(string constructionCode, int siyoCode)
 {
     return(BasicSpecificationDetail.Get(constructionCode, siyoCode, "0111"));
 }
 public static string GetInsulationRegionCode(string constructionCode, int siyoCode)
 {
     return(BasicSpecificationDetail.Get(constructionCode, siyoCode, "0108"));
 }
 public static string GetKanabakariCode(string constructionCode, int siyoCode)
 {
     return(BasicSpecificationDetail.Get(constructionCode, siyoCode, "0070"));
 }