Commit 15fef97a authored by zhkwei's avatar zhkwei

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

parent 5c1961e6
...@@ -134,6 +134,12 @@ public class AssetListController { ...@@ -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) @RequestMapping(value="saveAssetGroupInfo",method = RequestMethod.POST)
public ApiResultDto saveAssetGroupInfo(@RequestBody List<CitAssetGroupResult> assetGroupResults, public ApiResultDto saveAssetGroupInfo(@RequestBody List<CitAssetGroupResult> assetGroupResults,
@RequestParam Integer saveGroupType, @RequestParam Integer saveGroupType,
......
...@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory; ...@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.dao.AssetDetailGroupMapper; import pwc.taxtech.atms.dao.AssetDetailGroupMapper;
import pwc.taxtech.atms.dao.AssetGroupMapper; import pwc.taxtech.atms.dao.AssetGroupMapper;
...@@ -318,7 +319,7 @@ public class AssetListServiceImpl extends BaseService { ...@@ -318,7 +319,7 @@ public class AssetListServiceImpl extends BaseService {
* @param cell * @param cell
* @return * @return
*/ */
private static Object getValue(Cell cell) { public static Object getValue(Cell cell) {
Object obj = null; Object obj = null;
switch (cell.getCellTypeEnum()) { switch (cell.getCellTypeEnum()) {
case BOOLEAN: case BOOLEAN:
...@@ -488,6 +489,16 @@ public class AssetListServiceImpl extends BaseService { ...@@ -488,6 +489,16 @@ public class AssetListServiceImpl extends BaseService {
return assetListMapper.selectByExample(assetListExample); 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 * @param id
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
"~MustBeEndOneApp": "I Must be the End One, please!", "~MustBeEndOneApp": "I Must be the End One, please!",
"TaxAccountDifference": "税会差异", "TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧", "TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧" "TaxLessAccount": "会计折旧&gt;税务折旧"
} }
\ No newline at end of file
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
"TaxToLastYearDepreciationPeriod": "截止去年累计折旧期间", "TaxToLastYearDepreciationPeriod": "截止去年累计折旧期间",
"TaxToCurrentYearDepreciationPeriod": "截止本年累计折旧期间", "TaxToCurrentYearDepreciationPeriod": "截止本年累计折旧期间",
"TaxAccountDifference": "税会差异", "TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧", "TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧", "TaxLessAccount": "会计折旧&gt;税务折旧",
"BuyDateType": "日期错误", "BuyDateType": "日期错误",
......
...@@ -656,18 +656,20 @@ ...@@ -656,18 +656,20 @@
$scope.ImportTotalAccountAcquisitionValue += v.accountAcquisitionValue; $scope.ImportTotalAccountAcquisitionValue += v.accountAcquisitionValue;
$scope.ImportTotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount; $scope.ImportTotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
$scope.ImportTotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount; $scope.ImportTotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
$scope.ImportTotalYearDifferenceAmount += v.yearDifferenceAmount; if(v.isRetain == 1){
$scope.ImportTotalYearDifferenceAmount += v.yearDifferenceAmount;
}
}); });
$scope.ImportTotalCount = rsp.length; $scope.ImportTotalCount = rsp.length;
$scope.ImportTotalAccountAcquisitionValue = PWC.round($scope.ImportTotalAccountAcquisitionValue, 2); $scope.ImportTotalAccountAcquisitionValue = PWC.round($scope.ImportTotalAccountAcquisitionValue, 2);
$scope.ImportTotalAccountYearDepreciationAmount = PWC.round($scope.ImportTotalAccountYearDepreciationAmount, 2); $scope.ImportTotalAccountYearDepreciationAmount = PWC.round($scope.ImportTotalAccountYearDepreciationAmount, 2);
$scope.ImportTotalTaxCurrentYearDepreciationAmount = PWC.round($scope.ImportTotalTaxCurrentYearDepreciationAmount, 2); $scope.ImportTotalTaxCurrentYearDepreciationAmount = PWC.round($scope.ImportTotalTaxCurrentYearDepreciationAmount, 2);
$scope.ImportTotalYearDifferenceAmount = PWC.round($scope.ImportTotalYearDifferenceAmount, 2); $scope.ImportTotalYearDifferenceAmount = PWC.round($scope.ImportTotalYearDifferenceAmount, 2);
} }
}).error(function () { }).error(function () {
SweetAlert.error(serviceErrorMsg); SweetAlert.error(serviceErrorMsg);
}); });
} }
//根据分类获取数据 //根据分类获取数据
function getAssetResultList(assetType) { function getAssetResultList(assetType) {
...@@ -687,7 +689,9 @@ ...@@ -687,7 +689,9 @@
$scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue; $scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue;
$scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount; $scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
$scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount; $scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
$scope.TotalYearDifferenceAmount += v.yearDifferenceAmount; if(v.isRetain == 1){
$scope.TotalYearDifferenceAmount += v.yearDifferenceAmount;
}
}); });
$scope.assetsResultData = data; $scope.assetsResultData = data;
$scope.TotalCount = data.length; $scope.TotalCount = data.length;
...@@ -712,7 +716,7 @@ ...@@ -712,7 +716,7 @@
$scope.ImportErrorTag = true; $scope.ImportErrorTag = true;
$scope.errorMsg = $translate.instant('ImportAssetErrorMsg').formatObj({ "NumberOfError": $scope.errorList.length }); $scope.errorMsg = $translate.instant('ImportAssetErrorMsg').formatObj({ "NumberOfError": $scope.errorList.length });
}; };
var initPagingControl = function (totalItemsCount) { var initPagingControl = function (totalItemsCount) {
$scope.pagingOptions.totalItems = totalItemsCount; $scope.pagingOptions.totalItems = totalItemsCount;
...@@ -752,13 +756,13 @@ ...@@ -752,13 +756,13 @@
onInitialized: function (e) { onInitialized: function (e) {
$scope.assetImportGridInstance = e.component; $scope.assetImportGridInstance = e.component;
}, },
hoverStateEnabled: true, hoverStateEnabled: true,
scrolling: { mode: "virtual" }, scrolling: { mode: "virtual" },
noDataText: $translate.instant('AccountVoucher_DataGrid_NoDataText'), noDataText: $translate.instant('AccountVoucher_DataGrid_NoDataText'),
height: '99%', height: '99%',
} }
} }
//初始化编辑d资产分类(asset_group_result)ataGrid //初始化编辑d资产分类(asset_group_result)ataGrid
var InitGrid = function (showAdd) { var InitGrid = function (showAdd) {
$scope.assetsGridOptions = { $scope.assetsGridOptions = {
...@@ -768,10 +772,10 @@ ...@@ -768,10 +772,10 @@
keyExpr: "id", keyExpr: "id",
paging: { paging: {
enabled: false enabled: false
}, },
editing: { editing: {
mode: "batch", mode: "batch",
allowUpdating: true, allowUpdating: true,
}, },
onInitialized: function (e) { onInitialized: function (e) {
$scope.assetGroupGridInstance = e.component; $scope.assetGroupGridInstance = e.component;
...@@ -796,13 +800,13 @@ ...@@ -796,13 +800,13 @@
} }
} }
}, },
columns: [ columns: [
{ {
caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false,
}, },
{ {
caption: $translate.instant('AssetGroupName'), dataField: "assetName", width: 150, allowEditing: false, caption: $translate.instant('AssetGroupName'), dataField: "assetName", width: 150, allowEditing: false,
}, },
{ {
caption: $translate.instant('LevelOneGroup'), dataField: "assetGroupId", caption: $translate.instant('LevelOneGroup'), dataField: "assetGroupId",
...@@ -876,7 +880,7 @@ ...@@ -876,7 +880,7 @@
if (item.name === 'saveButton' || item.name == 'revertButton') { if (item.name === 'saveButton' || item.name == 'revertButton') {
item.visible = false; item.visible = false;
} }
}); });
} }
}; };
} }
...@@ -933,14 +937,14 @@ ...@@ -933,14 +937,14 @@
$scope.assetsResultGridOptions = { $scope.assetsResultGridOptions = {
columns: dupColumns, columns: dupColumns,
bindingOptions: { bindingOptions: {
"dataSource": "assetsResultData", "dataSource": "assetsResultData",
}, },
editing: { editing: {
mode: "batch", mode: "batch",
allowUpdating:true, allowUpdating:true,
}, },
onInitialized: function (e) { onInitialized: function (e) {
$scope.dataGridInstance = e.component; $scope.dataGridInstance = e.component;
}, },
onCellPrepared: function (e) { onCellPrepared: function (e) {
if (e.rowType === "header") { if (e.rowType === "header") {
...@@ -966,7 +970,7 @@ ...@@ -966,7 +970,7 @@
e.cellElement.addClass('herder-center'); e.cellElement.addClass('herder-center');
e.cellElement.append($compile(inputElement)($scope)); e.cellElement.append($compile(inputElement)($scope));
} }
} }
}, },
loadPanel: { loadPanel: {
enabled: true enabled: true
...@@ -992,12 +996,12 @@ ...@@ -992,12 +996,12 @@
if(data.isRetain == true) if(data.isRetain == true)
{ {
data.isRetain =1; data.isRetain =1;
} }
else if(data.isRetain == false) else if(data.isRetain == false)
{ {
data.isRetain =0; data.isRetain =0;
} }
targetArray.push(data); targetArray.push(data);
}, },
onToolbarPreparing: function (e) { onToolbarPreparing: function (e) {
var toolbarItems = e.toolbarOptions.items; var toolbarItems = e.toolbarOptions.items;
...@@ -1031,10 +1035,10 @@ ...@@ -1031,10 +1035,10 @@
name: $translate.instant('AllTheItems') name: $translate.instant('AllTheItems')
}, { }, {
key: "0", key: "0",
name: $translate.instant('TaxLessAccount') name: $translate.instant('TaxDepreciation')+"<"+$translate.instant('TaxDepreciation')
}, { }, {
key: "1", key: "1",
name: $translate.instant('TaxGreaterAccount') name: $translate.instant('TaxDepreciation')+">="+$translate.instant('TaxDepreciation')
}]; }];
//初始化税会差异选项 //初始化税会差异选项
$scope.taxAccountDifferenceOptions = { $scope.taxAccountDifferenceOptions = {
...@@ -1049,7 +1053,7 @@ ...@@ -1049,7 +1053,7 @@
} }
}; };
//获取数据服务 //获取数据服务
var getGroupList = function () { var getGroupList = function () {
debugger; debugger;
var deferred = $q.defer(); var deferred = $q.defer();
...@@ -1091,7 +1095,7 @@ ...@@ -1091,7 +1095,7 @@
|| PWC.isNullOrEmpty(m.assetGroupId) || PWC.isNullOrEmpty(m.assetGroupId)
|| PWC.isNullOrEmpty(m.assetDetailGroupId) || PWC.isNullOrEmpty(m.assetDetailGroupId)
|| PWC.isNullOrEmpty(m.taxDepreciationPeriod)) { || PWC.isNullOrEmpty(m.taxDepreciationPeriod)) {
isOk = false; isOk = false;
} }
}); });
return isOk; return isOk;
...@@ -1111,8 +1115,8 @@ ...@@ -1111,8 +1115,8 @@
$scope.assetsResultData.forEach(function (m) { $scope.assetsResultData.forEach(function (m) {
m.isRetain = 0; 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, ...@@ -30,6 +30,10 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
debugger; debugger;
return $http.post('/asset/updateAssetResultList?projectId=' + projectId,assetsList, apiConfig.create()); 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) { getAllFixedAssetDetailGroup: function (assetGroupType,pageIndex,pageSize) {
debugger; debugger;
return $http.post('/asset/getFixedAssetDetailGroup',{"assetGroupType":assetGroupType,"pageIndex":pageIndex,"pageSize":pageSize}, apiConfig.create()); 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