update:修复军保统计页面bug
This commit is contained in:
@@ -6,9 +6,12 @@ import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.commons.uuid.UUIDGenerator;
|
||||
import com.saye.hospitalgd.service.*;
|
||||
import com.saye.hospitalgd.service.historyLog.ReconciliationLogService;
|
||||
import com.saye.hospitalgd.util.AmountUtil;
|
||||
import com.saye.hospitalgd.service.historyLog.impl.ReconciliationLogServiceImpl;
|
||||
import com.saye.hospitalgd.service.impl.*;
|
||||
import com.saye.hospitalgd.service.system.DicinfoService;
|
||||
import com.saye.hospitalgd.service.system.ServiceParamsService;
|
||||
import com.saye.hospitalgd.service.system.impl.DicinfoServiceImpl;
|
||||
import com.saye.hospitalgd.service.system.impl.ServiceParamsServiceImpl;
|
||||
|
||||
|
||||
@@ -56,12 +59,6 @@ public class ReconciliationMethod {
|
||||
searchMap.put("trade_date", trade_date);
|
||||
searchMap.put("is_ok", 1);
|
||||
|
||||
//查询军保操作员,用于排除军保账单
|
||||
List<HashMap<Object, Object>> militaryOperators = operatorService.findMilitaryOperators(new HashMap<>());
|
||||
if (militaryOperators != null && militaryOperators.size() > 0) {
|
||||
searchMap.put("excludeMilitaryOperators", militaryOperators);
|
||||
}
|
||||
|
||||
//先判断是否已生成
|
||||
List<HashMap<Object, Object>> reconciliationLog = reconciliationLogService.findReconciliationLogByParam(searchMap);
|
||||
|
||||
@@ -69,6 +66,20 @@ public class ReconciliationMethod {
|
||||
managerNum = Integer.parseInt(StringDUtil.changeNullToEmpty(reconciliationLog.get(0).get("MANAGER_NUM")));
|
||||
}
|
||||
|
||||
// 提前获取过滤参数
|
||||
DicinfoService dicinfoService = GetBeanUtil.getBean(DicinfoServiceImpl.class);
|
||||
|
||||
// 查询军保支付方式(医院垫支)的dicvalue
|
||||
String military_code = ""; // 默认为空,表示不过滤
|
||||
HashMap<String, String> dicinfoSearchMap = new HashMap<>();
|
||||
dicinfoSearchMap.put("parentCode", "PAY_TYPE"); // 支付方式的父节点
|
||||
dicinfoSearchMap.put("dicname", "医院垫支");
|
||||
List<HashMap<Object, Object>> militaryPayTypeList = dicinfoService.selectDicinfoListByCondition(dicinfoSearchMap);
|
||||
if (militaryPayTypeList != null && militaryPayTypeList.size() > 0) {
|
||||
military_code = StringDUtil.changeNullToEmpty(militaryPayTypeList.get(0).get("DICVALUE"));
|
||||
}
|
||||
searchMap.put("military_code", military_code);
|
||||
|
||||
//查询his和三方记录
|
||||
List<HashMap<Object, Object>> hisbillsList = hisbillsHistoryService.findHisBillsByDate(searchMap);
|
||||
|
||||
@@ -80,10 +91,16 @@ public class ReconciliationMethod {
|
||||
TransactionDetailService transactionDetailService = GetBeanUtil.getBean(TransactionDetailServiceImpl.class);
|
||||
UnilateralService unilateralService = GetBeanUtil.getBean(UnilateralServiceImpl.class);
|
||||
|
||||
String cash_code = StringDUtil.changeNullToEmpty(serviceParamsService.findParamValByParamCode("cash_code"));
|
||||
// 正确获取 cash_code 参数值
|
||||
String cash_code = "5"; // 默认值
|
||||
List<HashMap<Object, Object>> cashCodeList = serviceParamsService.findParamValByParamCode("cash_code");
|
||||
if (cashCodeList != null && cashCodeList.size() > 0) {
|
||||
cash_code = StringDUtil.changeNullToEmpty(cashCodeList.get(0).get("PARAM_VAL"));
|
||||
}
|
||||
|
||||
//先创建关联表 用来后面查询交易明细
|
||||
searchMap.put("cash_code", cash_code);
|
||||
// military_code 已经在前面添加到 searchMap 中了
|
||||
transactionDetailService.insertHisAndThirdJoinData(searchMap);
|
||||
|
||||
|
||||
@@ -202,7 +219,7 @@ public class ReconciliationMethod {
|
||||
String thirdJe = StringDUtil.changeNullToEmpty(list.get(0).get("I_JYJE"));
|
||||
HashMap<Object, Object> updateHisMap = new HashMap<>();
|
||||
HashMap<Object, Object> updateThirdMap = new HashMap<>();
|
||||
if (new BigDecimal(thirdJe).compareTo(new BigDecimal(amount)) == 0) {
|
||||
if (AmountUtil.isAmountEqual(thirdJe, amount)) {
|
||||
|
||||
|
||||
//修改该记录状态为自动核销
|
||||
@@ -320,7 +337,7 @@ public class ReconciliationMethod {
|
||||
HashMap<Object, Object> updateThirdMap = new HashMap<>();
|
||||
|
||||
//如果两边金额相同 设置核销 更新关联明细表为核销
|
||||
if (new BigDecimal(hisJe).compareTo(new BigDecimal(i_jyje)) == 0) {
|
||||
if (AmountUtil.isAmountEqual(hisJe, i_jyje)) {
|
||||
//修改该记录状态为自动核销
|
||||
updateHisMap.put("is_manager", "0");
|
||||
updateHisMap.put("remark", "系统自动核销");
|
||||
@@ -508,7 +525,7 @@ public class ReconciliationMethod {
|
||||
String i_jylx = StringDUtil.changeNullToEmpty(bankDetailMap.get("I_JYLX"));
|
||||
String i_ddh = StringDUtil.changeNullToEmpty(bankDetailMap.get("I_DDH"));
|
||||
|
||||
if (new BigDecimal(amount).compareTo(new BigDecimal(i_jyje)) == 0) {
|
||||
if (AmountUtil.isAmountEqual(amount, i_jyje)) {
|
||||
|
||||
HashMap<Object, Object> addMap = new HashMap<>();
|
||||
addMap.put("jysj", i_jyrq + " " + i_jysj);
|
||||
|
||||
Reference in New Issue
Block a user