Commit 163c68c9 authored by zhkwei's avatar zhkwei

CIT数据处理及查看报表fixbug

parent 566191aa
......@@ -1244,33 +1244,35 @@ public class CitReportServiceImpl extends BaseService {
cellData.setFormulaExp(data.getAmount().toString());
}
cellData.setData(sumValue);
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
cellData.setUpdateTime(new Date());
int i = periodCellDataMapper.updateByPrimaryKeySelective(cellData);
/*kevin insert */ // TODO: 3/21/2019 需要验证
// PeriodCellTemplateConfigExample example = new PeriodCellTemplateConfigExample();
// PeriodCellTemplateConfigExample.Criteria criteria = example.createCriteria();
// criteria.andCellTemplateIdEqualTo(Long.parseLong(data.getCellTemplateId()));
// criteria.andProjectIdEqualTo(data.getProjectId());
// PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
// periodCellTemplateConfig.setParsedFormula(sumValue);
// periodCellTemplateConfigMapper.updateByExampleSelective(periodCellTemplateConfig, example);
// //更改选中行相关数据
// CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
// citJournalEntryAdjust.setIsSelect("1");
// CitJournalEntryAdjustExample example1 = new CitJournalEntryAdjustExample();
// CitJournalEntryAdjustExample.Criteria criteria1 = example1.createCriteria();
// criteria1.andProjectIdEqualTo(data.getProjectId());
// criteria1.andSubjectCodeEqualTo(data.getAccountCode());
// citJournalEntryAdjustMapper.updateByExample(citJournalEntryAdjust, example1);
//
// JournalEntry journalEntry = new JournalEntry();
// journalEntry.setIsSelect("1");
// JournalEntryExample example2 = new JournalEntryExample();
// JournalEntryExample.Criteria criteria2 = example2.createCriteria();
// criteria2.andProjectIdEqualTo(data.getProjectId());
// criteria2.andSegment3EqualTo(data.getAccountCode());
// journalEntryMapper.updateByExample(journalEntry, example2);
if(sumValue !=null){
PeriodCellTemplateConfigExample example = new PeriodCellTemplateConfigExample();
PeriodCellTemplateConfigExample.Criteria criteria = example.createCriteria();
criteria.andCellTemplateIdEqualTo(Long.parseLong(data.getCellTemplateId()));
criteria.andProjectIdEqualTo(data.getProjectId());
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
periodCellTemplateConfig.setParsedFormula(sumValue);
periodCellTemplateConfigMapper.updateByExampleSelective(periodCellTemplateConfig, example);
//更改选中行相关数据
CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
citJournalEntryAdjust.setIsSelect("1");
CitJournalEntryAdjustExample example1 = new CitJournalEntryAdjustExample();
CitJournalEntryAdjustExample.Criteria criteria1 = example1.createCriteria();
criteria1.andProjectIdEqualTo(data.getProjectId());
criteria1.andSubjectCodeEqualTo(data.getAccountCode());
citJournalEntryAdjustMapper.updateByExampleSelective(citJournalEntryAdjust, example1);
JournalEntry journalEntry = new JournalEntry();
journalEntry.setIsSelect("1");
JournalEntryExample example2 = new JournalEntryExample();
JournalEntryExample.Criteria criteria2 = example2.createCriteria();
criteria2.andProjectIdEqualTo(data.getProjectId());
criteria2.andSegment3EqualTo(data.getAccountCode());
journalEntryMapper.updateByExampleSelective(journalEntry, example2);
}
}
List<DataSourceExtendDto> dataSourceExtendDtos = periodDataSourceMapper.getManualDataSource(data.getCellId());
......
......@@ -923,6 +923,9 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isSelect != null">
is_select = #{record.isSelect,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -897,7 +897,8 @@
};
$scope.exportReportTreeOptions = {
dataSource: [{id: '0', templateId: '0', name: '纳税申报表', items: [], expanded: true}],
dataSource: [{id: '0', templateId: '0', name: '纳税申报表', items: [], expanded: true},
{id: '1', templateId: '1', name: '工作底稿', items: [], expanded: true}],
displayExpr: 'name',
keyExpr: 'id',
selectionMode: 'Multiple',
......@@ -916,7 +917,7 @@
$scope.openExportPop = function (evenType) {
$scope.evenType = evenType;
var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType' || g.name == 'WorkingPaperType';
return g.name == 'TaxReturnType';
});
if (!grp || !grp.children) {
......@@ -928,6 +929,19 @@
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType'
});
if (!grp2 || !grp2.children) {
return;
}
$scope.exportReportTreeOptions.dataSource[1].items = [];
$scope.exportReportTreeOptions.dataSource[1].items = _.map(grp2.children, function (item) {
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
var parentElem = angular.element($('#exportReportFilesContainer'));
$scope.exportReportInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
......@@ -958,7 +972,7 @@
//批量导出EXCEL
$scope.export = function () {
debugger;
var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType';
});
......@@ -967,6 +981,14 @@
return;
}
var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType'
});
if (!grp2 || !grp2.children) {
return;
}
if (!$scope.selectedReportIds || $scope.selectedReportIds.length == 0) {
SweetAlert.warning($translate.instant('ExportReportRequiredCheck'));
return;
......@@ -978,6 +1000,10 @@
item.orderIndex = orderIndex;
orderIndex++;
});
_.each(grp2.children, function (item) {
item.orderIndex = orderIndex;
orderIndex++;
});
var reportArray = $scope.selectedReportIds;
......@@ -996,7 +1022,10 @@
var node = _.first(_.where(grp.children, {reportId: currentVal}));
if (!node) {
return;
node = _.first(_.where(grp2.children, {reportId: currentVal}));
if (!node) {
return;
}
}
var reportPromiss = citReportService.getReportData(node.reportId).success(function (reportData) {
......
......@@ -1442,7 +1442,14 @@ constant.GroupTypeList = [
{code: 4, type: "教育费附加"},
{code: 5, type: "地方教育费附加"},
{code: 6, type: "个人所得税"},
{code: 7, type: "国际税"}
{code: 7, type: "水利建设基金"},
{code: 8, type: "文化事业建设费"},
{code: 9, type: "房产税"},
{code: 10, type: "城建土地使用税"},
{code: 11, type: "工会经费"},
{code: 12, type: "残疾人就业保障基金"},
{code: 13, type: "代扣代缴税费"},
{code: 14, type: "国际税"}
];
constant.InvoiceTypeList = [
......
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