|
@@ -1,5 +1,6 @@
|
|
|
package com.huyi.service.supplierCreditLine.controller;
|
|
package com.huyi.service.supplierCreditLine.controller;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -206,12 +207,30 @@ public class SupplierCreditLineController extends BaseController {
|
|
|
String zfsqAmount = zcFinanceSupplierQuota.getZfsqAmount();
|
|
String zfsqAmount = zcFinanceSupplierQuota.getZfsqAmount();
|
|
|
//核心企业授信额度ID
|
|
//核心企业授信额度ID
|
|
|
String zfsqCoreQuotaId = zcFinanceSupplierQuota.getZfsqCoreQuotaId();
|
|
String zfsqCoreQuotaId = zcFinanceSupplierQuota.getZfsqCoreQuotaId();
|
|
|
|
|
+ //还款账户账号
|
|
|
|
|
+ String zfsqAccount = zcFinanceSupplierQuota.getZfsqAccount();
|
|
|
|
|
+ //还款账户开户行
|
|
|
|
|
+ String zfsqAccountBank = zcFinanceSupplierQuota.getZfsqAccountBank();
|
|
|
if (CommonUtil.isEmpty(zfsqCompanyId)){
|
|
if (CommonUtil.isEmpty(zfsqCompanyId)){
|
|
|
throw new Exception("企业名称不能为空");
|
|
throw new Exception("企业名称不能为空");
|
|
|
}
|
|
}
|
|
|
if (CommonUtil.isEmpty(zfsqAmount)){
|
|
if (CommonUtil.isEmpty(zfsqAmount)){
|
|
|
throw new Exception("授信额度不能为空");
|
|
throw new Exception("授信额度不能为空");
|
|
|
}
|
|
}
|
|
|
|
|
+ //企业还款账户账号
|
|
|
|
|
+ if(CommonUtil.isEmpty(zfsqAccount)){
|
|
|
|
|
+ throw new Exception("还款账户账号不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ //还款账户开户行
|
|
|
|
|
+ if(CommonUtil.isEmpty(zfsqAccountBank)){
|
|
|
|
|
+ throw new Exception("还款账户开户行不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (zfsqAccount.length() > 50){
|
|
|
|
|
+ throw new Exception("企业还款账户长度过长");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (zfsqAccountBank.length() > 30){
|
|
|
|
|
+ throw new Exception("企业还款账户开户行长度过长");
|
|
|
|
|
+ }
|
|
|
//查询核心企业授信额度ID下的供应商授信额度总和
|
|
//查询核心企业授信额度ID下的供应商授信额度总和
|
|
|
QueryWrapper<ZcFinanceSupplierQuota> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ZcFinanceSupplierQuota> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("zfsq_core_quota_id",zfsqCoreQuotaId);
|
|
queryWrapper.eq("zfsq_core_quota_id",zfsqCoreQuotaId);
|
|
@@ -316,6 +335,8 @@ public class SupplierCreditLineController extends BaseController {
|
|
|
List<String> columnName = new ArrayList<>();
|
|
List<String> columnName = new ArrayList<>();
|
|
|
columnName.add("企业名称");
|
|
columnName.add("企业名称");
|
|
|
columnName.add("企业统一社会信用代码");
|
|
columnName.add("企业统一社会信用代码");
|
|
|
|
|
+ columnName.add("还款账户账号");
|
|
|
|
|
+ columnName.add("还款账户开户行");
|
|
|
columnName.add("授信额度");
|
|
columnName.add("授信额度");
|
|
|
int columnNumber = columnName.size();
|
|
int columnNumber = columnName.size();
|
|
|
for(String width:columnName){
|
|
for(String width:columnName){
|
|
@@ -362,6 +383,8 @@ public class SupplierCreditLineController extends BaseController {
|
|
|
List<String> columnName = new ArrayList<>();
|
|
List<String> columnName = new ArrayList<>();
|
|
|
columnName.add("scyName");
|
|
columnName.add("scyName");
|
|
|
columnName.add("scySocialCode");
|
|
columnName.add("scySocialCode");
|
|
|
|
|
+ columnName.add("zfsqAccount");
|
|
|
|
|
+ columnName.add("zfsqAccountBank");
|
|
|
columnName.add("zfsqAmount");
|
|
columnName.add("zfsqAmount");
|
|
|
//excel数据
|
|
//excel数据
|
|
|
List<Map<String,String>> templateData = ExcelFileUtils.readExecleasy(file,columnName,1);
|
|
List<Map<String,String>> templateData = ExcelFileUtils.readExecleasy(file,columnName,1);
|
|
@@ -384,6 +407,10 @@ public class SupplierCreditLineController extends BaseController {
|
|
|
String scyName = CommonUtil.objToString(map.get("scyName"));
|
|
String scyName = CommonUtil.objToString(map.get("scyName"));
|
|
|
//企业统一代码
|
|
//企业统一代码
|
|
|
String scySocialCode = CommonUtil.objToString(map.get("scySocialCode"));
|
|
String scySocialCode = CommonUtil.objToString(map.get("scySocialCode"));
|
|
|
|
|
+ //还款账户账号
|
|
|
|
|
+ String zfsqAccount = CommonUtil.objToString(map.get("zfsqAccount"));
|
|
|
|
|
+ //还款账户开户行
|
|
|
|
|
+ String zfsqAccountBank = CommonUtil.objToString(map.get("zfsqAccountBank"));
|
|
|
//授信额度
|
|
//授信额度
|
|
|
String zfsqAmount = CommonUtil.objToString(map.get("zfsqAmount"));
|
|
String zfsqAmount = CommonUtil.objToString(map.get("zfsqAmount"));
|
|
|
if(CommonUtil.isEmpty(scyName)){
|
|
if(CommonUtil.isEmpty(scyName)){
|
|
@@ -391,10 +418,30 @@ public class SupplierCreditLineController extends BaseController {
|
|
|
throw new Exception("<br/>第" + (i+1) + "行数据企业名称为空") ;
|
|
throw new Exception("<br/>第" + (i+1) + "行数据企业名称为空") ;
|
|
|
}
|
|
}
|
|
|
if(CommonUtil.isEmpty(scySocialCode)){
|
|
if(CommonUtil.isEmpty(scySocialCode)){
|
|
|
-
|
|
|
|
|
failureNum++;
|
|
failureNum++;
|
|
|
throw new Exception("<br/>第" + (i+1) + "行数据企业统一代码为空") ;
|
|
throw new Exception("<br/>第" + (i+1) + "行数据企业统一代码为空") ;
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ //企业还款账户账号
|
|
|
|
|
+ if(CommonUtil.isEmpty(zfsqAccount)){
|
|
|
|
|
+ failureNum++;
|
|
|
|
|
+ throw new Exception("<br/>第" + (i+1) + "还款账户账号不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ //还款账户开户行
|
|
|
|
|
+ if(CommonUtil.isEmpty(zfsqAccountBank)){
|
|
|
|
|
+ failureNum++;
|
|
|
|
|
+ throw new Exception("<br/>第" + (i+1) + "还款账户开户行不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (zfsqAccount.length() > 50){
|
|
|
|
|
+ failureNum++;
|
|
|
|
|
+ throw new Exception("<br/>第" + (i+1) + "企业还款账户长度过长");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (zfsqAccountBank.length() > 30){
|
|
|
|
|
+ failureNum++;
|
|
|
|
|
+ throw new Exception("<br/>第" + (i+1) + "企业还款账户开户行长度过长");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(AmtUtil.isMoney(zfsqAmount) == false){
|
|
|
|
|
+ failureNum++;
|
|
|
|
|
+ throw new Exception("<br/>第" + (i+1) + "行数据金额格式正确") ;
|
|
|
}
|
|
}
|
|
|
//查询此企业是否存在
|
|
//查询此企业是否存在
|
|
|
queryWrapper.eq(SysCompany::getScyName,scyName);
|
|
queryWrapper.eq(SysCompany::getScyName,scyName);
|