|
@@ -40,6 +40,7 @@ namespace PTMedicalInsurance.Forms
|
|
|
private void Clearing_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
ComboxSetter cbxSetter = new ComboxSetter();
|
|
|
+ cbxSetter.setCbxInterfaceDataSource(cbxInterface);
|
|
|
cbxSetter.setCbxDictionaryDataSource(Global.inf.interfaceDr.ToString(), "insutype", cbxInsuType);
|
|
|
cbxSetter.setCbxDictionaryDataSource(Global.inf.interfaceDr.ToString(), "clr_type", cbxClrType);
|
|
|
|
|
@@ -53,6 +54,7 @@ namespace PTMedicalInsurance.Forms
|
|
|
dpST.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
|
|
|
dpED.Value = DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMonths(1).AddDays(-1);
|
|
|
|
|
|
+ cbxInterface.SelectedValueChanged += new EventHandler(cbxInterface_SelectedValueChanged);
|
|
|
WindowState = FormWindowState.Maximized;
|
|
|
|
|
|
tbTmp.Text= Global.currentDirectory + "\\Download";
|
|
@@ -761,6 +763,50 @@ namespace PTMedicalInsurance.Forms
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 查询明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="outParam"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private int checkDetail(out string outParam)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ DataTable dt = (DataTable)dgvSettlSummary.DataSource;
|
|
|
+ int i = dgvSettlSummary.CurrentRow.Index;
|
|
|
+
|
|
|
+ dynamic joCheck = new JObject();
|
|
|
+ joCheck.clr_type = dt.Rows[i]["clr_type"].ToString();
|
|
|
+ joCheck.setl_optins = dt.Rows[i]["setl_optins"].ToString();
|
|
|
+ joCheck.stmt_begndate = dpST.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ joCheck.stmt_enddate = dpED.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ joCheck.medfee_sumamt = dt.Rows[i]["medfee_sumamt"].ToString();
|
|
|
+ joCheck.fund_pay_sumamt = dt.Rows[i]["fund_pay_sumamt"].ToString();
|
|
|
+ joCheck.cash_payamt = dt.Rows[i]["cash_payamt"].ToString();
|
|
|
+ joCheck.fixmedins_setl_cnt = dt.Rows[i]["fixmedins_setl_cnt"].ToString();
|
|
|
+
|
|
|
+ JObject joData = new JObject();
|
|
|
+ joData.Add("data", joCheck);
|
|
|
+ InvokeHelper invoker = new InvokeHelper();
|
|
|
+ JObject jo3202Rtn = invoker.invokeCenterService(TradeEnum.FeeDetailCheck, joData);
|
|
|
+ if (JsonHelper.parseCenterReturnJson(jo3202Rtn, out outParam) != 0)
|
|
|
+ {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ outParam = JsonHelper.getDestValue(jo3202Rtn, "jsxx_ds");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ outParam = "checkDetail:" + ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private int checkDetail(string file_qury_no, out string outParam, out string fileName)
|
|
|
{
|
|
|
fileName = "";
|
|
@@ -835,6 +881,14 @@ namespace PTMedicalInsurance.Forms
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ private int importToDgvCenterSetlRec(string outParam)
|
|
|
+ {
|
|
|
+ DataTable dt = JsonConvert.DeserializeObject<DataTable>(outParam, new ReadDataTableConverter());
|
|
|
+ dgvCenterSettlRec.DataSource = dt;
|
|
|
+ return 0;
|
|
|
+
|
|
|
}
|
|
|
private int importToDgvCenterSetlRec(string fileName, string zipFilePath, out string outParam)
|
|
|
{
|
|
@@ -913,47 +967,49 @@ namespace PTMedicalInsurance.Forms
|
|
|
outParam = "";
|
|
|
//先签到
|
|
|
CenterBusiness cBus = new CenterBusiness();
|
|
|
- JObject jo9001Rtn = new JObject();
|
|
|
- cBus.signIn(out jo9001Rtn);
|
|
|
+ //JObject jo9001Rtn = new JObject();
|
|
|
+ //cBus.signIn(out jo9001Rtn);
|
|
|
try
|
|
|
{
|
|
|
//导出并压缩
|
|
|
- if (exportAndCompress(out outParam) != 0)
|
|
|
- {
|
|
|
- return -1;
|
|
|
- }
|
|
|
- string zipPath = outParam;
|
|
|
- Global.writeLog("exportAndCompress:" + zipPath);
|
|
|
- //上传给中心,
|
|
|
- if (uploadFileToCenter(zipPath, out outParam) != 0)
|
|
|
- {
|
|
|
- return -1;
|
|
|
- }
|
|
|
- Global.writeLog("uploadFileToCenter:" + outParam);
|
|
|
- string file_query_no = outParam;
|
|
|
- string fileName = "";
|
|
|
+ //if (exportAndCompress(out outParam) != 0)
|
|
|
+ //{
|
|
|
+ // return -1;
|
|
|
+ //}
|
|
|
+ //string zipPath = outParam;
|
|
|
+ //Global.writeLog("exportAndCompress:" + zipPath);
|
|
|
+ ////上传给中心,
|
|
|
+ //if (uploadFileToCenter(zipPath, out outParam) != 0)
|
|
|
+ //{
|
|
|
+ // return -1;
|
|
|
+ //}
|
|
|
+ //Global.writeLog("uploadFileToCenter:" + outParam);
|
|
|
+ //string file_query_no = outParam;
|
|
|
+ //string fileName = "";
|
|
|
//3202明细对账 输出查询号和文件名
|
|
|
- if (checkDetail(file_query_no, out outParam, out fileName) != 0)
|
|
|
- {
|
|
|
- return -1;
|
|
|
- }
|
|
|
- file_query_no = outParam;
|
|
|
- Global.writeLog("checkDetail:" + outParam + "///" + fileName);
|
|
|
- //下载 获取 查询号和文件名后 下载
|
|
|
- if (downloadZIP(file_query_no, fileName, out outParam) != 0)
|
|
|
+ if (checkDetail(out outParam) != 0)
|
|
|
{
|
|
|
return -1;
|
|
|
}
|
|
|
+ //file_query_no = outParam;
|
|
|
+ //Global.writeLog("checkDetail:" + outParam + "///" + fileName);
|
|
|
+ ////下载 获取 查询号和文件名后 下载
|
|
|
+ //if (downloadZIP(file_query_no, fileName, out outParam) != 0)
|
|
|
+ //{
|
|
|
+ // return -1;
|
|
|
+ //}
|
|
|
|
|
|
- zipPath = outParam;
|
|
|
+ //zipPath = outParam;
|
|
|
|
|
|
- Global.writeLog("downloadZIP:" + outParam);
|
|
|
- //导入DGV
|
|
|
- if (importToDgvCenterSetlRec(fileName, zipPath, out outParam) != 0)
|
|
|
- {
|
|
|
- return -1;
|
|
|
- }
|
|
|
- Global.writeLog("importToDgvCenterSetlRec:" + outParam);
|
|
|
+ importToDgvCenterSetlRec(outParam);
|
|
|
+
|
|
|
+ //Global.writeLog("downloadZIP:" + outParam);
|
|
|
+ ////导入DGV
|
|
|
+ //if (importToDgvCenterSetlRec(fileName, zipPath, out outParam) != 0)
|
|
|
+ //{
|
|
|
+ // return -1;
|
|
|
+ //}
|
|
|
+ //Global.writeLog("importToDgvCenterSetlRec:" + outParam);
|
|
|
return 0;
|
|
|
}
|
|
|
catch (Exception ex)
|