|
@@ -336,7 +336,7 @@ public class MySQLService {
|
|
|
|
|
|
//需要判断 什么时候插入的签章信息
|
|
|
if (bxmxy.getCadocid() != null && bxmxy.getCaxyid() != null) {
|
|
|
- Signatory signatory = new Signatory(bxmxy,trusteeshipAgreement);
|
|
|
+ Signatory signatory = new Signatory(bxmxy, trusteeshipAgreement);
|
|
|
List<Signatory> signatoryList = new ArrayList<>();
|
|
|
signatoryList.add(signatory.getSignatory());
|
|
|
signatoryList.add(signatory.getSignatory2());
|
|
@@ -450,8 +450,8 @@ public class MySQLService {
|
|
|
|
|
|
List<RelieveDetail> relieveDetails = new ArrayList<>();
|
|
|
List<OracleRelieveDetail> oracleRelieveDetails = applyMapper.selectRelieveDetails(oracleRelieve.getAppId());
|
|
|
- if (oracleRelieveDetails != null && oracleRelieveDetails.size() > 0
|
|
|
- && oracleRelieveDetails.get(0) != null && !StringUtils.isEmpty(oracleRelieveDetails.get(0).getBuildingNumber())) {
|
|
|
+ if (oracleRelieveDetails != null && oracleRelieveDetails.size() > 0
|
|
|
+ && oracleRelieveDetails.get(0) != null && !StringUtils.isEmpty(oracleRelieveDetails.get(0).getBuildingNumber())) {
|
|
|
StringBuilder relieveBuilding = new StringBuilder();
|
|
|
for (OracleRelieveDetail detail : oracleRelieveDetails) {
|
|
|
BuildingAccount building = buildingAccountMapper.selectByBuildingNumber(detail.getBuildingNumber());
|
|
@@ -460,7 +460,7 @@ public class MySQLService {
|
|
|
relieveDetails.add(relieveDetail);
|
|
|
relieveBuilding.append(building.getBuildingName()).append(",");
|
|
|
}
|
|
|
- String buildingNames = relieveBuilding.toString().substring(0, relieveBuilding.length() -1);
|
|
|
+ String buildingNames = relieveBuilding.toString().substring(0, relieveBuilding.length() - 1);
|
|
|
mySqlMapper.updateRelieveBuilding(relieve.getId(), buildingNames);
|
|
|
mySqlMapper.insertRelieveDetail(relieveDetails);
|
|
|
buildingAccountMapper.updateRelieve(relieveDetails, relieve.getUpdateTime());
|
|
@@ -470,7 +470,7 @@ public class MySQLService {
|
|
|
// ------------------------------ 项目解除审批记录 ----------------------------------
|
|
|
|
|
|
List<ApprovalRecord> approvalRecords = new ArrayList<>();
|
|
|
- List<OracleApprovalRecord> oracleApprovalRecords = applyMapper.selectRelieveRecord(oracleRelieve.getAppId());
|
|
|
+ List<OracleApprovalRecord> oracleApprovalRecords = applyMapper.selectRelieveRecord(oracleRelieve.getAppId());
|
|
|
for (OracleApprovalRecord approval : oracleApprovalRecords) {
|
|
|
ApprovalRecord record = new ApprovalRecord();
|
|
|
record.setBusinessNumber(relieve.getBusinessNumber());
|
|
@@ -794,7 +794,7 @@ public class MySQLService {
|
|
|
|
|
|
/**
|
|
|
* 拨付业务信息导入
|
|
|
- *
|
|
|
+ * <p>
|
|
|
* 监管拨付
|
|
|
* 额度内拨付(apptype=6 flowid=4)
|
|
|
* 业务表只存一条数据 监管出账通知书插入一条数据
|
|
@@ -808,22 +808,22 @@ public class MySQLService {
|
|
|
* 业务表只存一条数据 托管出账通知书插入一条数据
|
|
|
* -----------------------------------------------------------------------------
|
|
|
* 正常拨付:
|
|
|
- * gdaccountid不为空时,即 托管户 -> 监管户 -> 一般户
|
|
|
- * 业务表插入两条数据 1.托管户->监管户 2.监管户->一般户
|
|
|
- * 托管出账通知书 监管入账通知书 监管出账通知书
|
|
|
- *
|
|
|
- * gdaccountid为空时, 即 托管户 -> 账户(这里填入的可能为监管户也可能为一般户,但是统一视为一般户处理)
|
|
|
- * 业务表插入一条数据
|
|
|
- * 托管出账通知书插入一条数据
|
|
|
+ * gdaccountid不为空时,即 托管户 -> 监管户 -> 一般户
|
|
|
+ * 业务表插入两条数据 1.托管户->监管户 2.监管户->一般户
|
|
|
+ * 托管出账通知书 监管入账通知书 监管出账通知书
|
|
|
+ * <p>
|
|
|
+ * gdaccountid为空时, 即 托管户 -> 账户(这里填入的可能为监管户也可能为一般户,但是统一视为一般户处理)
|
|
|
+ * 业务表插入一条数据
|
|
|
+ * 托管出账通知书插入一条数据
|
|
|
* -----------------------------------------------------------------------------
|
|
|
* 额度外拨付(apptype=19 flowid=19)
|
|
|
- * gdaccountid不为空时,即 托管户 -> 监管户 -> 一般户
|
|
|
- * 业务表插入两条数据 1托管户->监管户 2监管户->一般户
|
|
|
- * 托管出账通知书 监管入账通知书 监管出账通知书
|
|
|
- *
|
|
|
- * gdaccountid为空时, 即 托管户 -> 账户(这里填入的可能为监管户也可能为一般户,但是统一视为一般户处理)
|
|
|
- * 业务表插入一条数据
|
|
|
- * 托管出账通知书插入一条数据
|
|
|
+ * gdaccountid不为空时,即 托管户 -> 监管户 -> 一般户
|
|
|
+ * 业务表插入两条数据 1托管户->监管户 2监管户->一般户
|
|
|
+ * 托管出账通知书 监管入账通知书 监管出账通知书
|
|
|
+ * <p>
|
|
|
+ * gdaccountid为空时, 即 托管户 -> 账户(这里填入的可能为监管户也可能为一般户,但是统一视为一般户处理)
|
|
|
+ * 业务表插入一条数据
|
|
|
+ * 托管出账通知书插入一条数据
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void trusteeshipAppropriation() {
|
|
@@ -926,14 +926,11 @@ public class MySQLService {
|
|
|
// 如果是流程结束
|
|
|
if (oracleAppropriation.getFlowState().equals(0)) {
|
|
|
appropriation.setBusinessState(3);
|
|
|
- }
|
|
|
- else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("保存")) {
|
|
|
+ } else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("保存")) {
|
|
|
appropriation.setBusinessState(0);
|
|
|
- }
|
|
|
- else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("托管额度内资金申请上报")) {
|
|
|
+ } else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("托管额度内资金申请上报")) {
|
|
|
appropriation.setBusinessState(1);
|
|
|
- }
|
|
|
- else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("托管额度内资金申请初审不通过")) {
|
|
|
+ } else if (oracleAppropriation.getFlowState().equals(1) && oracleAppropriation.getFlowNodeName().equals("托管额度内资金申请初审不通过")) {
|
|
|
appropriation.setBusinessState(4);
|
|
|
}
|
|
|
|
|
@@ -1058,7 +1055,7 @@ public class MySQLService {
|
|
|
appropriation.setAppropriationType(2);
|
|
|
appropriation.setCollectionType(2);
|
|
|
if (oracleAppropriationDetails != null && oracleAppropriationDetails.size() != 0) {
|
|
|
- appropriation.setCollectionBank(oracleAppropriationDetails.get(0) == null ? "":oracleAppropriationDetails.get(0).getCollectionBank());
|
|
|
+ appropriation.setCollectionBank(oracleAppropriationDetails.get(0) == null ? "" : oracleAppropriationDetails.get(0).getCollectionBank());
|
|
|
appropriation.setCollectionName(oracleAppropriationDetails.get(0).getCollectionName());
|
|
|
appropriation.setCollectionAccount(oracleAppropriationDetails.get(0).getCollectionAccount());
|
|
|
appropriation.setApplicationState(oracleAppropriationDetails.get(0).getPayFlag());
|
|
@@ -1212,7 +1209,7 @@ public class MySQLService {
|
|
|
contract.setProjectName(project.getProjectName());
|
|
|
|
|
|
// 查询房屋信息
|
|
|
- P_lpb_fw fw = fwMapper.getFwByMissid(item.getFWBH(),1);
|
|
|
+ P_lpb_fw fw = fwMapper.getFwByMissid(item.getFWBH(), 1);
|
|
|
|
|
|
// 查询交易表
|
|
|
List<BhtTrade> bhtTrades = oracleMapper.getBhtPayTradeByBHTID(item.getHTID());
|
|
@@ -1239,7 +1236,7 @@ public class MySQLService {
|
|
|
contract.setCollectionAccount(account.getAccount());
|
|
|
contract.setCollectionOpenAddress(account.getOpenAddress());
|
|
|
} else {
|
|
|
- System.out.println(" >>>>>>>> 快来看看,你的数据:"+ item.getHTID());
|
|
|
+ System.out.println(" >>>>>>>> 快来看看,你的数据:" + item.getHTID());
|
|
|
}
|
|
|
|
|
|
contracts.add(contract);
|
|
@@ -1358,14 +1355,14 @@ public class MySQLService {
|
|
|
StringBuilder str = new StringBuilder();
|
|
|
str.append(item.getBusinessNumber())
|
|
|
.append(";" + item.getAccount())
|
|
|
- .append(";" + (item.getType().equals(1)?item.getAmount():0))
|
|
|
- .append(";" + (item.getType().equals(1)?0:item.getAmount()))
|
|
|
+ .append(";" + (item.getType().equals(1) ? item.getAmount() : 0))
|
|
|
+ .append(";" + (item.getType().equals(1) ? 0 : item.getAmount()))
|
|
|
.append(";" + item.getTransactionTime())
|
|
|
- .append(";" + (item.getType().equals(1)?"收入":"支出"));
|
|
|
+ .append(";" + (item.getType().equals(1) ? "收入" : "支出"));
|
|
|
strs.add(str.toString());
|
|
|
}
|
|
|
strs.forEach(System.out::println);
|
|
|
- System.out.println("总计:"+ strs.size());
|
|
|
+ System.out.println("总计:" + strs.size());
|
|
|
}
|
|
|
|
|
|
public void selectOrgAccount() {
|
|
@@ -1379,13 +1376,13 @@ public class MySQLService {
|
|
|
.append(";" + item.getProjectName())
|
|
|
.append(";" + item.getName())
|
|
|
.append(";" + item.getAccount())
|
|
|
- ;
|
|
|
+ ;
|
|
|
strs.add(str.toString());
|
|
|
});
|
|
|
strs.forEach(System.out::println);
|
|
|
}
|
|
|
|
|
|
- public void projectAccount2 () {
|
|
|
+ public void projectAccount2() {
|
|
|
List<ProjectAccountTrade> payments = mySqlMapper.selectPaymentTrade();
|
|
|
|
|
|
BigDecimal ba = new BigDecimal("0");
|
|
@@ -1441,4 +1438,36 @@ public class MySQLService {
|
|
|
|
|
|
strs.forEach(System.out::println);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理合同逾期
|
|
|
+ */
|
|
|
+ @Transactional
|
|
|
+ public void contractOverdueTo() {
|
|
|
+ List<HtInfo> htInfoList = oracleMapper.selectYqHtInfo();
|
|
|
+ List<ContractOverdue> list = new ArrayList<>();
|
|
|
+ for (HtInfo yqht : htInfoList) {
|
|
|
+ //获取逾期合同
|
|
|
+ ContractOverdue overdue = mySqlMapper.getOverdueContract(yqht.getHTBH());
|
|
|
+ if (null == overdue) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ //延期次数大于6次的设置成0次
|
|
|
+ overdue.setOverdueCount(yqht.getCount() > 6 ? 0 : yqht.getCount());
|
|
|
+ overdue.setLoanValidity(yqht.getSdyqdate());
|
|
|
+ overdue.setAccumulationFundValidity(yqht.getGjjyqdate());
|
|
|
+ //查看是否已经交完款 交完款的 逾期设置为
|
|
|
+ if (yqht.getTradeAmount().compareTo(yqht.getHTZJ()) > -1) {
|
|
|
+ overdue.setIsOverdue(1);//正常
|
|
|
+ } else {
|
|
|
+ overdue.setIsOverdue(0);//逾期
|
|
|
+ }
|
|
|
+ list.add(overdue);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!list.isEmpty()){
|
|
|
+ mySqlMapper.insertBatchContractOverdue(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|