Commit e4f16299 authored by zhkwei's avatar zhkwei

1、ZC公式;2、数据导入分发

parent d51f078a
...@@ -307,16 +307,16 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -307,16 +307,16 @@ public class CitImportExcelServiceImpl extends BaseService {
//覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态 //覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态
msg = "覆盖导入成功"; msg = "覆盖导入成功";
CitJournalEntryAdjustExample citJEAExample = new CitJournalEntryAdjustExample(); CitJournalEntryAdjustExample citJEAExample = new CitJournalEntryAdjustExample();
citJEAExample.createCriteria().andCreatedByEqualTo(currentUserName).andPeriodEqualTo(period).andProjectIdEqualTo(project.getId()); citJEAExample.createCriteria().andPeriodEqualTo(period).andProjectIdEqualTo(project.getId());
logger.info("删除符合条件的日记账"); logger.info("删除符合条件的日记账");
citJournalEntryAdjustMapper.deleteByExample(citJEAExample); citJournalEntryAdjustMapper.deleteByExample(citJEAExample);
//删除自动生成的试算平衡表相关数据 //删除自动生成的试算平衡表相关数据
CitTrialBalanceExample citTbExample = new CitTrialBalanceExample(); CitTrialBalanceExample citTbExample = new CitTrialBalanceExample();
citTbExample.createCriteria().andPeriodEqualTo(period).andCreateByEqualTo(currentUserName).andProjectIdEqualTo(project.getId()); citTbExample.createCriteria().andPeriodEqualTo(period).andProjectIdEqualTo(project.getId());
int deleteByExample = citTrialBalanceMapper.deleteByExample(citTbExample); int deleteByExample = citTrialBalanceMapper.deleteByExample(citTbExample);
logger.info("删除符合条件的试算平衡表数据"); logger.info("删除符合条件的试算平衡表数据");
CitTbamExample citTbamExample = new CitTbamExample(); CitTbamExample citTbamExample = new CitTbamExample();
citTbamExample.createCriteria().andPeriodEqualTo(period).andCreateByEqualTo(currentUserName).andProjectIdEqualTo(project.getId()); citTbamExample.createCriteria().andPeriodEqualTo(period).andProjectIdEqualTo(project.getId());
logger.info("删除符合条件的试算平衡表Mapping数据"); logger.info("删除符合条件的试算平衡表Mapping数据");
citTbamMapper.deleteByExample(citTbamExample); citTbamMapper.deleteByExample(citTbamExample);
updateImportLog(EnumCitImportType.JournalAdjust.getCode()); updateImportLog(EnumCitImportType.JournalAdjust.getCode());
...@@ -504,7 +504,6 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -504,7 +504,6 @@ public class CitImportExcelServiceImpl extends BaseService {
msg = "覆盖导入成功"; msg = "覆盖导入成功";
CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample(); CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample();
CitTrialBalanceExample.Criteria criteria = citTrialBalanceExample.createCriteria(); CitTrialBalanceExample.Criteria criteria = citTrialBalanceExample.createCriteria();
criteria.andCreateByEqualTo(currentUserName);
criteria.andPeriodEqualTo(period); criteria.andPeriodEqualTo(period);
criteria.andProjectIdIn(projectIdList); criteria.andProjectIdIn(projectIdList);
citTrialBalanceMapper.deleteByExample(citTrialBalanceExample); citTrialBalanceMapper.deleteByExample(citTrialBalanceExample);
...@@ -1448,11 +1447,11 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1448,11 +1447,11 @@ public class CitImportExcelServiceImpl extends BaseService {
Project project = projectMapper.selectByPrimaryKey(projectId); Project project = projectMapper.selectByPrimaryKey(projectId);
//删除自动生成的试算平衡表相关数据 //删除自动生成的试算平衡表相关数据
CitTrialBalanceExample citTbExample = new CitTrialBalanceExample(); CitTrialBalanceExample citTbExample = new CitTrialBalanceExample();
citTbExample.createCriteria().andPeriodEqualTo(project.getYear()).andCreateByEqualTo(authUserHelper.getCurrentAuditor().get()).andProjectIdEqualTo(projectId); citTbExample.createCriteria().andPeriodEqualTo(project.getYear()).andProjectIdEqualTo(projectId);
citTrialBalanceMapper.deleteByExample(citTbExample); citTrialBalanceMapper.deleteByExample(citTbExample);
logger.info("删除符合条件的试算平衡表数据"); logger.info("删除符合条件的试算平衡表数据");
CitTbamExample citTbamExample = new CitTbamExample(); CitTbamExample citTbamExample = new CitTbamExample();
citTbamExample.createCriteria().andPeriodEqualTo(project.getYear()).andCreateByEqualTo(authUserHelper.getCurrentAuditor().get()).andProjectIdEqualTo(projectId); citTbamExample.createCriteria().andPeriodEqualTo(project.getYear()).andProjectIdEqualTo(projectId);
logger.info("删除符合条件的试算平衡表Mapping数据"); logger.info("删除符合条件的试算平衡表Mapping数据");
citTbamMapper.deleteByExample(citTbamExample); citTbamMapper.deleteByExample(citTbamExample);
updateImportLog(EnumCitImportType.JournalAdjust.getCode()); updateImportLog(EnumCitImportType.JournalAdjust.getCode());
......
...@@ -89,10 +89,10 @@ if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){ ...@@ -89,10 +89,10 @@ if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){
dataSource.add(assetDetailDataSourceDto); dataSource.add(assetDetailDataSourceDto);
} }
dataSource = dataSource.stream() // dataSource = dataSource.stream()
.sorted(Comparator.comparing(AssetDetailDataSourceDto::getAssetGroupName) // .sorted(Comparator.comparing(AssetDetailDataSourceDto::getAssetGroupName)
.thenComparing(AssetDetailDataSourceDto::getAssetDetailGroupName)) // .thenComparing(AssetDetailDataSourceDto::getAssetDetailGroupName))
.collect(Collectors.toList()); // .collect(Collectors.toList());
switch (dataType) { switch (dataType) {
case 1: case 1:
......
...@@ -281,49 +281,9 @@ ...@@ -281,49 +281,9 @@
<select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto"> <select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto">
SELECT SELECT
assets_list.id AS id, sum(acquisition_value),sum(account_year_depreciation_amount),sum(account_total_depreciation_amount),sum(account_month_depreciation_amount),
assets_list.id, sum(year_end_value),sum(tax_month_depreciation_amount),sum(tax_to_current_year_depreciation_amount),sum(tax_current_year_depreciation_amount),
assets_list.asset_number, sum(total_difference_amount), sum(year_difference_amount)
assets_list.asset_group_name,
assets_list.asset_detail_group_id,
assets_list.asset_description,
assets_list.buy_date,
assets_list.depreciation_date,
assets_list.depreciation_period,
assets_list.acquisition_value,
assets_list.adjustment_value,
assets_list.disposed_date,
assets_list.residual_rate,
assets_list.year_depreciation_amount,
assets_list.year_adjustment_amount,
assets_list.year_end_value,
assets_list.status,
assets_list.account_acquisition_value,
assets_list.account_month_depreciation_amount,
assets_list.account_year_depreciation_amount,
assets_list.account_total_depreciation_amount,
assets_list.tax_depreciation_period,
assets_list.tax_to_last_year_depreciation_period,
assets_list.tax_to_current_year_depreciation_period,
assets_list.tax_year_depreciation_period,
assets_list.tax_month_depreciation_amount,
assets_list.tax_to_current_year_depreciation_amount,
assets_list.tax_current_year_depreciation_amount,
assets_list.total_difference_amount,
assets_list.year_difference_amount,
assets_list.is_retain,
assets_list.create_time,
assets_list.update_time,
assets_list.asset_type,
asset_detail_group.id,
asset_detail_group.asset_group_id,
asset_detail_group.detail_group_name,
asset_detail_group.asset_group_type,
asset_detail_group.group_year,
asset_detail_group.create_time,
asset_detail_group.update_time,
asset_detail_group.detail_group_type,
asset_detail_group.key_values
FROM FROM
assets_list assets_list
JOIN JOIN
...@@ -332,7 +292,6 @@ ...@@ -332,7 +292,6 @@
assets_list.asset_detail_group_id = asset_detail_group.id assets_list.asset_detail_group_id = asset_detail_group.id
WHERE WHERE
assets_list.asset_detail_group_id IS NOT NULL assets_list.asset_detail_group_id IS NOT NULL
AND assets_list.asset_type IS NOT NULL
AND assets_list.asset_type = #{assetType,jdbcType=INTEGER} AND assets_list.asset_type = #{assetType,jdbcType=INTEGER}
AND asset_detail_group.asset_group_type = #{assetType,jdbcType=INTEGER} AND asset_detail_group.asset_group_type = #{assetType,jdbcType=INTEGER}
AND asset_detail_group.detail_group_type = #{assetDetailType,jdbcType=INTEGER} AND asset_detail_group.detail_group_type = #{assetDetailType,jdbcType=INTEGER}
......
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