Esempio n. 1
0
        /// <summary>
        /// 凭证科目实例化(此方法已被重写)
        /// </summary>
        /// <returns></returns>
        protected virtual FKTZSServiceManagerEntity InitFKTZSServiceManagerEntity(ApplyNoEntity item)
        {
            FKTZSServiceManagerEntity fktzsServiceManagerEntity = new FKTZSServiceManagerEntity();

            fktzsServiceManagerEntity.SetAccountPayableAdvanceReceivedAC().SetActualPayableAC().SetCostAdjustmentAC("SAPLinks.Bussiness.AfterSaleBussiness.CostAdjustmentAC").SetInputVatAC().
            SetInputVATDifferenceAdjustmentAC().SetInputVATDifferencesTurnOutCreditAC().SetInputVATDifferencesTurnOutDebtorAC();
            return(fktzsServiceManagerEntity);//SAPLinks.Bussiness.AfterSaleBussiness
        }
Esempio n. 2
0
        private static string StringFormat(ApplyNoEntity applyNoEntity)
        {
            string query = @"select TASKID,APPLY_NO,APPLY_DISPLAYNAME,APPLY_DEPT,APPLY_DEPTCODE,PAY_OBJ_ID,PAY_OBJ_NAME,XREF2_HD,WBJE_TOTAL,WBCS_TOTAL 
                            from DABAN_BPM_{0}.DBO.FKTZS_C_H where PROCESS_TYPE = '{1}' and YCWC_TYPE = '{2}' and APPLY_NO='{3}'";

            query = string.Format(query, applyNoEntity.BasicEntity.Company, applyNoEntity.BasicEntity.FktzsProcessType.ProcessType, applyNoEntity.BasicEntity.FktzsYcWcType.YCWCType, applyNoEntity.ApplyNo);
            return(query);
        }
        private static string StringFormat(ApplyNoEntity applyNoEntity)
        {
            string query = @"select 'ZP' InvoiceType,INV_CODE,INV_NO,AMOUNT,TAX from DABAN_BPM_{0}.DBO.FKTZS_ZP_C_D where TASKID={1}
                            union all
                            select 'PP' InvoiceType,INV_CODE,INV_NO,AMOUNT,0 TAX from DABAN_BPM_{0}.DBO.FKTZS_PP_C_D where TASKID={1}";

            query = string.Format(query, applyNoEntity.BasicEntity.Company, applyNoEntity.TaskID);
            return(query);
        }
Esempio n. 4
0
 public static IKPSQ Create(ApplyNoEntity applyNoEntity)
 {
     if (applyNoEntity.BasicEntity.FktzsYcWcType.YCWCType == FKTZSYCWCType.YC)
     {
         return(new KPSQ_YC());
     }
     else
     {
         return(new KPSQ_WC());
     }
 }
Esempio n. 5
0
        private static string StringFormat(ApplyNoEntity applyNoEntity)
        {
            //AND SRC_TASKID<>CURRENT_TASKID为了过滤E单据
            string query = @"select BB.TASKID,BB.Z_GLBH,BB.C_WBCS from (
                                select * from BPMDB.DBO.MAIN_KPSQ_DATAUSED where CURRENT_TASKID={0} AND SRC_TASKID<>CURRENT_TASKID
                                ) AA
                                left join DABAN_BPM_{1}.DBO.KPSQ_ZYDXX_D BB on AA.SRC_TASKID=BB.TASKID and AA.XBLNR=BB.Z_GLBH and AA.CBXZ=BB.Z_GLBH_PK";

            query = string.Format(query, applyNoEntity.TaskID, applyNoEntity.BasicEntity.Company);
            return(query);
        }
Esempio n. 6
0
        private static string StringFormat(ApplyNoEntity applyNoEntity)
        {
            string query = @"SELECT * FROM (
SELECT ID,TASKID,Z_GLBH,Z_GLBH_PK,Z_YWLX,Z_HTBH,Z_YYDD,KHBM,S_KPJE,C_SAKNR,C_SNWBMC,C_WBJE,SJZFJE FROM [DABAN_BPM_{1}].[DBO].[FKTZS_ZYD_D] WHERE TASKID={0}
UNION ALL 
SELECT ID,TASKID,Z_GLBH,Z_GLBH_PK,Z_YWLX,Z_HTBH,Z_YYDD,KHBM,S_KPJE,C_SAKNR,C_SNWBMC,C_WBJE,SJZFJE FROM [DABAN_BPM_{1}].[DBO].[FKTZS_ZYD_EXCEL_D] WHERE TASKID={0}
) AA ORDER BY ID ASC";

            query = string.Format(query, applyNoEntity.TaskID, applyNoEntity.BasicEntity.Company);
            return(query);
        }
        public static FKTZSServiceEntity Load(ApplyNoEntity applyNoEntity)
        {
            FKTZSServiceEntity fktzsServiceEntity = new FKTZSServiceEntity();

            fktzsServiceEntity.ApplyNoEntity    = applyNoEntity;
            fktzsServiceEntity.Fktzs_C_HEntitys = FKTZS_C_HEntity.Load(applyNoEntity);
            fktzsServiceEntity.InvoiceEntitys   = InvoiceEntityCollection.Load(applyNoEntity);
            //2018-8-21 11:57:44改造开票申请取数逻辑。开票申请有偿、无偿的取数表不同
            fktzsServiceEntity.KpsqEntitys     = KPSQFactory.Create(applyNoEntity).Load(applyNoEntity);//KPSQEntityCollection.Load(applyNoEntity);
            fktzsServiceEntity.FKTZSZYDEntitys = FKTZSZYDEntityCollection.Load(applyNoEntity);
            return(fktzsServiceEntity);
        }
Esempio n. 8
0
        private ApplyNoEntityCollection AggData(DataTable dt)
        {
            ApplyNoEntityCollection applyNos = new ApplyNoEntityCollection();

            foreach (DataRow item in dt.Rows)
            {
                ApplyNoEntity applyNoEntity = new ApplyNoEntity();
                applyNoEntity.ApplyNo     = Convert.ToString(item["APPLY_NO"]);
                applyNoEntity.TaskID      = Convert.ToString(item["TaskID"]);
                applyNoEntity.FinishAt    = Convert.ToDateTime(item["FinishAt"]).ToString("yyyyMMdd");
                applyNoEntity.BasicEntity = _applyNoBasicEntity;
                applyNos.Add(applyNoEntity);
            }
            return(applyNos);
        }
        /// <summary>
        /// 凭证科目实例化
        /// 2018-8-21 13:32:10改造,
        /// 根据单号区分有偿、无偿取数格式
        /// </summary>
        /// <returns></returns>
        protected override FKTZSServiceManagerEntity InitFKTZSServiceManagerEntity(ApplyNoEntity applyNoEntity)
        {
            FKTZSServiceManagerEntity fktzsServiceManagerEntity = new FKTZSServiceManagerEntity();

            //DICS06营业有偿
            if (applyNoEntity.BasicEntity.FktzsYcWcType.YCWCType == FKTZSYCWCType.YC)
            {
                fktzsServiceManagerEntity.SetAccountPayableAdvanceReceivedAC().SetActualPayableAC().SetCostAdjustmentAC("SAPLinks.Bussiness.AfterSaleBussiness.YC.CostAdjustmentAC").SetInputVatAC().
                SetInputVATDifferenceAdjustmentAC().SetInputVATDifferencesTurnOutCreditAC().SetInputVATDifferencesTurnOutDebtorAC();
            }
            else
            {
                fktzsServiceManagerEntity.SetAccountPayableAdvanceReceivedAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.AccountPayableAdvanceReceivedAC").
                SetActualPayableAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.ActualPayableAC").SetCostAdjustmentAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.CostAdjustmentAC").
                SetInputVatAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.InputVatAC").SetInputVATDifferenceAdjustmentAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.InputVATDifferenceAdjustmentAC").
                SetInputVATDifferencesTurnOutCreditAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.InputVATDifferencesTurnOutCreditAC").SetInputVATDifferencesTurnOutDebtorAC("SAPLinks.Bussiness.AfterSaleBussiness.WC.InputVATDifferencesTurnOutDebtorAC");
            }
            return(fktzsServiceManagerEntity);//SAPLinks.Bussiness.AfterSaleBussiness
        }
Esempio n. 10
0
 private DataTable ExecuteQuery(ApplyNoEntity applyNoEntity, string query)
 {
     return(SQLHelper.ExecuteDataset(applyNoEntity.BasicEntity.ConnStr, CommandType.Text, query).Tables[0]);
 }
Esempio n. 11
0
 public KPSQEntityCollection Load(ApplyNoEntity applyNoEntity)
 {
     return(AggData(ExecuteQuery(applyNoEntity, StringFormat(applyNoEntity))));
 }
Esempio n. 12
0
 public static FKTZS_C_HEntity Load(ApplyNoEntity applyNoEntity)
 {
     return(AggData(ExecuteQuery(applyNoEntity, StringFormat(applyNoEntity))));
 }
Esempio n. 13
0
 public static FKTZSZYDEntityCollection Load(ApplyNoEntity applyNoEntity)
 {
     return(AggData(ExecuteQuery(applyNoEntity, StringFormat(applyNoEntity))));
 }