Exemplo n.º 1
0
 /// <summary>
 /// 檢查超商代收項目
 /// </summary>
 /// <param name="payEndDate"></param>
 /// <param name="customer"></param>
 /// <returns></returns>
 private static void CheckCollectionTypeId(SysMessageLog message, ApplicationDbContext dataAccess, BillModel bill)
 {
     if (bill.BizCustomer.MarketEnable)
     {
         if (bill.CollectionTypeId.IsNullOrEmpty())
         {
             message.AddCustErrorMessage(MessageCode.Code0001, ResxManage.GetDescription <BillModel>(p => p.CollectionTypeId));
         }
         else
         {
             if (!bill.BizCustomer.CollectionTypeIds.Split(',').Contains(bill.CollectionTypeId))
             {
                 message.AddCustErrorMessage(MessageCode.Code1015, bill.CollectionTypeId);
             }
             else
             {
                 CollectionTypeDetailModel colDet = dataAccess.Set <CollectionTypeDetailModel>().FirstOrDefault(p => p.CollectionTypeId.Equals(bill.CollectionTypeId) && p.SRange <= bill.PayAmount && p.ERange >= bill.PayAmount);
                 if (null == colDet)
                 {
                     message.AddCustErrorMessage(MessageCode.Code1016, bill.CollectionTypeId);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 檢查繳費截止日期是否未填
 /// </summary>
 /// <param name="payEndDate"></param>
 /// <param name="customer"></param>
 /// <returns></returns>
 private static void CheckPayEndDate(SysMessageLog message, BillModel bill)
 {
     if ((bill.BizCustomer.MarketEnable || bill.BizCustomer.PostEnable) && (bill.PayEndDate == null || bill.PayEndDate.Equals(DateTime.MinValue)))
     {
         message.AddCustErrorMessage(MessageCode.Code0001, ResxManage.GetDescription <BillModel>(p => p.PayEndDate));
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// 匯款檔
        /// </summary>
        public static List <RemitInfoModel> RemitInfoData(SysMessageLog Message)
        {
            List <RemitInfoModel> rts = new List <RemitInfoModel>()
            {
                new RemitInfoModel()
                {
                    RemitDate = "20190910", RemitTime = "145833", Channel = "03", CollectionType = "6V1", Amount = "90000", BatchNo = "03030", Empty = ""
                },
                //new RemitInfoModel() { RemitDate="", RemitTime="", Channel="", CollectionType="", Amount="", BatchNo=""},
                //new RemitInfoModel() { RemitDate="", RemitTime="", Channel="", CollectionType="", Amount="", BatchNo=""},
            };
            bool err = false;

            rts.ForEach(p => { if (p.Source != new RemitInfoModel()
                {
                    Source = p.Source
                }.Source)
                               {
                                   err = true; return;
                               }
                        });
            if (err)
            {
                Message.AddCustErrorMessage(MessageCode.Code0000, "匯款檔Source拆分組合異常"); return(null);
            }
            string path = $@"D:\ibankRoot\Ftp_SKGPortalCore\TransactionListDaily\"; Directory.CreateDirectory(path);

            using StreamWriter sw = new StreamWriter($@"{path}SKG_RT.{DateTime.Now.ToString("yyyyMMdd")}", false, Encoding.GetEncoding(950));
            rts.ForEach(p => sw.WriteLine(p.Source));
            sw.Close();
            return(rts);
        }
 /// <summary>
 /// 檢查資料
 /// </summary>
 /// <param name="set"></param>
 public static void CheckData(DepositBillSet set, SysMessageLog message, ApplicationDbContext dataAccess)
 {
     if (BizVirtualAccountCode.CheckBankCodeExist(dataAccess, set.DepositBill.VirtualAccountCode, out _))
     {
         message.AddCustErrorMessage(MessageCode.Code1008, ResxManage.GetDescription <DepositBillModel>(p => p.VirtualAccountCode), set.DepositBill.VirtualAccountCode);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 檢查「繳款人編號」是否皆為數字
 /// </summary>
 /// <param name="payerNo"></param>
 /// <returns></returns>
 private static void CheckPayerNoIsNotNum(SysMessageLog message, string payerNo)
 {
     if (!payerNo.IsNumberString())
     {
         message.AddCustErrorMessage(MessageCode.Code1006, ResxManage.GetDescription <PayerModel>(p => p.PayerNo));
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 檢查銷帳編號長度
        /// </summary>
        /// <param name="message"></param>
        /// <param name="bizCustomer"></param>
        private static void CheckVirtualAccountLength(SysMessageLog message, BizCustomerModel bizCustomer)
        {
            int len = bizCustomer.CustomerCode.Length;

            if (bizCustomer.VirtualAccount1 != VirtualAccount1.Empty)
            {
                len += bizCustomer.BillTermLen;
            }
            if (bizCustomer.VirtualAccount2 != VirtualAccount2.Empty)
            {
                len += bizCustomer.PayerNoLen;
            }
            if (bizCustomer.VirtualAccount3.In(VirtualAccount3.SeqPayEndDate, VirtualAccount3.SeqAmountPayEndDate))
            {
                len += 4;
            }
            if (bizCustomer.VirtualAccount3 != VirtualAccount3.NoverifyCode)
            {
                len += 1;
            }
            if ((int)bizCustomer.VirtualAccountLen != len)
            {
                message.AddCustErrorMessage(MessageCode.Code1007, (int)bizCustomer.VirtualAccountLen, len);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// 檢查繳款人是否為約定扣款帳號
 /// </summary>
 /// <param name="message"></param>
 /// <param name="payer"></param>
 private static void CheckPayerType(SysMessageLog message, PayerModel payer)
 {
     if (payer.PayerType != PayerType.Account)
     {
         message.AddCustErrorMessage(MessageCode.Code1017, payer.PayerName, ResxManage.GetDescription(PayerType.Account));
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// 檢查「繳款人編號」長度
 /// </summary>
 /// <param name="payer"></param>
 private static void CheckPayerNoLen(SysMessageLog message, PayerModel payer)
 {
     if (payer.PayerNo.Length != payer.BizCustomer.PayerNoLen)
     {
         message.AddCustErrorMessage(MessageCode.Code1005, ResxManage.GetDescription <PayerModel>(p => p.PayerNo), payer.BizCustomer.PayerNoLen);
     }
 }
 /// <summary>
 /// 檢查「期別編號」是否為數字
 /// </summary>
 /// <param name="payer"></param>
 private static void CheckTermNo(SysMessageLog message, BillTermModel billTerm)
 {
     if (!billTerm.BillTermNo.IsNumberString())
     {
         message.AddCustErrorMessage(MessageCode.Code1006, ResxManage.GetDescription <BillTermModel>(p => p.BillTermNo));
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// 檢查期別編號長度
 /// </summary>
 /// <param name="billTerm"></param>
 /// <returns></returns>
 private static void CheckTermNoLen(SysMessageLog message, BillTermModel billTerm)
 {
     if (billTerm.BizCustomer.BillTermLen != billTerm.BillTermNo.Length)
     {
         message.AddCustErrorMessage(MessageCode.Code1005, ResxManage.GetDescription <BillTermModel>(p => p.BillTermNo), billTerm.BizCustomer.BillTermLen);
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// 檢查期別編號是否重複
 /// </summary>
 /// <param name="dataAccess"></param>
 /// <param name="billTerm"></param>
 /// <returns></returns>
 private static void CheckTermNoExist(SysMessageLog message, ApplicationDbContext dataAccess, BillTermModel billTerm)
 {
     if (dataAccess.Set <BillTermModel>().Any(p => p.InternalId != billTerm.InternalId && p.CustomerCode == billTerm.CustomerCode &&
                                              p.BillTermNo == billTerm.BillTermNo && (p.FormStatus == FormStatus.Saved || p.FormStatus == FormStatus.Approved)))
     {
         message.AddCustErrorMessage(MessageCode.Code1008, ResxManage.GetDescription <BillTermModel>(p => p.BillTermNo), billTerm.BillTermNo);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// 檢查介紹商企業代號是否有選擇
 /// </summary>
 /// <param name="set"></param>
 private static void CheckBizCustType(SysMessageLog message, BizCustomerSet set)
 {
     if (set.BizCustomerFeeDetail.Any(p => p.BankFeeType == BankFeeType.Hitrust_ClearFee_CurMonth || p.BankFeeType == BankFeeType.Hitrust_ClearFee_NextMonth))
     {
         if (set.BizCustomer.IntroCustomerCode.IsNullOrEmpty() || set.BizCustomer.IntroCustomer.BizCustType != BizCustType.Hitrust)
         {
             message.AddCustErrorMessage(MessageCode.Code1019, ResxManage.GetDescription(BizCustType.Hitrust));
         }
     }
     if (set.BizCustomerFeeDetail.Any(p => p.BankFeeType == BankFeeType.TotalFee && p.IntroPercent > 0m))
     {
         if (set.BizCustomer.IntroCustomerCode.IsNullOrEmpty() || set.BizCustomer.IntroCustomer.BizCustType != BizCustType.Introducer)
         {
             message.AddCustErrorMessage(MessageCode.Code1019, ResxManage.GetDescription(BizCustType.Introducer));
         }
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// 檢查資料
 /// </summary>
 /// <param name="set"></param>
 public static void CheckData(BillSet set, SysMessageLog message, ApplicationDbContext dataAccess)
 {
     if (BizVirtualAccountCode.CheckBankCodeExist(dataAccess, set.Bill.VirtualAccountCode, out _))
     {
         message.AddCustErrorMessage(MessageCode.Code1008, ResxManage.GetDescription <BillModel>(p => p.VirtualAccountCode), set.Bill.VirtualAccountCode);
     }
     CalcTotalPayAmount(set);
     CheckPayEndDate(message, set.Bill);
     CheckCollectionTypeId(message, dataAccess, set.Bill);
 }
        /// <summary>
        /// 資訊流-郵局
        /// </summary>
        public static List <ReceiptInfoBillPostModel> ReceiptInfoPostData(SysMessageLog Message)
        {
            List <ReceiptInfoBillPostModel> posts = new List <ReceiptInfoBillPostModel>()
            {
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "1331", CompareCode = "0009920868538462"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "2222", CompareCode = "0009935862576194"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "3313", CompareCode = "0080587749729183"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "4124", CompareCode = "2143751953183729"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "5565", CompareCode = "0000992086100001"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "6236", CompareCode = "0009935862576194"
                },
                new ReceiptInfoBillPostModel()
                {
                    Channel = "0587", Amount = "767", CompareCode = "2143751953183729"
                },
            };
            bool err = false;

            posts.ForEach(p => { if (p.Source != new ReceiptInfoBillPostModel()
                {
                    Source = p.Source
                }.Source)
                                 {
                                     err = true; return;
                                 }
                          });
            if (err)
            {
                Message.AddCustErrorMessage(MessageCode.Code0000, "資訊流-郵局Source拆分組合異常"); return(null);
            }
            string path = $@"D:\ibankRoot\Ftp_SKGPortalCore\TransactionListDaily\"; Directory.CreateDirectory(path);

            using StreamWriter sw = new StreamWriter($@"{path}SKG_POST.{DateTime.Now.ToString("yyyyMMdd")}", false, Encoding.GetEncoding(950));
            posts.ForEach(p => sw.WriteLine(p.Source));
            sw.Close();
            return(posts);
        }
Exemplo n.º 15
0
 /// <summary>
 /// 檢查繳款人編號是否重複
 /// </summary>
 /// <param name="dataAccess"></param>
 /// <param name="payer"></param>
 /// <returns></returns>
 private static void CheckPayerNoExist(SysMessageLog message, ApplicationDbContext dataAccess, PayerModel payer)
 {
     if (dataAccess.Set <PayerModel>().Any(p =>
                                           !p.InternalId.Equals(payer.InternalId) &&
                                           p.CustomerCode.Equals(payer.CustomerCode) &&
                                           p.PayerNo.Equals(payer.PayerNo) &&
                                           (p.FormStatus == FormStatus.Saved) || p.FormStatus == FormStatus.Approved))
     {
         message.AddCustErrorMessage(MessageCode.Code1008, ResxManage.GetDescription <PayerModel>(p => p.PayerNo), payer.PayerNo);
     }
 }
Exemplo n.º 16
0
        /// <summary>
        /// 資訊流-銀行
        /// </summary>
        public static List <ReceiptInfoBillBankModel> ReceiptInfoBankData(SysMessageLog Message)
        {
            List <ReceiptInfoBillBankModel> banks = new List <ReceiptInfoBillBankModel>()
            {
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "0009920868538462", PN = "+", Amount = "350", Channel = "00"
                },
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "0009920868538462", PN = "+", Amount = "370", Channel = "00"
                },
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "0009935862576194", PN = "+", Amount = "390", Channel = "00"
                },
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "0080587749729183", PN = "+", Amount = "410", Channel = "00"
                },
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "2143751953183729", PN = "+", Amount = "730", Channel = "00"
                },
                new ReceiptInfoBillBankModel()
                {
                    CompareCode = "0000992086100001", PN = "+", Amount = "430", Channel = "00"
                },
            };

            bool err = false;

            banks.ForEach(p => { if (p.Source != new ReceiptInfoBillBankModel()
                {
                    Source = p.Source
                }.Src)
                                 {
                                     err = true; return;
                                 }
                          });
            if (err)
            {
                Message.AddCustErrorMessage(MessageCode.Code0000, "資訊流-銀行Source拆分組合異常"); return(null);
            }
            string path = $@"D:\ibankRoot\Ftp_SKGPortalCore\TransactionListDaily\"; Directory.CreateDirectory(path);

            using StreamWriter sw = new StreamWriter($@"{path}SKG_BANK.{DateTime.Now.ToString("yyyyMMdd")}", false, Encoding.GetEncoding(950));
            banks.ForEach(p => sw.WriteLine(p.Source));
            sw.Close();
            return(banks);
        }
        /// <summary>
        /// 檢查是否有通路尚未填寫核銷規則
        /// </summary>
        /// <returns></returns>
        private static void CheckChannelVerifyPeriod(SysMessageLog message, CollectionTypeSet set)
        {
            Dictionary <string, string> detail = set.CollectionTypeDetail.Select(p => p.Channel).Distinct().ToDictionary(p => p.ChannelId, q => q.ChannelName);
            Dictionary <string, CollectionTypeVerifyPeriodModel> period = set.CollectionTypeVerifyPeriod.ToDictionary(p => p.ChannelId, q => q);
            List <string> detailExpectChannels = detail.Keys.Except(period.Keys).ToList();

            string[] notWriteChannels = detail?.Where(p => p.Key.In(detailExpectChannels.ToArray())).Select(p => p.Value).Distinct().ToArray();
            string   channelName      = LibData.Merge(",", false, notWriteChannels);

            if (!channelName.IsNullOrEmpty())
            {
                message.AddCustErrorMessage(MessageCode.Code1014, channelName);
            }
        }
        /// <summary>
        /// 檢查收款區間是否重疊
        /// </summary>
        /// <param name="detail"></param>
        /// <returns></returns>
        private static void CheckIsOverlap(SysMessageLog message, List <CollectionTypeDetailModel> detail)
        {
            List <CollectionTypeDetailModel> dt = detail.Where(p => detail.Where(q =>
                                                                                 q.RowState != RowState.Delete &&
                                                                                 p.RowId != q.RowId &&
                                                                                 p.ChannelId.Equals(q.ChannelId) &&
                                                                                 (p.SRange >= q.SRange && p.SRange <= q.ERange || p.ERange >= q.SRange && p.ERange <= q.ERange)
                                                                                 ).Any()).ToList();
            string channelName = LibData.Merge(",", false, dt?.Select(p => p.Channel.ChannelName).Distinct().ToArray());

            if (!channelName.IsNullOrEmpty())
            {
                message.AddCustErrorMessage(MessageCode.Code1013, channelName);
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// 檢查介紹商與Hitrust商是否衝突
        /// </summary>
        /// <param name="message"></param>
        /// <param name="detail"></param>
        private static void CheckIntroduceType(SysMessageLog message, List <BizCustomerFeeDetailModel> detail)
        {
            bool introducer = false, hitrust = false;

            detail.ForEach(p =>
            {
                if (p.BankFeeType == BankFeeType.TotalFee)
                {
                    introducer = true;
                }
                if (p.BankFeeType == BankFeeType.Hitrust_ClearFee_CurMonth || p.BankFeeType == BankFeeType.Hitrust_ClearFee_NextMonth)
                {
                    hitrust = true;
                }
            });
            if (introducer && hitrust)
            {
                message.AddCustErrorMessage(MessageCode.Code1018);
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// 服務申請書
        /// </summary>
        public static void ACCFTTData(SysMessageLog Message)
        {
            List <ACCFTT> accftts = new List <ACCFTT>()
            {
                //每筆總手續費-有分潤
                new ACCFTT()
                {
                    KEYNO = "992091", ACCIDNO = "0620101011288", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0620", BRCODE = "0620", IDCODE = "53272487", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "0", RSTORE2 = "0", RSTORE3 = "0", RSTORE4 = "0", RECVITEM1 = "", RECVITEM2 = "", RECVITEM3 = "", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "00", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "0", ACTFEEPT = "00", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190815", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992099", ACCIDNO = "0204101004373", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0204", BRCODE = "0204", IDCODE = "76336687", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = DateTime.Now.ToString("yyyyMMdd"), APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V6", RECVITEM2 = "6V7", RECVITEM3 = "6RN", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190829", AUTOFLAG = "1", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992079", ACCIDNO = "0833100024118", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0921", BRCODE = "0921", IDCODE = "53976248", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190819", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992080", ACCIDNO = "0833100331983", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0921", BRCODE = "0921", IDCODE = "05379410", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190819", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992076", ACCIDNO = "0310101006026", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0310", BRCODE = "0310", IDCODE = "31723190", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V6", RECVITEM2 = "6V7", RECVITEM3 = "6RN", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "0", ACTFEEPT = "00", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190902", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992074", ACCIDNO = "0417101007830", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "1049", BRCODE = "1049", IDCODE = "99590035", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = DateTime.Now.ToString("yyyyMMdd"), APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V6", RECVITEM2 = "6V7", RECVITEM3 = "", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "00", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "0", ACTFEEPT = "00", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190627", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992108", ACCIDNO = "0435101082576", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0435", BRCODE = "0435", IDCODE = "72452571", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "0", ACTFEEPT = "00", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190917", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "990128", ACCIDNO = "0462101005054", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "0462", BRCODE = "0462", IDCODE = "31753898", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "00", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "0", ACTFEEPT = "00", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190919", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "102400", ACCIDNO = "1058108889999", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "1058", BRCODE = "1058", IDCODE = "85283063", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190927", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "912000", ACCIDNO = "1058108889999", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "1058", BRCODE = "1058", IDCODE = "85283063", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190927", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
                new ACCFTT()
                {
                    KEYNO = "992106", ACCIDNO = "1058108889999", CUSTNAME = "每筆總手續費-有分潤", APPBECODE = "1058", BRCODE = "1058", IDCODE = "85283063", APPLYDATE = DateTime.Now.ToString("yyyyMMdd"), CHGDATE = "", APPLYSTAT = "0", CHKNUMFLAG = "Y", CHKAMTFLAG = "N", DUETERM = "0", CHANNEL = "9", FEE = "010", RSTORE1 = "1", RSTORE2 = "1", RSTORE3 = "1", RSTORE4 = "1", RECVITEM1 = "6V1", RECVITEM2 = "6V2", RECVITEM3 = "6RM", RECVITEM4 = "", RECVITEM5 = "", ACTFEE = "10", MARTFEE1 = "00", MARTFEE2 = "00", MARTFEE3 = "00", POSTFLAG = "1", ACTFEEPT = "10", POSTFEE = "00", HIFLAG = "0", HIFARE = "000", NETDATE = "20190927", AUTOFLAG = "0", EBFLAG = "0", EBDATE = "00000000", EBFEEFLAG = "0", EBFEE = "0", EBACTTYPE = "2", CHKDUPPAY = "0", CUSTID = "1234567", FUNC = "0", MAFARE = "0", NOFARE = "0", CTBCFLAG = "0", SHAREBNFTFLG = "1", SHAREBEFTPERCENT = "20", ACTFEEBEFT = "50", ACTFEEMART = "15", SHAREACTFLG = "1", ACTPERCENT = "50", CLEARFEEMART1 = "0", CLEARFEEMART2 = "0", CLEARFEEMART3 = "0", CLEARFEEMART4 = "0", CLEARFEEMART5 = "0", PAYKINDPOST = "0", ACTFEEPOST = "15", SHAREPOSTFLG = "1", POSTPERCENT = "50", AGRIFLAG = "1", AGRIFEE = "25", FILLER = ""
                },
            };
            bool err = false;

            accftts.ForEach(p => { if (p.Source != new ACCFTT()
                {
                    Source = p.Source
                }.Source)
                                   {
                                       err = true; return;
                                   }
                            });
            if (err)
            {
                Message.AddCustErrorMessage(MessageCode.Code0000, "服務申請書Source拆分組合異常"); return;
            }
            string path = $@"D:\ibankRoot\Ftp_SKGPortalCore\ACCFTT\"; Directory.CreateDirectory(path);

            using StreamWriter sw = new StreamWriter($@"{path}ACCFTT.{ DateTime.Now.ToString("yyyyMMdd")}", false, Encoding.GetEncoding(950));
            accftts.ForEach(p => sw.WriteLine(p.Source));
            sw.Close();
        }
Exemplo n.º 21
0
        /// <summary>
        /// 資訊流-超商
        /// </summary>
        public static List <dynamic> ReceiptInfoMarketData(SysMessageLog Message)
        {
            List <dynamic> marts = new List <dynamic>();

            marts.AddRange(new List <ReceiptInfoBillMarketModel>()
            {
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "7111111", Barcode2 = "0009920868538462", Barcode3 = "125"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "TFM", Barcode2 = "0009935862576194", Barcode3 = "2130"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "OKM", Barcode2 = "0080587749729183", Barcode3 = "255"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "HILIFE", Barcode2 = "2143751953183729", Barcode3 = "320"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "AGRI", Barcode2 = "0009920868538462", Barcode3 = "351"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "6V1", Channel = "GT", Barcode2 = "0009935862576194", Barcode3 = "405"
                },
                new ReceiptInfoBillMarketModel()
                {
                    CollectionType = "62N", Channel = "OKM", Barcode2 = "0000992086100001", Barcode3 = "457"
                },
            });

            marts.AddRange(new List <ReceiptInfoBillMarketSPIModel>()
            {
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "7111111", Barcode2 = "0009920868538462", Barcode3_Amount = "15"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "TFM", Barcode2 = "0009935862576194", Barcode3_Amount = "20"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "OKM", Barcode2 = "0080587749729183", Barcode3_Amount = "25"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "HILIFE", Barcode2 = "2143751953183729", Barcode3_Amount = "30"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "AGRI", Barcode2 = "0009920868538462", Barcode3_Amount = "35"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "GT", Barcode2 = "0009935862576194", Barcode3_Amount = "40"
                },
                new ReceiptInfoBillMarketSPIModel()
                {
                    Channel = "SIM", Barcode2 = "0000992086100001", Barcode3_Amount = "45"
                },
            });

            bool err = false;

            marts.ForEach(p =>
            {
                if (p is ReceiptInfoBillMarketModel)
                {
                    if (p.Source != new ReceiptInfoBillMarketModel()
                    {
                        Source = p.Source
                    }.Source)
                    {
                        err = true; return;
                    }
                }
                else
                {
                    if (p.Source != new ReceiptInfoBillMarketSPIModel()
                    {
                        Source = p.Source
                    }.Source)
                    {
                        err = true; return;
                    }
                }
            });
            if (err)
            {
                Message.AddCustErrorMessage(MessageCode.Code0000, "資訊流-超商Source拆分組合異常"); return(null);
            }
            string path = $@"D:\ibankRoot\Ftp_SKGPortalCore\TransactionListDaily\"; Directory.CreateDirectory(path);

            using StreamWriter sw = new StreamWriter($@"{path}SKG_MART.{DateTime.Now.ToString("yyyyMMdd")}", false, Encoding.GetEncoding(950));
            marts.ForEach(p => sw.WriteLine(p.Source));
            sw.Close();
            return(marts);
        }