Commit 15fef97a authored by zhkwei's avatar zhkwei

CIT固定资产-资产清单补充及优化

parent 5c1961e6
......@@ -134,6 +134,12 @@ public class AssetListController {
}
}
@RequestMapping(value="batchUpdateIsRetain",method = RequestMethod.POST)
public ApiResultDto batchUpdateIsRetain(Integer assetType, @RequestParam String projectId, @RequestParam Integer isRetain){
assetListService.batchUpdateIsRetain(assetType,projectId, isRetain);
return null;
}
@RequestMapping(value="saveAssetGroupInfo",method = RequestMethod.POST)
public ApiResultDto saveAssetGroupInfo(@RequestBody List<CitAssetGroupResult> assetGroupResults,
@RequestParam Integer saveGroupType,
......
......@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.dao.AssetDetailGroupMapper;
import pwc.taxtech.atms.dao.AssetGroupMapper;
......@@ -318,7 +319,7 @@ public class AssetListServiceImpl extends BaseService {
* @param cell
* @return
*/
private static Object getValue(Cell cell) {
public static Object getValue(Cell cell) {
Object obj = null;
switch (cell.getCellTypeEnum()) {
case BOOLEAN:
......@@ -488,6 +489,16 @@ public class AssetListServiceImpl extends BaseService {
return assetListMapper.selectByExample(assetListExample);
}
public void batchUpdateIsRetain(Integer assetType, String projectId, Integer isRetain){
CitAssetsListExample citAssetsListExample = new CitAssetsListExample();
CitAssetsListExample.Criteria criteria = citAssetsListExample.createCriteria();
criteria.andProjectIdEqualTo(projectId);
criteria.andAssetTypeEqualTo(assetType);
CitAssetsList citAsset = new CitAssetsList();
citAsset.setIsRetain(isRetain);
assetListMapper.updateByExampleSelective(citAsset,citAssetsListExample);
}
/**
* 根据主键获取资产一级分类
* @param id
......
......@@ -77,6 +77,8 @@
"~MustBeEndOneApp": "I Must be the End One, please!",
"TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧"
}
\ No newline at end of file
......@@ -82,6 +82,8 @@
"TaxToLastYearDepreciationPeriod": "截止去年累计折旧期间",
"TaxToCurrentYearDepreciationPeriod": "截止本年累计折旧期间",
"TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧",
"BuyDateType": "日期错误",
......
......@@ -656,7 +656,9 @@
$scope.ImportTotalAccountAcquisitionValue += v.accountAcquisitionValue;
$scope.ImportTotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
$scope.ImportTotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
if(v.isRetain == 1){
$scope.ImportTotalYearDifferenceAmount += v.yearDifferenceAmount;
}
});
$scope.ImportTotalCount = rsp.length;
$scope.ImportTotalAccountAcquisitionValue = PWC.round($scope.ImportTotalAccountAcquisitionValue, 2);
......@@ -687,7 +689,9 @@
$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;
......@@ -1031,10 +1035,10 @@
name: $translate.instant('AllTheItems')
}, {
key: "0",
name: $translate.instant('TaxLessAccount')
name: $translate.instant('TaxDepreciation')+"<"+$translate.instant('TaxDepreciation')
}, {
key: "1",
name: $translate.instant('TaxGreaterAccount')
name: $translate.instant('TaxDepreciation')+">="+$translate.instant('TaxDepreciation')
}];
//初始化税会差异选项
$scope.taxAccountDifferenceOptions = {
......@@ -1112,7 +1116,7 @@
m.isRetain = 0;
});
}
assetListService.batchUpdateIsRetain($scope.displayType -1, isRetain);
assetListService.batchUpdateIsRetain($scope.displayType -1,projectId, isRetain);
}
//验证信息
......
......@@ -30,6 +30,10 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
debugger;
return $http.post('/asset/updateAssetResultList?projectId=' + projectId,assetsList, apiConfig.create());
},
batchUpdateIsRetain:function (assetType,projectId, isRetain) {
debugger;
return $http.post('/asset/batchUpdateIsRetain?assetType=' + assetType + '&projectId=' + projectId + '&isRetain=' + isRetain, apiConfig.create());
},
getAllFixedAssetDetailGroup: function (assetGroupType,pageIndex,pageSize) {
debugger;
return $http.post('/asset/getFixedAssetDetailGroup',{"assetGroupType":assetGroupType,"pageIndex":pageIndex,"pageSize":pageSize}, apiConfig.create());
......
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