|
@@ -45,22 +45,12 @@ public class MySQLSecondService {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 定金导入
|
|
|
+ * 退款
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void refundTo() {
|
|
|
System.out.println("===============fc_refund 导入数据开始=================");
|
|
|
- //List<TkInfo> djTkList = oracleMapper.selectDjTk();
|
|
|
List<TkInfo> htTkList = oracleMapper.selectHtTk();
|
|
|
- /*List<Integer> otherHtIds = new ArrayList<>();
|
|
|
- otherHtIds.add(40051);
|
|
|
- otherHtIds.add(3958);
|
|
|
- otherHtIds.add(13496);
|
|
|
- otherHtIds.add(19046);*/
|
|
|
-
|
|
|
- //List<TkInfo> otherChange = oracleMapper.selectOtherHtTk(otherHtIds);
|
|
|
- //List<TkInfo> tkInfoList = Stream.concat(djTkList.stream(), htTkList.stream()).collect(Collectors.toList());
|
|
|
- //tkInfoList = Stream.concat(tkInfoList.stream(), otherChange.stream()).collect(Collectors.toList());
|
|
|
List<Refund> refunds = new ArrayList<>();
|
|
|
for (TkInfo item : htTkList) {
|
|
|
Integer qybh = StringUtils.isEmpty(item.getQybh()) ? null : Integer.valueOf(item.getQybh());
|
|
@@ -134,6 +124,7 @@ public class MySQLSecondService {
|
|
|
public void tradeTgTo() {
|
|
|
System.out.println("===============fc_trade 导入数据开始=================");
|
|
|
List<TradeInfo> tradeInfoList = oracleMapper.selectTG();
|
|
|
+
|
|
|
List<FcTrade> fcTrades = new ArrayList<>();
|
|
|
|
|
|
for (TradeInfo item : tradeInfoList) {
|
|
@@ -219,7 +210,18 @@ public class MySQLSecondService {
|
|
|
List<Account> wdzJc = oracleMapper.getWdzJc();
|
|
|
List<Account> wdzBf = oracleMapper.getWdzBf();
|
|
|
List<String> strs = new ArrayList<>();
|
|
|
+ //处理特殊的对账
|
|
|
+ //1、寿光农商银行 缺失的 定金626475.6 (银行流水号 = 041002202216625184199811) 手续费0.44(银行流水号= 041002202216655621675571) (总的楼栋户的合计 比 账户余额少 这两笔 需要加上这两笔 )
|
|
|
+ //2、中国建设银行股份有限公司寿光支行 bankCode:02 手续费 -200(银行流水号= 021002202216625378315471) (总的楼栋户的合计 比对完账的账户余额 多200 总的楼栋户合计需要加上这个-200)
|
|
|
+ //3、中国邮政储蓄银行股份有限公司寿光市支行 利息186893.99 (银行流水号=161002202316730870521161) (总的楼栋户的合计 比账户余额少这一笔 总的楼栋户合计需要加上这个 186893.99)
|
|
|
+ List<String> serialNumbers = new ArrayList<>();
|
|
|
+ serialNumbers.add("041002202216625184199811");
|
|
|
+ serialNumbers.add("041002202216655621675571");
|
|
|
+ serialNumbers.add("021002202216625378315471");
|
|
|
+ serialNumbers.add("161002202316730870521161");
|
|
|
+ List<Account> tsList = mySqlMapper.selectTsDzByserial(serialNumbers);
|
|
|
for (Account account : list) {
|
|
|
+
|
|
|
//未对账的交存
|
|
|
BigDecimal jc = BigDecimal.ZERO;
|
|
|
if (wdzJc != null && !wdzJc.isEmpty()) {
|
|
@@ -232,14 +234,23 @@ public class MySQLSecondService {
|
|
|
Account bfAccount = wdzBf.stream().filter(t -> !StringUtils.isEmpty(t.getBankCode()) && t.getBankCode().equals(account.getBankCode())).findFirst().orElse(null);
|
|
|
bf = null != bfAccount ? bfAccount.getBalance() : BigDecimal.ZERO;
|
|
|
}
|
|
|
+ //当前托管户 的其他类型的 对账金额
|
|
|
+ BigDecimal otherTypeAmount = BigDecimal.ZERO;
|
|
|
+ Account otherTypeAccount = tsList.stream().filter(t -> !StringUtils.isEmpty(t.getBankCode()) && t.getBankCode().equals(account.getBankCode())).findFirst().orElse(null);
|
|
|
+ if (otherTypeAccount != null) {
|
|
|
+ otherTypeAmount = otherTypeAccount.getBalance();
|
|
|
+ otherTypeAmount = null != otherTypeAmount ? otherTypeAccount.getBalance() : BigDecimal.ZERO;
|
|
|
+ }
|
|
|
+
|
|
|
StringBuilder str = new StringBuilder();
|
|
|
str.append(account.getBankName())
|
|
|
.append(";" + account.getBankCode())
|
|
|
.append(";" + jc)
|
|
|
.append(";" + bf)
|
|
|
+ .append(";" + otherTypeAmount)
|
|
|
.append(";" + account.getBalance())
|
|
|
.append(";" + account.getAccountBalance())
|
|
|
- .append(";" + ((account.getBalance().subtract(jc)).add(bf)).subtract(account.getAccountBalance()));
|
|
|
+ .append(";" + ((account.getBalance().subtract(jc)).add(bf).add(otherTypeAmount)).subtract(account.getAccountBalance()));
|
|
|
strs.add(str.toString());
|
|
|
}
|
|
|
|
|
@@ -247,4 +258,27 @@ public class MySQLSecondService {
|
|
|
System.out.println(str);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void contractFundCheckTrade() {
|
|
|
+ List<FundInfo> tgFund = mySqlMapper.getTgFund();
|
|
|
+ List<String> strs = new ArrayList<>();
|
|
|
+ for (FundInfo item : tgFund) {
|
|
|
+ //查询 交易
|
|
|
+ BigDecimal amount = mySqlMapper.getAmountByBusinessNumber(item.getBusinessNumber());
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ str.append(item.getContractNumber() + ";")
|
|
|
+ .append(item.getContractId() + ";")
|
|
|
+ .append(item.getBusinessNumber() + ";")
|
|
|
+ .append(1 == item.getPaymentStatus() ? "未足额" : (2 == item.getPaymentStatus() ? "已交存" : (0 == item.getPaymentStatus() ? "未交存" : "")))
|
|
|
+ .append(";" + item.getPayableAmount() + ";")
|
|
|
+ .append(amount + ";")
|
|
|
+ .append(item.getPayableAmount().compareTo(amount) == 0 ? "是" : "否");
|
|
|
+ strs.add(str.toString());
|
|
|
+ }
|
|
|
+ System.out.flush();
|
|
|
+ for (String str : strs) {
|
|
|
+ System.out.println(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|