using Newtonsoft.Json.Linq;
using PTMedicalInsurance.Helper;
using PTMedicalInsurance.Variables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PTMedicalInsurance.Business
{
    class IPSettlementService:IChargeService
    {

        /// <summary>
        /// 收费
        /// </summary>
        public string Charge(string operationType, JObject joInput)
        {
            Global.pat.admType = 2;
            Global.pat.RYorCY = "2";

            ProcessManager pManager = new ProcessManager()
            // 预结算
            .Add(new IPPreSettlementProcess())
            // 结算
            .Add(new IPSettlementProcess());
            // 执行
            return pManager.Run(joInput);
        }

        public string DisCharge(JObject joParam)
        {
            ProcessManager pManager = new ProcessManager()
               // 查询结算信息
               .Add(new IPQuerySettlementProcess())
               // 结算撤销 
               .Add(new IPSettlementCancelProcess())
               // 费用明细取消
               .Add(new IPUploadFeeCancelProcess());

            // 执行
            return pManager.Run(joParam);
        }
    }
}
