|
@@ -53,94 +53,90 @@ public class MySQLSecondService {
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void refundTo() {
|
|
|
- System.out.println("===============fc_refund 导入数据开始=================");
|
|
|
- // 获取结束节点
|
|
|
- ApprovalFlow approvalFlow = flowMapper.selectFlowByType(6); //合同退款
|
|
|
- ApprovalNode endNode = new ApprovalNode();
|
|
|
- List<ApprovalNode> approvalNodeList = flowMapper.selectNodeByFlowNumber(approvalFlow.getFlowNumber());
|
|
|
- for (ApprovalNode node : approvalNodeList) {
|
|
|
- if (node.getNumber() == 4) {
|
|
|
- endNode = node;
|
|
|
- }
|
|
|
- }
|
|
|
+// System.out.println("===============fc_refund 导入数据开始=================");
|
|
|
+// // 获取结束节点
|
|
|
+// ApprovalFlow approvalFlow = flowMapper.selectFlowByType(6); //合同退款
|
|
|
+// ApprovalNode endNode = new ApprovalNode();
|
|
|
+// List<ApprovalNode> approvalNodeList = flowMapper.selectNodeByFlowNumber(approvalFlow.getFlowNumber());
|
|
|
+// for (ApprovalNode node : approvalNodeList) {
|
|
|
+// if (node.getNumber() == 4) {
|
|
|
+// endNode = node;
|
|
|
+// }
|
|
|
+// }
|
|
|
List<TkInfo> htTkList = oracleMapper.selectHtTk();
|
|
|
- for (TkInfo item : htTkList) {
|
|
|
- Integer qybh = StringUtils.isEmpty(item.getQybh()) ? null : Integer.valueOf(item.getQybh());
|
|
|
- Org org = qyxxMapper.selectOrgByMisid(qybh);
|
|
|
- if (org == null) { //测试用
|
|
|
- org = new Org();
|
|
|
- org.setId(3);
|
|
|
- org.setOrgName("山东酷邦软件有限公司");
|
|
|
- }
|
|
|
- BuildingAccount buildingAccount = null;
|
|
|
- if (!StringUtils.isEmpty(item.getLzbh())) {
|
|
|
- buildingAccount = buildingAccountMapper.getInfoByLZBH(item.getLzbh());
|
|
|
- }
|
|
|
- Long projectAccountId = (null != buildingAccount && null != buildingAccount.getProjectAccountId()) ? buildingAccount.getProjectAccountId() : null;
|
|
|
- ProjectAccount projectAccount = null;
|
|
|
- if (null != projectAccountId) {
|
|
|
- projectAccount = projectAccountMapper.getInfoById(projectAccountId);
|
|
|
- }
|
|
|
- Account account = null;
|
|
|
- if (!StringUtils.isEmpty(item.getAccountNo())) {
|
|
|
- account = accountMapper.selectByAccountNO(item.getAccountNo());
|
|
|
- }
|
|
|
- ContractInfo contract = null;
|
|
|
- if (!StringUtils.isEmpty(item.getHtBh())) {
|
|
|
- contract = mySqlMapper.getInfoByNumber(item.getHtBh());
|
|
|
- }
|
|
|
- Refund refund = new Refund(item, org, projectAccount, account, contract, buildingAccount);
|
|
|
- //定金退款的
|
|
|
- if (null == item.getMoney()) {
|
|
|
- refund.setAppropriationStatus("0");
|
|
|
- } else {
|
|
|
- refund.setAppropriationStatus("1");
|
|
|
- }
|
|
|
- // 如果是流程结束
|
|
|
- if (item.getFLOWSTATE().equals("0")) {
|
|
|
- refund.setBusinessState(3);
|
|
|
- }
|
|
|
- if (item.getFLOWSTATE().equals("1")) {
|
|
|
- refund.setBusinessState(2);
|
|
|
- }
|
|
|
- refund.setFlowNumber(approvalFlow.getFlowNumber());
|
|
|
- refund.setFlowNodeId(endNode.getId());
|
|
|
- refund.setFlowNodeName(endNode.getNodeName());
|
|
|
- if (!StringUtils.isEmpty(item.getFWBH())) {
|
|
|
- P_lpb_fw fw = fwMapper.getFwByMissid(item.getFWBH(), null);
|
|
|
- if (null != fw) {
|
|
|
- refund.setHouseAddress(fw.getXxdz());
|
|
|
- }
|
|
|
- }
|
|
|
- mySqlMapper.insertRefund(refund);
|
|
|
-
|
|
|
- // 插入审批记录
|
|
|
- List<ApprovalRecord> records = new ArrayList<>();
|
|
|
- List<OracleApprovalRecord> oracleApprovalRecords =
|
|
|
- applyMapper.selectApprovalRecords_8(item.getAPPID());
|
|
|
- if (oracleApprovalRecords != null && oracleApprovalRecords.size() > 0
|
|
|
- && oracleApprovalRecords.get(0) != null
|
|
|
- && !StringUtils.isEmpty(oracleApprovalRecords.get(0).getNodeName())) {
|
|
|
- for (OracleApprovalRecord oracleApprovalRecord : oracleApprovalRecords) {
|
|
|
- ApprovalRecord record = new ApprovalRecord();
|
|
|
- record.setBusinessNumber(item.getBusinessNumber());
|
|
|
- record.setFlowNumber(approvalFlow.getFlowNumber());
|
|
|
- record.setNodeId(endNode.getId());
|
|
|
- if (!StringUtils.isEmpty(oracleApprovalRecord.getNodeName())) {
|
|
|
- record.setNodeName(oracleApprovalRecord.getNodeName());
|
|
|
- }
|
|
|
- record.setApprover(oracleApprovalRecord.getApprover());
|
|
|
- record.setApprovalTime(oracleApprovalRecord.getApprovalTime());
|
|
|
- record.setTableId(refund.getId());
|
|
|
- if (oracleApprovalRecord.getApprovalStatus() != null) {
|
|
|
- record.setApprovalStatus(1);
|
|
|
- }
|
|
|
- record.setApprovalRemark(oracleApprovalRecord.getRemark());
|
|
|
- records.add(record);
|
|
|
- }
|
|
|
- flowMapper.insertRecordBatch(records);
|
|
|
- }
|
|
|
- }
|
|
|
+// for (TkInfo item : htTkList) {
|
|
|
+// Integer qybh = StringUtils.isEmpty(item.getQybh()) ? null : Integer.valueOf(item.getQybh());
|
|
|
+// Org org = qyxxMapper.selectOrgByMisid(qybh);
|
|
|
+//
|
|
|
+// BuildingAccount buildingAccount = null;
|
|
|
+// if (!StringUtils.isEmpty(item.getLzbh())) {
|
|
|
+// buildingAccount = buildingAccountMapper.getInfoByLZBH(item.getLzbh());
|
|
|
+// }
|
|
|
+// Long projectAccountId = (null != buildingAccount && null != buildingAccount.getProjectAccountId()) ? buildingAccount.getProjectAccountId() : null;
|
|
|
+// ProjectAccount projectAccount = null;
|
|
|
+// if (null != projectAccountId) {
|
|
|
+// projectAccount = projectAccountMapper.getInfoById(projectAccountId);
|
|
|
+// }
|
|
|
+// Account account = null;
|
|
|
+// if (!StringUtils.isEmpty(item.getAccountNo())) {
|
|
|
+// account = accountMapper.selectByAccountNO(item.getAccountNo());
|
|
|
+// }
|
|
|
+// ContractInfo contract = null;
|
|
|
+// if (!StringUtils.isEmpty(item.getHtBh())) {
|
|
|
+// contract = mySqlMapper.getInfoByNumber(item.getHtBh());
|
|
|
+// }
|
|
|
+// Refund refund = new Refund(item, org, projectAccount, account, contract, buildingAccount);
|
|
|
+// //定金退款的
|
|
|
+// if (null == item.getMoney()) {
|
|
|
+// refund.setAppropriationStatus("0");
|
|
|
+// } else {
|
|
|
+// refund.setAppropriationStatus("1");
|
|
|
+// }
|
|
|
+// // 如果是流程结束
|
|
|
+// if (item.getFLOWSTATE().equals("0")) {
|
|
|
+// refund.setBusinessState(3);
|
|
|
+// }
|
|
|
+// if (item.getFLOWSTATE().equals("1")) {
|
|
|
+// refund.setBusinessState(2);
|
|
|
+// }
|
|
|
+// refund.setFlowNumber(approvalFlow.getFlowNumber());
|
|
|
+// refund.setFlowNodeId(endNode.getId());
|
|
|
+// refund.setFlowNodeName(endNode.getNodeName());
|
|
|
+// if (!StringUtils.isEmpty(item.getFWBH())) {
|
|
|
+// P_lpb_fw fw = fwMapper.getFwByMissid(item.getFWBH(), null);
|
|
|
+// if (null != fw) {
|
|
|
+// refund.setHouseAddress(fw.getXxdz());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// mySqlMapper.insertRefund(refund);
|
|
|
+//
|
|
|
+// // 插入审批记录
|
|
|
+// List<ApprovalRecord> records = new ArrayList<>();
|
|
|
+// List<OracleApprovalRecord> oracleApprovalRecords =
|
|
|
+// applyMapper.selectApprovalRecords_8(item.getAPPID());
|
|
|
+// if (oracleApprovalRecords != null && oracleApprovalRecords.size() > 0
|
|
|
+// && oracleApprovalRecords.get(0) != null
|
|
|
+// && !StringUtils.isEmpty(oracleApprovalRecords.get(0).getNodeName())) {
|
|
|
+// for (OracleApprovalRecord oracleApprovalRecord : oracleApprovalRecords) {
|
|
|
+// ApprovalRecord record = new ApprovalRecord();
|
|
|
+// record.setBusinessNumber(item.getBusinessNumber());
|
|
|
+// record.setFlowNumber(approvalFlow.getFlowNumber());
|
|
|
+// record.setNodeId(endNode.getId());
|
|
|
+// if (!StringUtils.isEmpty(oracleApprovalRecord.getNodeName())) {
|
|
|
+// record.setNodeName(oracleApprovalRecord.getNodeName());
|
|
|
+// }
|
|
|
+// record.setApprover(oracleApprovalRecord.getApprover());
|
|
|
+// record.setApprovalTime(oracleApprovalRecord.getApprovalTime());
|
|
|
+// record.setTableId(refund.getId());
|
|
|
+// if (oracleApprovalRecord.getApprovalStatus() != null) {
|
|
|
+// record.setApprovalStatus(1);
|
|
|
+// }
|
|
|
+// record.setApprovalRemark(oracleApprovalRecord.getRemark());
|
|
|
+// records.add(record);
|
|
|
+// }
|
|
|
+// flowMapper.insertRecordBatch(records);
|
|
|
+// }
|
|
|
+// }
|
|
|
System.out.println("===============fc_refund数据匹配结束=================");
|
|
|
}
|
|
|
|
|
@@ -214,6 +210,7 @@ public class MySQLSecondService {
|
|
|
public void accountChecking() {
|
|
|
List<Map<String, Object>> tgXm = mySqlMapper.selectTgXm();
|
|
|
List<String> list = new ArrayList<>();
|
|
|
+ list.add("项目名称;项目编号;楼幢名称;楼幢编号;监管资金转托管;交存资金;拨付资金;计算余额;账户余额;是否一致;余额差值");
|
|
|
for (Map<String, Object> map : tgXm) {
|
|
|
List<Map<String, Object>> xmAccount = mySqlMapper.selectXmAccountByProjectId((Long) map.get("id"));
|
|
|
for (Map<String, Object> account : xmAccount) {
|
|
@@ -248,8 +245,8 @@ public class MySQLSecondService {
|
|
|
.append(";" + hj)
|
|
|
.append(";" + accountBalance)
|
|
|
.append(";" + (hj.compareTo(accountBalance) == 0 ? "是" : "否"))
|
|
|
- .append(";" + (hj.compareTo(accountBalance) == 0 ? "" : cz));
|
|
|
- System.out.println(str.toString());
|
|
|
+ .append(";" + (hj.compareTo(accountBalance) == 0 ? "0" : cz));
|
|
|
+ // System.out.println(str.toString());
|
|
|
list.add(str.toString());
|
|
|
}
|
|
|
}
|
|
@@ -267,6 +264,7 @@ public class MySQLSecondService {
|
|
|
List<Account> wdzJc = oracleMapper.getWdzJc();
|
|
|
List<Account> wdzBf = oracleMapper.getWdzBf();
|
|
|
List<String> strs = new ArrayList<>();
|
|
|
+ strs.add("银行名称;银行编号;已计算余额;系统未对账的交存;系统未对账的拨付;其他金额;账户余额;差值");
|
|
|
//处理特殊的对账
|
|
|
//1、寿光农商银行 缺失的 定金626475.6 (银行流水号 = 041002202216625184199811) 手续费0.44(银行流水号= 041002202216655621675571) (总的楼栋户的合计 比 账户余额少 这两笔 需要加上这两笔 )
|
|
|
//2、中国建设银行股份有限公司寿光支行 bankCode:02 手续费 -200(银行流水号= 021002202216625378315471) (总的楼栋户的合计 比对完账的账户余额 多200 总的楼栋户合计需要加上这个-200)
|
|
@@ -302,10 +300,10 @@ public class MySQLSecondService {
|
|
|
StringBuilder str = new StringBuilder();
|
|
|
str.append(account.getBankName())
|
|
|
.append(";" + account.getBankCode())
|
|
|
+ .append(";" + account.getBalance())
|
|
|
.append(";" + jc)
|
|
|
.append(";" + bf)
|
|
|
.append(";" + otherTypeAmount)
|
|
|
- .append(";" + account.getBalance())
|
|
|
.append(";" + account.getAccountBalance())
|
|
|
.append(";" + ((account.getBalance().subtract(jc)).add(bf).add(otherTypeAmount)).subtract(account.getAccountBalance()));
|
|
|
strs.add(str.toString());
|
|
@@ -368,6 +366,8 @@ public class MySQLSecondService {
|
|
|
relieve.setBusinessState(1);
|
|
|
} else if (oracleRelieve.getFlowState().equals(1) && oracleRelieve.getFlowNodeName().equals("保存")) {
|
|
|
relieve.setBusinessState(0);
|
|
|
+ } else if (oracleRelieve.getFlowState().equals(1) && oracleRelieve.getFlowNodeName().equals("解除楼幢初审通过")) {
|
|
|
+ relieve.setBusinessState(2);
|
|
|
} else if (oracleRelieve.getFlowState().equals(1)) {
|
|
|
throw new RuntimeException("解除项目异常:" + oracleRelieve.getFlowNodeName());
|
|
|
}
|