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 {
BigDecimal totalData = new BigDecimal("0");
try {
List<CitAssetDetailResultDto> assetDetailResultDtos =
SpringContextUtil.assetsListMapper.getCitAssetDetialResult(assetType, assetDetailType);
SpringContextUtil.assetsListMapper.getCitAssetDetialResult(assetType, assetDetailType,formulaContext.getProjectId());
if(assetDetailResultDtos != null&&assetDetailResultDtos.size()>0){
System.out.println(assetDetailResultDtos.size());
}
for (CitAssetDetailResultDto x : assetDetailResultDtos) {
AssetDetailDataSourceDto assetDetailDataSourceDto = new AssetDetailDataSourceDto();
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.setAccountMonthDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getAccountMonthDepreciationAmount(), 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){
assetDetailDataSourceDto.setTaxCurrentYearDepreciationAmount(FormulaHelper.roundValue(x.getAssetsList().getTaxCurrentYearDepreciationAmount(), 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.setDepreciationPeriod(x.getAssetsList().getDepreciationPeriod());
assetDetailDataSourceDto.setTaxDepreciationPeriod(x.getAssetsList().getTaxDepreciationPeriod());
assetDetailDataSourceDto.setIsRetain(x.getAssetsList().getIsRetain()==0?false:true);
assetDetailDataSourceDto.setDataType(dataType);
assetDetailDataSourceDto.setName(Constant.DataSourceName.AssetListDataSource);
assetDetailDataSourceDto.setOperationType(EnumOperationType.Single.getCode());
......
......@@ -120,7 +120,8 @@ public interface CitAssetsListMapper extends MyMapper {
List<CitAssetEamMapping> getAssetEamMapping(CitAssetsList citAsset);
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);
}
\ No newline at end of file
......@@ -282,6 +282,7 @@
<select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto">
SELECT
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_total_depreciation_amount) as account_total_depreciation_amount,
sum(account_month_depreciation_amount) as account_month_depreciation_amount,
......@@ -298,7 +299,7 @@
ON
assets_list.asset_detail_group_id = asset_detail_group.id
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 asset_detail_group.asset_group_type = #{assetType,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