Commit c4500a86 authored by zhkwei's avatar zhkwei

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

parent f70c2de7
......@@ -134,20 +134,40 @@ public class AssetListController {
}
}
/**
* 当保留差异全选或全反选选项变化时进行批量修改
* @param assetType
* @param projectId
* @param isRetain
* @return
*/
@RequestMapping(value="batchUpdateIsRetain",method = RequestMethod.POST)
public ApiResultDto batchUpdateIsRetain(Integer assetType, @RequestParam String projectId, @RequestParam Integer isRetain){
assetListService.batchUpdateIsRetain(assetType,projectId, isRetain);
return null;
}
/**
* 保存资产分类(当对资产类别进行二级分类匹配完成后点击确定按钮所走的方法)
* @param assetGroupResults
* @param saveGroupType
* @param projectId
* @return
*/
@RequestMapping(value="saveAssetGroupInfo",method = RequestMethod.POST)
public ApiResultDto saveAssetGroupInfo(@RequestBody List<CitAssetGroupResult> assetGroupResults,
@RequestParam Integer saveGroupType,
@RequestParam String projectId){
assetListService.saveAssetGroupInfo(assetGroupResults, saveGroupType, projectId);
return null;
return assetListService.saveAssetGroupInfo(assetGroupResults, saveGroupType, projectId);
}
/**
* 当资产清单Grid编辑进行保存所走的方法
* @param citAssetsLists
* @param projectId
* @return
*/
@RequestMapping(value="updateAssetResultList",method = RequestMethod.POST)
public ApiResultDto updateAssetResultList(@RequestBody List<CitAssetsList> citAssetsLists,
@RequestParam String projectId){
......
......@@ -199,9 +199,10 @@ public class AssetListServiceImpl extends BaseService {
//在循环存储新的资产之前先删除原有资产
deleteByExample(projectId);
//循环存储新的资产
for (CitAssetsList citAsset : citAssetsLists){
assetListMapper.insertSelective(citAsset);
}
int insertBatch = assetListMapper.insertBatch(citAssetsLists);
// for (CitAssetsList citAsset : citAssetsLists){
// assetListMapper.insertSelective(citAsset);
// }
//处理资产类别
//1、根据projectId查询数据库中已有的资产类别,并和新导入的资产类别进行比较
// for (CitAssetGroupResult groupResult : citAssetGroupResults) {
......
......@@ -105,4 +105,6 @@ public interface CitAssetsListMapper extends MyMapper {
* @mbg.generated
*/
int updateByPrimaryKey(CitAssetsList record);
int insertBatch(List<CitAssetsList> citAssetsLists);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.CitAssetsListMapper">
<insert id="insertBatch" parameterType="java.util.List">
insert into balance_sheet_final
(<include refid="Base_Column_List"/>)
values
<foreach collection="list" item="item" index="index" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=BIGINT},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.assetNumber != null">#{item.assetNumber,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.assetGroupName != null">#{item.assetGroupName,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.assetDetailGroupId != null">#{item.assetDetailGroupId,jdbcType=BIGINT},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.assetDescription != null">#{item.assetDescription,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.buyDate != null">#{item.buyDate,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.depreciationDate != null">#{item.depreciationDate,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.depreciationPeriod != null">#{item.depreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.acquisitionValue != null">#{item.acquisitionValue,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.adjustmentValue != null">#{item.adjustmentValue,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.disposedDate != null">#{item.disposedDate,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.residualRate != null">#{item.residualRate,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.yearDepreciationAmount != null">#{item.yearDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.yearAdjustmentAmount != null">#{item.yearAdjustmentAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.yearEndValue != null">#{item.yearEndValue,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.status != null">#{item.status,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountAcquisitionValue != null">#{item.accountAcquisitionValue,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountMonthDepreciationAmount != null">#{item.accountMonthDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountYearDepreciationAmount != null">#{item.accountYearDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountTotalDepreciationAmount != null">#{item.accountTotalDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxToLastYearDepreciationPeriod != null">#{item.taxToLastYearDepreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxToCurrentYearDepreciationPeriod != null">#{item.taxToCurrentYearDepreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxYearDepreciationPeriod != null">#{item.taxYearDepreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxMonthDepreciationAmount != null">#{item.taxMonthDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxToCurrentYearDepreciationAmount != null">#{item.taxToCurrentYearDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxCurrentYearDepreciationAmount != null">#{item.taxCurrentYearDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.totalDifferenceAmount != null">#{item.totalDifferenceAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.yearDifferenceAmount != null">#{item.yearDifferenceAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.isRetain != null">#{item.isRetain,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.assetType != null">#{item.assetType,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.taxAccountCompare != null">#{item.taxAccountCompare,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxGroupName != null">#{item.taxGroupName,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
</trim>
</foreach>;
SELECT 1 FROM DUAL;
</insert>
</mapper>
\ No newline at end of file
......@@ -76,9 +76,9 @@
"toUpdate": "To be updated",
"~MustBeEndOneApp": "I Must be the End One, please!",
"isRetainDifference": "保留差异",
"TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧"
"CitJournalAdjustImport": "日记账调整-CIT"
}
\ No newline at end of file
......@@ -81,11 +81,11 @@
"TaxGroupType": "税法分类",
"TaxToLastYearDepreciationPeriod": "截止去年累计折旧期间",
"TaxToCurrentYearDepreciationPeriod": "截止本年累计折旧期间",
"isRetainDifference": "保留差异",
"TaxAccountDifference": "税会差异",
"TaxDepreciation": "会计折旧",
"AccountDepreciation": "税务折旧",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧",
"CitJournalAdjustImport": "日记账调整-CIT",
"BuyDateType": "日期错误",
"AssetNumberType": "资产编号错误",
"AssetGroupNameType": "资产类别错误",
......
......@@ -948,6 +948,7 @@
},
onCellPrepared: function (e) {
if (e.rowType === "header") {
debugger;
if (e.column.caption === $translate.instant('ImportErrorPopUpNoCol') ||
e.column.caption === $translate.instant('AssetNumber') ||
e.column.caption === $translate.instant('AssetGroupName') ||
......@@ -959,14 +960,14 @@
if(e.column.caption === $translate.instant('IsRetain'))
{
e.cellElement.empty();
var inputElement = $('<input type="checkbox" ng-model="SelectAll" ng-click="selectAllAsset()">保留差异</input>');
var inputElement = $('<input type="checkbox" ng-model="SelectAll" ng-click="selectAllAsset()">{{\'isRetainDifference\' | translate}}</input>');
e.cellElement.addClass('herder-center');
e.cellElement.append($compile(inputElement)($scope));
}
if(e.column.caption === $translate.instant('IsRetain'))
{
e.cellElement.empty();
var inputElement = $('<input type="checkbox" ng-model="SelectAll" ng-click="selectAllAsset()">保留差异</input>');
var inputElement = $('<input type="checkbox" ng-model="SelectAll" ng-click="selectAllAsset()">{{\'isRetainDifference\' | translate}}</input>');
e.cellElement.addClass('herder-center');
e.cellElement.append($compile(inputElement)($scope));
}
......@@ -1035,10 +1036,10 @@
name: $translate.instant('AllTheItems')
}, {
key: "0",
name: $translate.instant('TaxDepreciation')+"<"+$translate.instant('TaxDepreciation')
name: $translate.instant('TaxDepreciation')+"<"+$translate.instant('AccountDepreciation')
}, {
key: "1",
name: $translate.instant('TaxDepreciation')+">="+$translate.instant('TaxDepreciation')
name: $translate.instant('TaxDepreciation')+">="+$translate.instant('AccountDepreciation')
}];
//初始化税会差异选项
$scope.taxAccountDifferenceOptions = {
......
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