Commit 8d5802cb authored by sherlock's avatar sherlock

wpsr

parent f3481ef3
......@@ -56,10 +56,12 @@ public enum FormulaDataSourceType {
TrialBalanceSource(11),
//QMYESource(12),
ModelSource(13),
WPSRSource(33),
TrialBalance(20),
AssetListSource(21);
// FSESource(14),
private Integer code;
FormulaDataSourceType(Integer code) {
......@@ -98,6 +100,8 @@ public enum FormulaDataSourceType {
return FormulaDataSourceType.TrialBalance;
case 21:
return FormulaDataSourceType.AssetListSource;
case 33:
return FormulaDataSourceType.WPSRSource;
default:
return FormulaDataSourceType.Other;
}
......
......@@ -694,13 +694,16 @@ public class ReportServiceImpl {
if (z.getItem2().getItems() != null && !z.getItem2().getItems().isEmpty() && z.getItem2().getItems().get(0).contains("tag")) {
z.getItem2().getItems().forEach(m -> {
ReportCellDataSourceDto dto = JSON.parseObject(m, ReportCellDataSourceDto.class);
if(dto != null && dto.getReportTemplateId() != null && !Pattern.compile("\\D").matcher(dto.getReportTemplateId()).find()){
PeriodTemplateExample periodTemplateExample1 = new PeriodTemplateExample();
periodTemplateExample1.createCriteria().andTemplateIdEqualTo(a.getReportTemplateId())
periodTemplateExample1.createCriteria().andTemplateIdEqualTo(Long.parseLong(dto.getReportTemplateId()))
.andPeriodEqualTo(report.getPeriod());
Optional<PeriodTemplate> optional = periodTemplateMapper.selectByExample(periodTemplateExample1).stream().findFirst();
if(optional.isPresent()){
dto.setReportName(optional.get().getName());
}
}
dataSourceDtoList.add(dto);
});
} else
......
......@@ -127,7 +127,7 @@ public class WPSR extends FunctionBase implements FreeRefFunction {
dto.setColumnName("");
dto.setRowName("");
dto.setReportName(ec.getWorkbook().getSheetName(ec.getSheetIndex()));
dto.setType(FormulaDataSourceType.TrialBalanceSource.getCode());
dto.setType(FormulaDataSourceType.WPSRSource.getCode());
Long dataSourceId = saveDataSource(ec, Lists.newArrayList(dto), FormulaDataSourceDetailType.InputInvoiceDataSourceDto, val, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId());
saveFormulaBlock(formulaContext.getPeriod(), ec, formulaExpression, val, dataSourceId,
......
......@@ -767,8 +767,6 @@
return '贷方发生';
} else if(formula.indexOf('JFFS') > -1){
return '借方发生';
} else if(formula.indexOf('WPSR') > -1){
return 'WPSR';
}
return '';
},
......@@ -797,6 +795,48 @@
alignment: 'center',
width: '30%'
}
];
break;
case enums.formulaDataSourceType.WPSR:
//平衡表数据源
dataGridColumns = [
{
calculateCellValue: function(){
return $scope.projectPeriod
},
// dataField: 'projectPeriod',
caption: $translate.instant('InvoiceQJ'),
alignment: 'center',
width: '10%'
},
{
calculateCellValue: function(){
return 'WPSR';
},
// dataField: 'type',
caption: $translate.instant('类型'),
alignment: 'center',
width: '30%'
},
{
calculateCellValue: function(){
return '';
},
// dataField: 'description',
caption: $translate.instant('描述'),
alignment: 'center',
width: '30%'
},
{
calculateCellValue: function(){
return $scope.detail.cellInfo.money;
},
// dataField: 'value',
caption: $translate.instant('数值'),
alignment: 'center',
width: '30%'
}
];
break;
case enums.formulaDataSourceType.InputInvoice:
......@@ -2105,6 +2145,9 @@
case enums.formulaDataSourceType.OutputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
case enums.formulaDataSourceType.WPSR:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
case enums.formulaDataSourceType.TrialBalanceSource:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
......
......@@ -459,7 +459,7 @@ commonModule.factory('enums', ['$translate', function ($translate) {
Special: 19,
BSPL: 20,
summary: 100
WPSR: 33
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment