|
|
|
@ -23,8 +23,9 @@ import com.sztzjy.digital_credit.service.StuEnterPriseByInfoEntryService;
|
|
|
|
|
import com.sztzjy.digital_credit.service.StuPersonalCreditService;
|
|
|
|
|
import com.sztzjy.digital_credit.service.StuRateService;
|
|
|
|
|
import com.sztzjy.digital_credit.util.ConvertUtil;
|
|
|
|
|
import com.sztzjy.digital_credit.util.MyExcelListener;
|
|
|
|
|
|
|
|
|
|
import com.sztzjy.digital_credit.util.ResultEntity;
|
|
|
|
|
import com.sztzjy.digital_credit.util.excel.MyExcelListener;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.annotation.Id;
|
|
|
|
@ -342,20 +343,20 @@ public class StuEnterPriseByInfoEntryServiceImpl implements StuEnterPriseByInfoE
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity importFinancialStatements(MultipartFile file, String module) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//获取文件的输入流
|
|
|
|
|
EasyExcel.read(file.getInputStream(), StuFinancialStatements.class, new MyExcelListener(financialStatementsMapper,module)).sheet().doRead();
|
|
|
|
|
|
|
|
|
|
return new ResultEntity(HttpStatus.OK,"导入成功!");
|
|
|
|
|
|
|
|
|
|
}catch (IOException exception){
|
|
|
|
|
return new ResultEntity(HttpStatus.BAD_REQUEST,"导入失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// @Override
|
|
|
|
|
// public ResultEntity importFinancialStatements(MultipartFile file, String module) {
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// try {
|
|
|
|
|
// //获取文件的输入流
|
|
|
|
|
// EasyExcel.read(file.getInputStream(), StuFinancialStatements.class, new MyExcelListener(financialStatementsMapper,module)).sheet().doRead();
|
|
|
|
|
//
|
|
|
|
|
// return new ResultEntity(HttpStatus.OK,"导入成功!");
|
|
|
|
|
//
|
|
|
|
|
// }catch (IOException exception){
|
|
|
|
|
// return new ResultEntity(HttpStatus.BAD_REQUEST,"导入失败!");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询财务报表
|
|
|
|
@ -867,6 +868,114 @@ public class StuEnterPriseByInfoEntryServiceImpl implements StuEnterPriseByInfoE
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 财务指标盈利能力查询
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getFinancialProfitAbilitySelect(String userId) {
|
|
|
|
|
|
|
|
|
|
StuProfitAbilityExample profitAbilityExample = new StuProfitAbilityExample();
|
|
|
|
|
profitAbilityExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
List<StuProfitAbility> profitAbilityList = profitAbilityMapper.selectByExample(profitAbilityExample);
|
|
|
|
|
if (profitAbilityList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,profitAbilityList.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 财务指标盈利能力查询
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getFinancialSolvencySelect(String userId) {
|
|
|
|
|
|
|
|
|
|
StuSolvencyExample solvencyExample = new StuSolvencyExample();
|
|
|
|
|
solvencyExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
List<StuSolvency> stuSolvencyList = solvencyMapper.selectByExample(solvencyExample);
|
|
|
|
|
if (stuSolvencyList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,stuSolvencyList.get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 财务指标营运能力查询
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getFinancialOperatingCapacitySelect(String userId) {
|
|
|
|
|
//查询有无数据,有数据就更新,没有数据就保存
|
|
|
|
|
StuOperatingCapacityExample operatingCapacityExample = new StuOperatingCapacityExample();
|
|
|
|
|
operatingCapacityExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
List<StuOperatingCapacity> operatingCapacityList = operatingCapacityMapper.selectByExample(operatingCapacityExample);
|
|
|
|
|
|
|
|
|
|
if (operatingCapacityList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,operatingCapacityList.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 财务指标成长能力查询
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getFinancialGrowthAbilitySelect(String userId) {
|
|
|
|
|
StuGrowthAbilityExample growthAbilityExample = new StuGrowthAbilityExample();
|
|
|
|
|
growthAbilityExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
List<StuGrowthAbility> growthAbilityList = growthAbilityMapper.selectByExample(growthAbilityExample);
|
|
|
|
|
if (growthAbilityList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,growthAbilityList.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 财务指标杜邦分析查询
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getFinancialDuPontAnalysisSelect(String userId) {
|
|
|
|
|
StuDuPontAnalysisExample duPontAnalysisExample = new StuDuPontAnalysisExample();
|
|
|
|
|
duPontAnalysisExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<StuDuPontAnalysis> duPontAnalysisList = duPontAnalysisMapper.selectByExample(duPontAnalysisExample);
|
|
|
|
|
if (duPontAnalysisList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,duPontAnalysisList.get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//财务指标杜邦分析提交算分
|
|
|
|
|
private StuDuPontAnalysis financialDuPontAnalysisCheck(StuDuPontAnalysis duPontAnalysis) {
|
|
|
|
|
int sum = 0;
|
|
|
|
|