diff --git a/src/main/java/com/saye/hospitalgd/controller/FinancialReconciliation/RefundStatisticsController.java b/src/main/java/com/saye/hospitalgd/controller/FinancialReconciliation/RefundStatisticsController.java index c9b7013..f5f2179 100644 --- a/src/main/java/com/saye/hospitalgd/controller/FinancialReconciliation/RefundStatisticsController.java +++ b/src/main/java/com/saye/hospitalgd/controller/FinancialReconciliation/RefundStatisticsController.java @@ -62,13 +62,17 @@ public class RefundStatisticsController { modelMap.addAttribute("startTime", startTime); modelMap.addAttribute("endTime", endTime); - //支付方式 - List payType = dicinfoService.findDicinfoTreeNodeList("PAY_TYPE"); - modelMap.addAttribute("payTypeList", payType); + //支付方式 + List payType = dicinfoService.findDicinfoTreeNodeList("PAY_TYPE"); + modelMap.addAttribute("payTypeList", payType); - //退款类型 - List refundType = dicinfoService.findDicinfoTreeNodeList("REFUND_TYPE"); - modelMap.addAttribute("refundTypeList", refundType); + //退款类型 + List refundType = dicinfoService.findDicinfoTreeNodeList("REFUND_TYPE"); + modelMap.addAttribute("refundTypeList", refundType); + + //业务类型 + List bizType = dicinfoService.findDicinfoTreeNodeList("BIZ_TYPE"); + modelMap.addAttribute("bizTypeList", bizType); } catch (Exception e) { e.printStackTrace(); @@ -89,6 +93,7 @@ public class RefundStatisticsController { @ApiParam("开始时间") String startTime, @ApiParam("结束时间") String endTime, @ApiParam("支付方式") String payType, + @ApiParam("业务类型") String bizType, @ApiParam("退款类型") String refundType, @ApiParam("统计维度") String dimension, @ApiParam("页码") int page, @@ -101,6 +106,7 @@ public class RefundStatisticsController { map.put("startTime", startTime); map.put("endTime", endTime); map.put("payType", payType); + map.put("bizType", bizType); map.put("refundType", refundType); map.put("dimension", dimension); @@ -133,6 +139,7 @@ public class RefundStatisticsController { @ApiParam("开始时间") String startTime, @ApiParam("结束时间") String endTime, @ApiParam("支付方式") String payType, + @ApiParam("业务类型") String bizType, @ApiParam("退款类型") String refundType) { HashMap responseMap = new HashMap(); @@ -142,6 +149,7 @@ public class RefundStatisticsController { map.put("startTime", startTime); map.put("endTime", endTime); map.put("payType", payType); + map.put("bizType", bizType); map.put("refundType", refundType); HashMap summaryData = refundStatisticsService.getRefundSummary(map); @@ -171,6 +179,7 @@ public class RefundStatisticsController { @ApiParam("开始时间") String startTime, @ApiParam("结束时间") String endTime, @ApiParam("支付方式") String payType, + @ApiParam("业务类型") String bizType, @ApiParam("退款类型") String refundType) { HashMap responseMap = new HashMap(); @@ -180,6 +189,7 @@ public class RefundStatisticsController { map.put("startTime", startTime); map.put("endTime", endTime); map.put("payType", payType); + map.put("bizType", bizType); map.put("refundType", refundType); List> trendData = refundStatisticsService.getRefundTrend(map); @@ -209,6 +219,7 @@ public class RefundStatisticsController { @ApiParam("开始时间") String startTime, @ApiParam("结束时间") String endTime, @ApiParam("支付方式") String payType, + @ApiParam("业务类型") String bizType, @ApiParam("退款类型") String refundType, @ApiParam("统计维度") String dimension) { @@ -219,6 +230,7 @@ public class RefundStatisticsController { map.put("startTime", startTime); map.put("endTime", endTime); map.put("payType", payType); + map.put("bizType", bizType); map.put("refundType", refundType); map.put("dimension", dimension); @@ -236,5 +248,3 @@ public class RefundStatisticsController { return responseMap; } } - - diff --git a/src/main/java/com/saye/hospitalgd/controller/HisDetailController.java b/src/main/java/com/saye/hospitalgd/controller/HisDetailController.java index 928c104..334db41 100644 --- a/src/main/java/com/saye/hospitalgd/controller/HisDetailController.java +++ b/src/main/java/com/saye/hospitalgd/controller/HisDetailController.java @@ -76,7 +76,9 @@ public class HisDetailController { @ApiOperation(value = "查询his详细记录", notes = "") @GetMapping("/findHisDetail") @ResponseBody - public HashMap findHisDetail(@ApiParam(value = "付款方式") String payType, String startTime, String endTime, String likeFiled, int page, int limit) { + public HashMap findHisDetail(@ApiParam(value = "付款方式") String payType, + @ApiParam(value = "业务类型") String bizType, + String startTime, String endTime, String likeFiled, int page, int limit) { HashMap responseMap = new HashMap<>(); try { @@ -85,6 +87,7 @@ public class HisDetailController { map.put("startTime", startTime); map.put("endTime", endTime); map.put("likeFiled", likeFiled); + map.put("bizType", bizType); PageHelper.startPage(page, limit); PageInfo> pageInfo = new PageInfo>(hisDetailService.findHisDetail(map)); diff --git a/src/main/java/com/saye/hospitalgd/controller/PaymentStatisticsController.java b/src/main/java/com/saye/hospitalgd/controller/PaymentStatisticsController.java index 6abfc15..de5474b 100644 --- a/src/main/java/com/saye/hospitalgd/controller/PaymentStatisticsController.java +++ b/src/main/java/com/saye/hospitalgd/controller/PaymentStatisticsController.java @@ -9,6 +9,7 @@ import com.saye.hospitalgd.service.BankbillHistoryService; import com.saye.hospitalgd.service.TransactionDetailService; import com.saye.hospitalgd.service.system.DicinfoService; import com.saye.hospitalgd.service.system.ServiceParamsService; +import com.saye.hospitalgd.service.FinancialReconciliation.TenpaySummaryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -49,6 +50,9 @@ public class PaymentStatisticsController { @Autowired private ServiceParamsService serviceParamsService; + @Autowired + private TenpaySummaryService tenpaySummaryService; + @RequestMapping("/toPaymentStatistics") public String toPaymentStatistics(ModelMap modelMap) { return "paymentStatistics/paymentStatistics"; @@ -259,6 +263,27 @@ public class PaymentStatisticsController { return "paymentStatistics/summary"; } + @RequestMapping("/toTenpaySummary") + @ApiOperation("财付通汇款汇总表") + public String toTenpaySummary(HttpServletRequest request, ModelMap modelMap) { + String trade_date = StringDUtil.changeNullToEmpty(request.getParameter("trade_date")); + if ("".equals(trade_date)) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.add(Calendar.DATE, -1); + Date startDate = calendar.getTime(); + String startTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, startDate); + String endTime = DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd); + modelMap.addAttribute("startTime", startTime); + modelMap.addAttribute("endTime", endTime); + } else { + modelMap.addAttribute("startTime", trade_date); + modelMap.addAttribute("endTime", trade_date); + modelMap.addAttribute("isClick", "1"); + } + return "paymentStatistics/tenpaySummary"; + } + /** * @description: 查询汇总表数据 * @author thuang @@ -421,4 +446,26 @@ public class PaymentStatisticsController { return resultMap; } + @RequestMapping("/findTenpaySummary") + @ResponseBody + @ApiOperation("查询财付通汇款汇总数据") + public HashMap findTenpaySummary(String startTime, String endTime) { + HashMap response = new HashMap<>(); + try { + HashMap map = new HashMap<>(); + map.put("startTime", startTime); + map.put("endTime", endTime); + List> bankList = tenpaySummaryService.findTenpayBankSummary(map); + List> hisList = tenpaySummaryService.findTenpayHisSummary(map); + response.put("code", 0); + response.put("msg", "OK"); + response.put("bankData", bankList); + response.put("hisData", hisList); + } catch (Exception e) { + response.put("code", 1); + response.put("msg", e.getMessage()); + } + return response; + } + } diff --git a/src/main/java/com/saye/hospitalgd/mapper/FinancialReconciliation/TenpaySummaryMapper.java b/src/main/java/com/saye/hospitalgd/mapper/FinancialReconciliation/TenpaySummaryMapper.java new file mode 100644 index 0000000..e091d22 --- /dev/null +++ b/src/main/java/com/saye/hospitalgd/mapper/FinancialReconciliation/TenpaySummaryMapper.java @@ -0,0 +1,10 @@ +package com.saye.hospitalgd.mapper.FinancialReconciliation; + +import java.util.HashMap; +import java.util.List; + +public interface TenpaySummaryMapper { + List> findTenpaySummary(HashMap map); + List> findTenpayBankSummary(HashMap map); + List> findTenpayHisSummary(HashMap map); +} diff --git a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByHY.java b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByHY.java index 8228c69..64c3a9b 100644 --- a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByHY.java +++ b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByHY.java @@ -149,12 +149,7 @@ public class HISGetDataMethodByHY { //业务类型 0发病历1办卡2就诊卡充值3当日挂号-3 挂号退费4门诊缴费-4 单据退费5现场预约-5 预约退费6预约取号7住院缴费-7出院结算退费-77 预存作废退费 String bizType = StringDUtil.changeNullToEmpty(hisBillHashMap.get("bizType")); - String tradingStatus="1"; - //如果业务类型是负数 那就是退款记录 - int i1 = new BigDecimal(0).compareTo(new BigDecimal(bizType)); - if (i1>0){ - tradingStatus="2"; - } + String tradingStatus = "1"; //支付方式 修改为字典表对应 String payType = StringDUtil.changeNullToEmpty(hisBillHashMap.get("payType")); @@ -167,6 +162,13 @@ public class HISGetDataMethodByHY { //交易金额 String amount = StringDUtil.changeNullToEmpty(hisBillHashMap.get("amount")); + try { + if (new BigDecimal(amount).compareTo(BigDecimal.ZERO) < 0) { + tradingStatus = "2"; + } + } catch (Exception ex) { + tradingStatus = "1"; + } //说明 String remarks = ""; diff --git a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByJH.java b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByJH.java index 94e4cf5..3c58f53 100644 --- a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByJH.java +++ b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/HISGetDataMethodByJH.java @@ -184,11 +184,13 @@ public class HISGetDataMethodByJH { //业务类型 0发病历1办卡2就诊卡充值3当日挂号-3 挂号退费4门诊缴费-4 单据退费5现场预约-5 预约退费6预约取号7住院缴费-7出院结算退费-77 预存作废退费 String bizType = StringDUtil.changeNullToEmpty(hisBillHashMap.get("bizType")); - String tradingStatus="1"; - //如果业务类型是负数 那就是退款记录 - int i1 = new BigDecimal(0).compareTo(new BigDecimal(bizType)); - if (i1>0){ - tradingStatus="2"; + String tradingStatus = "1"; + try { + if (new BigDecimal(amount).compareTo(BigDecimal.ZERO) < 0) { + tradingStatus = "2"; + } + } catch (Exception ex) { + tradingStatus = "1"; } //支付方式 严格按照字典表转换 diff --git a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/MedicalInsuranceReconciliationMethod.java b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/MedicalInsuranceReconciliationMethod.java index 662f4f3..145f3c7 100644 --- a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/MedicalInsuranceReconciliationMethod.java +++ b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/MedicalInsuranceReconciliationMethod.java @@ -95,9 +95,21 @@ public class MedicalInsuranceReconciliationMethod { LogUtil.info(this.getClass(), "查询到医保分组数据:" + medicalRecords.size() + " 组"); - // 删除当天旧的对账结果 + // 先查询当日已存在的结果(用于判断是否为二次核对) MedicalInsuranceReconciliationService reconciliationService = GetBeanUtil.getBean(MedicalInsuranceReconciliationServiceImpl.class); + HashMap prevQueryMap = new HashMap<>(); + prevQueryMap.put("trade_date", trade_date); + List> prevResults = reconciliationService.findMedicalInsuranceReconciliationResult(prevQueryMap); + HashMap prevStatusMap = new HashMap<>(); + if (prevResults != null) { + for (HashMap prev : prevResults) { + String key = StringDUtil.changeNullToEmpty(prev.get("insutype")) + "|" + StringDUtil.changeNullToEmpty(prev.get("clr_type")); + prevStatusMap.put(key, StringDUtil.changeNullToEmpty(prev.get("stmt_rslt"))); + } + } + + // 删除当天旧的对账结果,再写入新结果 HashMap deleteMap = new HashMap<>(); deleteMap.put("trade_date", trade_date); reconciliationService.deleteMedicalInsuranceReconciliationResult(deleteMap); @@ -140,8 +152,20 @@ public class MedicalInsuranceReconciliationMethod { resultMap.put("acct_pay", acct_pay); resultMap.put("fixmedins_setl_cnt", fixmedins_setl_cnt); resultMap.put("setl_optins", callResult.get("setl_optins")); - resultMap.put("stmt_rslt", callResult.get("stmt_rslt")); + String newStmtRslt = StringDUtil.changeNullToEmpty(callResult.get("stmt_rslt")); + resultMap.put("stmt_rslt", newStmtRslt); resultMap.put("stmt_rslt_dscr", callResult.get("stmt_rslt_dscr")); + // 二次核对标志计算 + String key = insutype + "|" + clrType; + String prevStmt = prevStatusMap.get(key); + String recheckFlag = ("1".equals(prevStmt) && "0".equals(newStmtRslt)) ? "1" : "0"; + int checkRound = prevStatusMap.containsKey(key) ? 2 : 1; + resultMap.put("execute_type", "manual"); + resultMap.put("check_round", checkRound); + resultMap.put("recheck_flag", recheckFlag); + resultMap.put("prev_stmt_rslt", prevStmt); + resultMap.put("recheck_time", "1".equals(recheckFlag) ? DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss) : null); + resultMap.put("recheck_user", ""); resultMap.put("infcode", callResult.get("infcode")); resultMap.put("err_msg", callResult.get("err_msg")); resultMap.put("warn_msg", callResult.get("warn_msg")); @@ -170,6 +194,12 @@ public class MedicalInsuranceReconciliationMethod { resultMap.put("fixmedins_setl_cnt", fixmedins_setl_cnt); resultMap.put("stmt_rslt", "9"); resultMap.put("stmt_rslt_dscr", "调用医保局接口失败:" + e.getMessage()); + resultMap.put("execute_type", "manual"); + resultMap.put("check_round", prevStatusMap.size() > 0 ? 2 : 1); + resultMap.put("recheck_flag", "0"); + resultMap.put("prev_stmt_rslt", ""); + resultMap.put("recheck_time", null); + resultMap.put("recheck_user", ""); resultMap.put("api_result", "ERROR"); resultMap.put("create_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); resultMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); @@ -355,4 +385,3 @@ public class MedicalInsuranceReconciliationMethod { return result; } } - diff --git a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/ReconciliationMethod.java b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/ReconciliationMethod.java index 8e3fbcc..a3ebdc4 100644 --- a/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/ReconciliationMethod.java +++ b/src/main/java/com/saye/hospitalgd/scheduler/jobMethod/ReconciliationMethod.java @@ -180,7 +180,7 @@ public class ReconciliationMethod { //数据库中对比完是只有三种状态 his单边 三方单边 差异 分别判断3种账单实际情况 如单边是因为跨天 //err_type 1 his单边 2 三方单边 3 差异 - if ("1".equals(check_result) && "1".equals(err_type)) { + if (("1".equals(check_result) || "2".equals(check_result)) && "1".equals(err_type)) { //his单边账 查询历史单边账表是否是否已有记录 有不动 没有添加 List> unilateralList = null; HashMap noCashSearchMap = new HashMap<>(); @@ -256,19 +256,23 @@ public class ReconciliationMethod { //修改该记录状态为自动核销 - updateHisMap.put("is_manager", "0"); + updateHisMap.put("is_manager", "1"); updateHisMap.put("remark", "系统自动核销"); + updateHisMap.put("manager_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateHisMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateHisMap.put("tranID", tranid); updateHisMap.put("h_jylx", h_jylx); + updateHisMap.put("trade_date", thistrade_date); updateHisMap.put("check_result", "2"); - updateThirdMap.put("is_manager", "0"); + updateThirdMap.put("is_manager", "1"); updateThirdMap.put("remark", "系统自动核销"); + updateThirdMap.put("manager_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateThirdMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateThirdMap.put("i_ddh", tranid); updateThirdMap.put("i_jylx", h_jylx); + updateThirdMap.put("trade_date", thistrade_date); updateThirdMap.put("check_result", "2"); // updateThirdMap.put("is_manager", "0"); @@ -488,18 +492,22 @@ public class ReconciliationMethod { //如果两边金额相同 设置核销 更新关联明细表为核销 if (AmountUtil.isAmountEqual(hisJe, i_jyje)) { //修改该记录状态为自动核销 - updateHisMap.put("is_manager", "0"); + updateHisMap.put("is_manager", "1"); updateHisMap.put("remark", "系统自动核销"); + updateHisMap.put("manager_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateHisMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateHisMap.put("tranID", i_ddh); updateHisMap.put("h_jylx", h_jylx); + updateHisMap.put("trade_date", thistrade_date); updateHisMap.put("check_result", "2"); - updateThirdMap.put("is_manager", "0"); + updateThirdMap.put("is_manager", "1"); updateThirdMap.put("remark", "系统自动核销"); + updateThirdMap.put("manager_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateThirdMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); updateThirdMap.put("i_ddh", i_ddh); updateThirdMap.put("i_jylx", i_jylx); + updateThirdMap.put("trade_date", thistrade_date); updateThirdMap.put("check_result", "2"); @@ -509,6 +517,14 @@ public class ReconciliationMethod { //修改单边账记录表 unilateralService.updateUnilateral(updateThirdMap); + HashMap updateHisUnilateral = new HashMap<>(); + updateHisUnilateral.put("is_manager", "1"); + updateHisUnilateral.put("remark", "系统自动核销"); + updateHisUnilateral.put("manager_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); + updateHisUnilateral.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss)); + updateHisUnilateral.put("tranID", i_ddh); + updateHisUnilateral.put("h_jylx", h_jylx); + unilateralService.updateUnilateral(updateHisUnilateral); } } diff --git a/src/main/java/com/saye/hospitalgd/service/FinancialReconciliation/TenpaySummaryService.java b/src/main/java/com/saye/hospitalgd/service/FinancialReconciliation/TenpaySummaryService.java new file mode 100644 index 0000000..8a81aa7 --- /dev/null +++ b/src/main/java/com/saye/hospitalgd/service/FinancialReconciliation/TenpaySummaryService.java @@ -0,0 +1,10 @@ +package com.saye.hospitalgd.service.FinancialReconciliation; + +import java.util.HashMap; +import java.util.List; + +public interface TenpaySummaryService { + List> findTenpaySummary(HashMap map); + List> findTenpayBankSummary(HashMap map); + List> findTenpayHisSummary(HashMap map); +} diff --git a/src/main/java/com/saye/hospitalgd/service/impl/FinancialReconciliation/TenpaySummaryServiceImpl.java b/src/main/java/com/saye/hospitalgd/service/impl/FinancialReconciliation/TenpaySummaryServiceImpl.java new file mode 100644 index 0000000..f2878d4 --- /dev/null +++ b/src/main/java/com/saye/hospitalgd/service/impl/FinancialReconciliation/TenpaySummaryServiceImpl.java @@ -0,0 +1,31 @@ +package com.saye.hospitalgd.service.impl.FinancialReconciliation; + +import com.saye.hospitalgd.mapper.FinancialReconciliation.TenpaySummaryMapper; +import com.saye.hospitalgd.service.FinancialReconciliation.TenpaySummaryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; + +@Service +public class TenpaySummaryServiceImpl implements TenpaySummaryService { + + @Autowired + private TenpaySummaryMapper tenpaySummaryMapper; + + @Override + public List> findTenpaySummary(HashMap map) { + return tenpaySummaryMapper.findTenpaySummary(map); + } + + @Override + public List> findTenpayBankSummary(HashMap map) { + return tenpaySummaryMapper.findTenpayBankSummary(map); + } + + @Override + public List> findTenpayHisSummary(HashMap map) { + return tenpaySummaryMapper.findTenpayHisSummary(map); + } +} diff --git a/src/main/resources/mapper/BankbillHistoryMapper.xml b/src/main/resources/mapper/BankbillHistoryMapper.xml index 48c50bf..1b2ae8a 100644 --- a/src/main/resources/mapper/BankbillHistoryMapper.xml +++ b/src/main/resources/mapper/BankbillHistoryMapper.xml @@ -75,6 +75,23 @@ and C_YSDDH like concat('%',concat(#{likeFiled},'%')) + and C_SHDDH in ( + select C_SHDDH + from bankbill_history + + + and C_JYRQ >= #{startTime} + + + and C_JYRQ <= #{endTime} + + + and C_ZFFS = #{c_zffs} + + + group by C_SHDDH + having ROUND(SUM(CAST(C_JYJE AS DECIMAL(18,2))), 2) != 0 + ) order by C_JYRQ,C_JYSJ @@ -267,4 +284,4 @@ - \ No newline at end of file + diff --git a/src/main/resources/mapper/FinancialReconciliation/RefundStatisticsMapper.xml b/src/main/resources/mapper/FinancialReconciliation/RefundStatisticsMapper.xml index 16e4e0b..4126c5d 100644 --- a/src/main/resources/mapper/FinancialReconciliation/RefundStatisticsMapper.xml +++ b/src/main/resources/mapper/FinancialReconciliation/RefundStatisticsMapper.xml @@ -14,6 +14,10 @@ PayType as dimension_value, '按支付方式' as dimension_name + + BizType as dimension_value, + '按业务类型' as dimension_name + TradingStatus as dimension_value, '按退款类型' as dimension_name @@ -41,6 +45,9 @@ AND PayType = #{payType} + + AND BizType = #{bizType} + GROUP BY DATE_FORMAT(trade_date, '%Y-%m-%d') @@ -50,6 +57,10 @@ GROUP BY PayType ORDER BY total_refund_amount DESC + + GROUP BY BizType + ORDER BY total_refund_amount DESC + GROUP BY TradingStatus ORDER BY total_refund_amount DESC @@ -80,6 +91,9 @@ AND PayType = #{payType} + + AND BizType = #{bizType} + @@ -100,6 +114,9 @@ AND PayType = #{payType} + + AND BizType = #{bizType} + GROUP BY DATE_FORMAT(trade_date, '%Y-%m-%d') ORDER BY DATE_FORMAT(trade_date, '%Y-%m-%d') ASC diff --git a/src/main/resources/mapper/FinancialReconciliation/TenpaySummaryMapper.xml b/src/main/resources/mapper/FinancialReconciliation/TenpaySummaryMapper.xml new file mode 100644 index 0000000..11ef0df --- /dev/null +++ b/src/main/resources/mapper/FinancialReconciliation/TenpaySummaryMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/HisDetailMapper.xml b/src/main/resources/mapper/HisDetailMapper.xml index 8fb33ae..8a3017e 100644 --- a/src/main/resources/mapper/HisDetailMapper.xml +++ b/src/main/resources/mapper/HisDetailMapper.xml @@ -26,6 +26,9 @@ and PayType = #{payType} + + and BizType = #{bizType} + and trade_date >= #{startTime} @@ -47,6 +50,9 @@ and PayType = #{payType} + + and BizType = #{bizType} + and trade_date >= #{startTime} @@ -247,16 +253,20 @@ - + - select id - ,PayType - ,TranID - ,H_JYLX - ,trade_date - ,HisOperNum - ,Amount - ,I_JYJE - ,I_JYLX - ,I_DDH - ,I_JYQD - ,TradeTime - ,is_manager - ,manager_time - ,err_type - ,remark - ,create_time - ,modify_time - ,managerType - from unmanger_unilateral - - - and trade_date >=#{startTime} - - - and trade_date <=#{endTime} - - - and payType =#{payType} - - - and I_JYQD =#{thirdPay} - - - and err_type =#{err_type} - - - and is_manager=#{is_manager} - - - order by trade_date + select u.id + ,u.PayType + ,u.TranID + ,u.H_JYLX + ,u.trade_date + ,u.HisOperNum + ,u.Amount + ,u.I_JYJE + ,u.I_JYLX + ,u.I_DDH + ,u.I_JYQD + ,u.TradeTime + ,u.is_manager + ,u.manager_time + ,u.err_type + ,u.remark + ,u.create_time + ,u.modify_time + ,u.managerType + from unmanger_unilateral u + inner join ( + select COALESCE(TranID,'') as TranID, + COALESCE(H_JYLX,'') as H_JYLX, + COALESCE(I_DDH,'') as I_DDH, + COALESCE(I_JYLX,'') as I_JYLX, + COALESCE(is_manager,'') as is_manager, + trade_date, + max(modify_time) as modify_time + from unmanger_unilateral + + + and trade_date >=#{startTime} + + + and trade_date <=#{endTime} + + + and payType =#{payType} + + + and I_JYQD =#{thirdPay} + + + and err_type =#{err_type} + + + and is_manager=#{is_manager} + + + group by COALESCE(TranID,''), COALESCE(H_JYLX,''), COALESCE(I_DDH,''), COALESCE(I_JYLX,''), COALESCE(is_manager,''), trade_date + ) g + on u.TranID = g.TranID + and u.H_JYLX = g.H_JYLX + and COALESCE(u.I_DDH,'') = g.I_DDH + and COALESCE(u.I_JYLX,'') = g.I_JYLX + and COALESCE(u.is_manager,'') = g.is_manager + and u.trade_date = g.trade_date + and u.modify_time = g.modify_time + order by u.trade_date @@ -100,6 +118,9 @@ and H_JYLX=#{h_jylx} + + and trade_date=#{trade_date} + and I_JYLX=#{i_jylx} @@ -252,4 +273,4 @@ and I_DDH = #{i_ddh} and err_type = '2' - \ No newline at end of file + diff --git a/src/main/resources/templates/financialReconciliation/hisDetail.html b/src/main/resources/templates/financialReconciliation/hisDetail.html index 4076aa8..edffea2 100644 --- a/src/main/resources/templates/financialReconciliation/hisDetail.html +++ b/src/main/resources/templates/financialReconciliation/hisDetail.html @@ -69,6 +69,16 @@ +
+ +
+ +
+
@@ -236,6 +246,8 @@ let payType = $("#payType").val(); param.payType = payType; + let bizType = $("#bizType").val(); + param.bizType = bizType; param.likeFiled = $("#likeFiled").val(); let date = $("#searchDate").val(); if (date !== '') { @@ -266,6 +278,7 @@ let param = {}; param.payType = $("#payType").val(); + param.bizType = $("#bizType").val(); param.likeFiled = $("#likeFiled").val(); let date = $("#searchDate").val(); if (date !== '') { @@ -292,4 +305,4 @@ }); } - \ No newline at end of file + diff --git a/src/main/resources/templates/financialReconciliation/medicalInsuranceReconciliationResult.html b/src/main/resources/templates/financialReconciliation/medicalInsuranceReconciliationResult.html index ad0c2b7..40b4a7d 100644 --- a/src/main/resources/templates/financialReconciliation/medicalInsuranceReconciliationResult.html +++ b/src/main/resources/templates/financialReconciliation/medicalInsuranceReconciliationResult.html @@ -167,6 +167,10 @@ 接口调用结果 + + 备注 + + 创建时间 @@ -220,6 +224,9 @@ {field: 'fund_pay_sumamt', title: '基金支付总额', align: 'center', width: 130}, {field: 'acct_pay', title: '账户支付金额', align: 'center', width: 130}, {field: 'fixmedins_setl_cnt', title: '结算笔数', align: 'center', width: 100}, + {field: 'remark', title: '备注', align: 'center', width: 120, templet: function(d){ + return d.recheck_flag === '1' ? '二次核对' : ''; + }}, {field: 'stmt_rslt', title: '对账结果', align: 'center', width: 100, templet: function(d){ if(d.stmt_rslt === '0') { return ''; @@ -410,6 +417,7 @@ $("#detail_stmt_rslt_dscr").text(data.stmt_rslt_dscr || '-'); $("#detail_api_result").text(data.api_result || '-'); + $("#detail_remark").text(data.recheck_flag === '1' ? '二次核对' : ''); $("#detail_create_time").text(data.create_time || '-'); layer.open({ @@ -472,5 +480,3 @@ } - - diff --git a/src/main/resources/templates/financialReconciliation/refundStatistics.html b/src/main/resources/templates/financialReconciliation/refundStatistics.html index fce279e..33abc21 100644 --- a/src/main/resources/templates/financialReconciliation/refundStatistics.html +++ b/src/main/resources/templates/financialReconciliation/refundStatistics.html @@ -122,6 +122,16 @@
+
+ +
+ +
+
@@ -180,6 +190,7 @@
  • 全部统计
  • 按日期统计
  • 按支付方式统计
  • +
  • 按业务类型统计
  • 按退款类型统计
  • @@ -197,6 +208,7 @@ - diff --git a/src/main/resources/templates/paymentStatistics/summary.html b/src/main/resources/templates/paymentStatistics/summary.html index 8af5efa..62dec64 100644 --- a/src/main/resources/templates/paymentStatistics/summary.html +++ b/src/main/resources/templates/paymentStatistics/summary.html @@ -361,27 +361,19 @@ $("#third_num_" + key).html(thirdNumData[key]); } - //三方扫码支付的金额相加 - let smzfMoney = (Number(thirdMoneyData["1_1"]) + Number(thirdMoneyData["1_2"]) + Number(thirdMoneyData["1_3"]) + Number(thirdMoneyData["1_4"])).toFixed(2); - - for (let i = 1; i <= 5; i++) { - if (i === 1) { - let money = Math.abs(smzfMoney - Number(hisMoneyData["" + i])).toFixed(2); - $("#diff_" + i).html(formatAmount(money)); - } else { - let money = Math.abs(Number(thirdMoneyData["" + i]) - Number(hisMoneyData["" + i])).toFixed(2); - $("#diff_" + i).html(formatAmount(money)); - } - } + $("#diff_1").html(""); + $("#diff_2").html(""); + $("#diff_3").html(""); + $("#diff_4").html(""); + $("#diff_5").html(""); $("#allHisNum").html(allHisNum); $("#allHisMoney").html(formatAmount(allHisMoney.toFixed(2))); $("#allThirdNum").html(allThirdNum); $("#allThirdMoney").html(formatAmount(allThirdMoney.toFixed(2))); - let allDiff = Math.abs(allHisMoney - allThirdMoney).toFixed(2); - - /*$("#allDiff").html(formatAmount(allDiff));*/ + let allDiff = (allThirdMoney - allHisMoney).toFixed(2); + $("#allDiff").html(formatAmount(allDiff)); } else { layer.alert(result.errMsg); } @@ -437,4 +429,4 @@ } - \ No newline at end of file + diff --git a/src/main/resources/templates/paymentStatistics/tenpaySummary.html b/src/main/resources/templates/paymentStatistics/tenpaySummary.html new file mode 100644 index 0000000..6a75d6d --- /dev/null +++ b/src/main/resources/templates/paymentStatistics/tenpaySummary.html @@ -0,0 +1,141 @@ + + + + + 财付通汇款汇总表 + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    武警宁夏总队医院财付通汇总表
    +
    统计时间:
    +
    +
    +
    +
    +
    +
    + +