Commit 80dbac5d authored by chase's avatar chase

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents fdb2efd9 695ef748
...@@ -60,16 +60,13 @@ public class ZC extends FunctionBase implements FreeRefFunction { ...@@ -60,16 +60,13 @@ public class ZC extends FunctionBase implements FreeRefFunction {
BigDecimal totalData = new BigDecimal("0"); BigDecimal totalData = new BigDecimal("0");
try { try {
List<CitAssetDetailResultDto> assetDetailResultDtos = List<CitAssetDetailResultDto> assetDetailResultDtos =
SpringContextUtil.assetsListMapper.getCitAssetDetialResult(assetType, assetDetailType); SpringContextUtil.assetsListMapper.getCitAssetDetialResult(assetType, assetDetailType,formulaContext.getProjectId());
if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){ if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){
System.out.println(assetDetailResultDtos.size()); System.out.println(assetDetailResultDtos.size());
} }
for (CitAssetDetailResultDto x : assetDetailResultDtos) { for (CitAssetDetailResultDto x : assetDetailResultDtos) {
AssetDetailDataSourceDto assetDetailDataSourceDto = new AssetDetailDataSourceDto(); AssetDetailDataSourceDto assetDetailDataSourceDto = new AssetDetailDataSourceDto();
assetDetailDataSourceDto.setResultType(KeyValueConfigResultType.Accounting.getCode()); assetDetailDataSourceDto.setResultType(KeyValueConfigResultType.Accounting.getCode());
assetDetailDataSourceDto.setAssetNumber(x.getAssetsList().getAssetGroupName());
assetDetailDataSourceDto.setAssetGroupName(x.getAssetDetailGroup().getDetailGroupName());
assetDetailDataSourceDto.setAssetDetailGroupName(x.getAssetDetailGroup().getDetailGroupName());
assetDetailDataSourceDto.setAccountAcquisitionValue(FormulaHelper.roundValue(x.getAssetsList().getAccountAcquisitionValue(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setAccountAcquisitionValue(FormulaHelper.roundValue(x.getAssetsList().getAccountAcquisitionValue(), KeyValueConfigResultType.Accounting, null, formulaContext));
assetDetailDataSourceDto.setAccountMonthDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getAccountMonthDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setAccountMonthDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getAccountMonthDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext));
assetDetailDataSourceDto.setAccountYearDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getYearDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setAccountYearDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getYearDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext));
...@@ -80,9 +77,6 @@ if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){ ...@@ -80,9 +77,6 @@ if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){
assetDetailDataSourceDto.setTaxCurrentYearDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getTaxCurrentYearDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setTaxCurrentYearDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getTaxCurrentYearDepreciationAmount(), KeyValueConfigResultType.Accounting, null, formulaContext));
assetDetailDataSourceDto.setTotalDifferenceAmount(FormulaHelper.roundValue(x.getAssetsList().getTotalDifferenceAmount(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setTotalDifferenceAmount(FormulaHelper.roundValue(x.getAssetsList().getTotalDifferenceAmount(), KeyValueConfigResultType.Accounting, null, formulaContext));
assetDetailDataSourceDto.setYearDifferenceAmount(FormulaHelper.roundValue(x.getAssetsList().getYearDifferenceAmount(), KeyValueConfigResultType.Accounting, null, formulaContext)); assetDetailDataSourceDto.setYearDifferenceAmount(FormulaHelper.roundValue(x.getAssetsList().getYearDifferenceAmount(), KeyValueConfigResultType.Accounting, null, formulaContext));
assetDetailDataSourceDto.setDepreciationPeriod(x.getAssetsList().getDepreciationPeriod());
assetDetailDataSourceDto.setTaxDepreciationPeriod(x.getAssetsList().getTaxDepreciationPeriod());
assetDetailDataSourceDto.setIsRetain(x.getAssetsList().getIsRetain()==0?false:true);
assetDetailDataSourceDto.setDataType(dataType); assetDetailDataSourceDto.setDataType(dataType);
assetDetailDataSourceDto.setName(Constant.DataSourceName.AssetListDataSource); assetDetailDataSourceDto.setName(Constant.DataSourceName.AssetListDataSource);
assetDetailDataSourceDto.setOperationType(EnumOperationType.Single.getCode()); assetDetailDataSourceDto.setOperationType(EnumOperationType.Single.getCode());
......
...@@ -120,7 +120,8 @@ public interface CitAssetsListMapper extends MyMapper { ...@@ -120,7 +120,8 @@ public interface CitAssetsListMapper extends MyMapper {
List<CitAssetEamMapping> getAssetEamMapping(CitAssetsList citAsset); List<CitAssetEamMapping> getAssetEamMapping(CitAssetsList citAsset);
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType, List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType); @Param("assetDetailType") Integer assetDetailType,
@Param("projectId") String projectId);
CitAssetSumDataDto getSumData(@Param("projectId") String projectId); CitAssetSumDataDto getSumData(@Param("projectId") String projectId);
} }
\ No newline at end of file
...@@ -282,6 +282,7 @@ ...@@ -282,6 +282,7 @@
<select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto"> <select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto">
SELECT SELECT
sum(acquisition_value) as acquisition_value, sum(acquisition_value) as acquisition_value,
sum(account_acquisition_value) as account_acquisition_value,
sum(account_year_depreciation_amount) as account_year_depreciation_amount, sum(account_year_depreciation_amount) as account_year_depreciation_amount,
sum(account_total_depreciation_amount) as account_total_depreciation_amount, sum(account_total_depreciation_amount) as account_total_depreciation_amount,
sum(account_month_depreciation_amount) as account_month_depreciation_amount, sum(account_month_depreciation_amount) as account_month_depreciation_amount,
...@@ -298,7 +299,7 @@ ...@@ -298,7 +299,7 @@
ON ON
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 project_id=#{projectId,jdbcType=VARVHAR}
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