Commit a589aa75 authored by zhkwei's avatar zhkwei

CIT固定资产导入bug

parent 12b33350
......@@ -457,6 +457,11 @@ public class CitAssetsListDto implements Serializable {
*/
private BigDecimal disposalTaxBenefit;
BigDecimal totalAccountAcquisitionValue;
BigDecimal totalAccountYearDepreciationAmount;
BigDecimal totalTaxCurrentYearDepreciationAmount;
BigDecimal totalYearDifferenceAmount;
public BigDecimal getDisposalProfitAndLoss() {
return disposalProfitAndLoss;
}
......@@ -1393,5 +1398,35 @@ public class CitAssetsListDto implements Serializable {
this.compensationSaleAmount = compensationSaleAmount;
}
public BigDecimal getTotalAccountAcquisitionValue() {
return totalAccountAcquisitionValue;
}
public void setTotalAccountAcquisitionValue(BigDecimal totalAccountAcquisitionValue) {
this.totalAccountAcquisitionValue = totalAccountAcquisitionValue;
}
public BigDecimal getTotalAccountYearDepreciationAmount() {
return totalAccountYearDepreciationAmount;
}
public void setTotalAccountYearDepreciationAmount(BigDecimal totalAccountYearDepreciationAmount) {
this.totalAccountYearDepreciationAmount = totalAccountYearDepreciationAmount;
}
public BigDecimal getTotalTaxCurrentYearDepreciationAmount() {
return totalTaxCurrentYearDepreciationAmount;
}
public void setTotalTaxCurrentYearDepreciationAmount(BigDecimal totalTaxCurrentYearDepreciationAmount) {
this.totalTaxCurrentYearDepreciationAmount = totalTaxCurrentYearDepreciationAmount;
}
public BigDecimal getTotalYearDifferenceAmount() {
return totalYearDifferenceAmount;
}
public void setTotalYearDifferenceAmount(BigDecimal totalYearDifferenceAmount) {
this.totalYearDifferenceAmount = totalYearDifferenceAmount;
}
}
\ No newline at end of file
......@@ -18,6 +18,7 @@ import pwc.taxtech.atms.dao.AssetDetailGroupMapper;
import pwc.taxtech.atms.dao.AssetGroupMapper;
import pwc.taxtech.atms.dao.CitAssetGroupResultMapper;
import pwc.taxtech.atms.dao.CitAssetsListMapper;
import pwc.taxtech.atms.dpo.CitAssetSumDataDto;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.entity.AssetsList;
......@@ -101,10 +102,15 @@ public class AssetListServiceImpl extends BaseService {
}
Page page = PageHelper.startPage(citAssetsListDto.getPageInfo().getPageIndex(),citAssetsListDto.getPageInfo().getPageSize());
List<CitAssetsList> citAssetsLists = assetListMapper.selectByExample(assetListExample);
CitAssetSumDataDto sumData = assetListMapper.getSumData(citAssetsListDto.getProjectId());
List<CitAssetsListDto> citAssetsListDtos = new ArrayList<>();
for (CitAssetsList citAssetsList:citAssetsLists){
CitAssetsListDto temp = new CitAssetsListDto();
BeanUtils.copyProperties(citAssetsList,temp);
temp.setTotalYearDifferenceAmount(sumData.getTotalYearDifferenceAmount());
temp.setTotalAccountYearDepreciationAmount(sumData.getTotalAccountYearDepreciationAmount());
temp.setTotalTaxCurrentYearDepreciationAmount(sumData.getTotalTaxCurrentYearDepreciationAmount());
temp.setTotalAccountAcquisitionValue(sumData.getTotalAccountAcquisitionValue());
citAssetsListDtos.add(temp);
}
......@@ -114,6 +120,10 @@ public class AssetListServiceImpl extends BaseService {
return pageInfo;
}
public void getSumData(){
}
public List<CitAssetGroupResultDto> getAssetGroupResultData(String projectId) throws Exception {
logger.debug("根据projectId获取该资产类别相关数据");
CitAssetGroupResultExample assetGroupResultExample = new CitAssetGroupResultExample();
......
......@@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitAssetDetailResultDto;
import pwc.taxtech.atms.dpo.CitAssetEamMappingDto;
import pwc.taxtech.atms.dpo.CitAssetSumDataDto;
import pwc.taxtech.atms.entity.CitAssetsList;
import pwc.taxtech.atms.entity.CitAssetsListExample;
......@@ -120,4 +121,6 @@ public interface CitAssetsListMapper extends MyMapper {
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType);
CitAssetSumDataDto getSumData(@Param("projectId") String projectId);
}
\ No newline at end of file
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.AssetDetailGroup;
import pwc.taxtech.atms.entity.CitAssetsList;
import java.math.BigDecimal;
public class CitAssetSumDataDto {
BigDecimal totalAccountAcquisitionValue;
BigDecimal totalAccountYearDepreciationAmount;
BigDecimal totalTaxCurrentYearDepreciationAmount;
BigDecimal totalYearDifferenceAmount;
public BigDecimal getTotalAccountAcquisitionValue() {
return totalAccountAcquisitionValue;
}
public void setTotalAccountAcquisitionValue(BigDecimal totalAccountAcquisitionValue) {
this.totalAccountAcquisitionValue = totalAccountAcquisitionValue;
}
public BigDecimal getTotalAccountYearDepreciationAmount() {
return totalAccountYearDepreciationAmount;
}
public void setTotalAccountYearDepreciationAmount(BigDecimal totalAccountYearDepreciationAmount) {
this.totalAccountYearDepreciationAmount = totalAccountYearDepreciationAmount;
}
public BigDecimal getTotalTaxCurrentYearDepreciationAmount() {
return totalTaxCurrentYearDepreciationAmount;
}
public void setTotalTaxCurrentYearDepreciationAmount(BigDecimal totalTaxCurrentYearDepreciationAmount) {
this.totalTaxCurrentYearDepreciationAmount = totalTaxCurrentYearDepreciationAmount;
}
public BigDecimal getTotalYearDifferenceAmount() {
return totalYearDifferenceAmount;
}
public void setTotalYearDifferenceAmount(BigDecimal totalYearDifferenceAmount) {
this.totalYearDifferenceAmount = totalYearDifferenceAmount;
}
}
......@@ -277,6 +277,7 @@
</association>
</resultMap>
<select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto">
SELECT
assets_list.id AS id,
......@@ -335,5 +336,16 @@
AND asset_detail_group.asset_group_type = #{assetType,jdbcType=INTEGER}
AND asset_detail_group.detail_group_type = #{assetDetailType,jdbcType=INTEGER}
</select>
<select id="getSumData" resultType="pwc.taxtech.atms.dpo.CitAssetSumDataDto">
select
sum(account_acquisition_value) as totalAccountAcquisitionValue,
sum(account_year_depreciation_amount) as totalAccountYearDepreciationAmount,
sum(tax_current_year_depreciation_amount) as totalTaxCurrentYearDepreciationAmount,
sum(if(is_retain=1, year_difference_amount,0)) as totalYearDifferenceAmount
from assets_list
where status = 1
and project_id = #{projectId,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
......@@ -266,22 +266,27 @@
var data = assetListData.data.list;
if (data) {
var index = 1;
data.forEach(function (v) {
v.index = index++;
$scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue;
$scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
$scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
if(v.isRetain == 1){
$scope.TotalYearDifferenceAmount += v.yearDifferenceAmount;
}
});
// data.forEach(function (v) {
// v.index = index++;
// $scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue;
// $scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
// $scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
// if(v.isRetain == 1){
// $scope.TotalYearDifferenceAmount += v.yearDifferenceAmount;
// }
// });
$scope.assetsResultData = data;
// $scope.TotalCount = data.length;
$scope.TotalAccountAcquisitionValue = PWC.round($scope.TotalAccountAcquisitionValue, 2);
$scope.TotalAccountYearDepreciationAmount = PWC.round($scope.TotalAccountYearDepreciationAmount, 2);
$scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2);
$scope.TotalYearDifferenceAmount = PWC.round($scope.TotalYearDifferenceAmount, 2);
// $scope.TotalAccountAcquisitionValue = PWC.round($scope.TotalAccountAcquisitionValue, 2);
// $scope.TotalAccountYearDepreciationAmount = PWC.round($scope.TotalAccountYearDepreciationAmount, 2);
// $scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2);
// $scope.TotalYearDifferenceAmount = PWC.round($scope.TotalYearDifferenceAmount, 2);
$scope.TotalAccountAcquisitionValue = PWC.round(data[0].totalAccountAcquisitionValue, 2);
$scope.TotalAccountYearDepreciationAmount = PWC.round(data[0].totalAccountYearDepreciationAmount, 2);
$scope.TotalTaxCurrentYearDepreciationAmount = PWC.round(data[0].totalTaxCurrentYearDepreciationAmount, 2);
$scope.TotalYearDifferenceAmount = PWC.round(data[0].totalYearDifferenceAmount, 2);
}
$scope.totalItemsTemp = assetListData.data.total;
$scope.pagingOptions.totalItems = assetListData.data.total;
});
}
......@@ -974,6 +979,7 @@
//开始
(function initialize() {
$scope.totalItemsTemp = 0;
//分页的设置
debugger;
$scope.pagingOptions = {
......@@ -1004,6 +1010,7 @@
getGroupList();
getGroupDetailList();
getUserPermission();
$scope.pagingOptions.totalItems = $scope.totalItemsTemp;
// $scope.$watch('fileNameWrapper', function (newValue, oldValue) {
// if (newValue != null && newValue !== oldValue) {
// //设置上传文件名
......
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