|
@@ -172,7 +172,7 @@ public class MySQLSecondService {
|
|
List<Map<String, Object>> buildingInfo = mySqlMapper.selectBuildingBy((Long) map.get("id"), (Long) account.get("id"));
|
|
List<Map<String, Object>> buildingInfo = mySqlMapper.selectBuildingBy((Long) map.get("id"), (Long) account.get("id"));
|
|
for (Map<String, Object> building : buildingInfo) {
|
|
for (Map<String, Object> building : buildingInfo) {
|
|
//监管转托管
|
|
//监管转托管
|
|
- BigDecimal zgToTg = oracleMapper.sumByZgToTg((String)(building.get("building_number")));
|
|
|
|
|
|
+ BigDecimal zgToTg = oracleMapper.sumByZgToTg((String) (building.get("building_number")));
|
|
zgToTg = null == zgToTg ? BigDecimal.ZERO : zgToTg;
|
|
zgToTg = null == zgToTg ? BigDecimal.ZERO : zgToTg;
|
|
//交存
|
|
//交存
|
|
BigDecimal jc = oracleMapper.sumByJc((String) building.get("building_number"));
|
|
BigDecimal jc = oracleMapper.sumByJc((String) building.get("building_number"));
|
|
@@ -187,11 +187,11 @@ public class MySQLSecondService {
|
|
StringBuilder str = new StringBuilder();
|
|
StringBuilder str = new StringBuilder();
|
|
String buildingName = String.valueOf(building.get("building_name"));
|
|
String buildingName = String.valueOf(building.get("building_name"));
|
|
BigDecimal cz = BigDecimal.ZERO;
|
|
BigDecimal cz = BigDecimal.ZERO;
|
|
- if(!(hj.compareTo(accountBalance) == 0)){
|
|
|
|
|
|
+ if (!(hj.compareTo(accountBalance) == 0)) {
|
|
cz = hj.subtract(accountBalance);
|
|
cz = hj.subtract(accountBalance);
|
|
}
|
|
}
|
|
str.append(building.get("project_name").toString())
|
|
str.append(building.get("project_name").toString())
|
|
- .append(";"+building.get("project_number").toString())
|
|
|
|
|
|
+ .append(";" + building.get("project_number").toString())
|
|
.append(";" + buildingName)
|
|
.append(";" + buildingName)
|
|
.append(";" + building.get("building_number").toString())
|
|
.append(";" + building.get("building_number").toString())
|
|
.append(";" + zgToTg)
|
|
.append(";" + zgToTg)
|
|
@@ -199,7 +199,7 @@ public class MySQLSecondService {
|
|
.append(";" + bf)
|
|
.append(";" + bf)
|
|
.append(";" + hj)
|
|
.append(";" + hj)
|
|
.append(";" + accountBalance)
|
|
.append(";" + accountBalance)
|
|
- .append(";" + (hj.compareTo(accountBalance) == 0 ? "是" :"否"))
|
|
|
|
|
|
+ .append(";" + (hj.compareTo(accountBalance) == 0 ? "是" : "否"))
|
|
.append(";" + (hj.compareTo(accountBalance) == 0 ? "" : cz));
|
|
.append(";" + (hj.compareTo(accountBalance) == 0 ? "" : cz));
|
|
System.out.println(str.toString());
|
|
System.out.println(str.toString());
|
|
list.add(str.toString());
|
|
list.add(str.toString());
|
|
@@ -210,4 +210,41 @@ public class MySQLSecondService {
|
|
System.out.println(str);
|
|
System.out.println(str);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 银行账户对账
|
|
|
|
+ */
|
|
|
|
+ public void bankAccountChecing() {
|
|
|
|
+ List<Account> list = mySqlMapper.selectTgAccountInfo();
|
|
|
|
+ List<Account> wdzJc = oracleMapper.getWdzJc();
|
|
|
|
+ List<Account> wdzBf = oracleMapper.getWdzBf();
|
|
|
|
+ List<String> strs = new ArrayList<>();
|
|
|
|
+ for (Account account : list) {
|
|
|
|
+ //未对账的交存
|
|
|
|
+ BigDecimal jc = BigDecimal.ZERO;
|
|
|
|
+ if (wdzJc != null && !wdzJc.isEmpty()) {
|
|
|
|
+ Account jcAccount = wdzJc.stream().filter(t -> !StringUtils.isEmpty(t.getBankCode()) && t.getBankCode().equals(account.getBankCode())).findFirst().orElse(null);
|
|
|
|
+ jc = null != jcAccount ? jcAccount.getBalance() : BigDecimal.ZERO;
|
|
|
|
+ }
|
|
|
|
+ //未对账的拨付
|
|
|
|
+ BigDecimal bf = BigDecimal.ZERO;
|
|
|
|
+ if (wdzBf != null && !wdzBf.isEmpty()) {
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
|
+ str.append(account.getBankName())
|
|
|
|
+ .append(";" + account.getBankCode())
|
|
|
|
+ .append(";" + jc)
|
|
|
|
+ .append(";" + bf)
|
|
|
|
+ .append(";" + account.getBalance())
|
|
|
|
+ .append(";" + account.getAccountBalance())
|
|
|
|
+ .append(";" + ((account.getBalance().subtract(jc)).add(bf)).subtract(account.getAccountBalance()));
|
|
|
|
+ strs.add(str.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (String str : strs) {
|
|
|
|
+ System.out.println(str);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|