Commit 23766b40 authored by zhkwei's avatar zhkwei

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

parent 905dfd13
package pwc.taxtech.atms.controller;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.AssetDetailGroupDto;
import pwc.taxtech.atms.dto.AssetDetailGroupStringDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.AssetDetailGroup;
import pwc.taxtech.atms.entity.AssetGroup;
import pwc.taxtech.atms.entity.CitAssetGroupResult;
import pwc.taxtech.atms.service.impl.AssetGroupServiceImpl;
import pwc.taxtech.atms.entity.CitAssetsList;
import pwc.taxtech.atms.service.impl.AssetListServiceImpl;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description 资产相关Controller
......@@ -66,13 +56,13 @@ public class AssetListController {
* @return
*/
@RequestMapping(value = "/getAssetResultList", method = RequestMethod.GET)
public @ResponseBody ApiResultDto getAssetResultList(Integer assetType){
public @ResponseBody ApiResultDto getAssetResultList(Integer assetType, @RequestParam String projectId, @RequestParam Integer taxAccountCompare){
logger.info("根据资产类别获取资产清单");
ApiResultDto apiResultDto = new ApiResultDto();
try{
apiResultDto.setCode(1);
apiResultDto.setMessage("获取成功");
apiResultDto.setData(assetListService.getAssetResultList(assetType));
apiResultDto.setData(assetListService.getAssetResultList(assetType,projectId,taxAccountCompare));
return apiResultDto;
}catch(Exception e){
e.printStackTrace();
......@@ -152,6 +142,16 @@ public class AssetListController {
return null;
}
@RequestMapping(value="updateAssetResultList",method = RequestMethod.POST)
public ApiResultDto updateAssetResultList(@RequestBody List<CitAssetsList> citAssetsLists,
@RequestParam String projectId){
ApiResultDto apiResultDto = new ApiResultDto();
assetListService.updateAssetResultList(citAssetsLists,projectId);
apiResultDto.setCode(1);
apiResultDto.setMessage("资产修改成功");
return apiResultDto;
}
/**
* CIT资产文件导入
* @return
......
......@@ -401,6 +401,28 @@ public class CitAssetsListDto implements Serializable {
*/
private Date updateTime;
/**
* Database Column Remarks:
* 税会折旧大小比较结果;1表示税大,2表示会大
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column assets_list.tax_account_compare
*
* @mbg.generated
*/
private Integer taxAccountCompare;
/**
* Database Column Remarks:
* 税法分类,也是资产二级分类(asset_detail_group表中的detailGroupName)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column assets_list.tax_group_name
*
* @mbg.generated
*/
private String taxGroupName;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table assets_list
......@@ -1249,6 +1271,42 @@ public class CitAssetsListDto implements Serializable {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column assets_list.tax_account_compare
*
* @param taxAccountCompare the value for assets_list.tax_account_compare
*
* @mbg.generated
*/
public void setTaxAccountCompare(Integer taxAccountCompare) {
this.taxAccountCompare = taxAccountCompare;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column assets_list.tax_group_name
*
* @return the value of assets_list.tax_group_name
*
* @mbg.generated
*/
public String getTaxGroupName() {
return taxGroupName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column assets_list.tax_group_name
*
* @param taxGroupName the value for assets_list.tax_group_name
*
* @mbg.generated
*/
public void setTaxGroupName(String taxGroupName) {
this.taxGroupName = taxGroupName == null ? null : taxGroupName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table assets_list
......@@ -1296,6 +1354,8 @@ public class CitAssetsListDto implements Serializable {
sb.append(", assetType=").append(assetType);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", taxAccountCompare=").append(taxAccountCompare);
sb.append(", taxGroupName=").append(taxGroupName);
sb.append("]");
return sb.toString();
}
......
......@@ -16,6 +16,7 @@ import pwc.taxtech.atms.dao.CitAssetGroupResultMapper;
import pwc.taxtech.atms.dao.CitAssetsListMapper;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.entity.AssetsList;
import java.io.File;
import java.io.IOException;
......@@ -61,12 +62,16 @@ public class AssetListServiceImpl extends BaseService {
/**
* 根据资产类别(固定资产、长期待摊、无形资产)查询出结果
*/
public List<CitAssetsListDto> getAssetResultList(Integer assetType) throws Exception {
public List<CitAssetsListDto> getAssetResultList(Integer assetType, String projectId,Integer taxAccountCompare) throws Exception {
logger.debug("根据资产类别(固定资产、长期待摊、无形资产)查询出结果");
CitAssetsListExample assetListExample = new CitAssetsListExample();
CitAssetsListExample.Criteria criteria = assetListExample.createCriteria();
criteria.andProjectIdEqualTo(projectId);
criteria.andAssetTypeEqualTo(assetType);
criteria.andStatusEqualTo(1);
if(taxAccountCompare != 2){
criteria.andTaxAccountCompareEqualTo(taxAccountCompare);
}
List<CitAssetsList> citAssetsLists = assetListMapper.selectByExample(assetListExample);
List<CitAssetsListDto> citAssetsListDtos = new ArrayList<>();
for (CitAssetsList citAssetsList:citAssetsLists){
......@@ -283,9 +288,10 @@ public class AssetListServiceImpl extends BaseService {
.filter(groupResult -> groupResult.getAssetName().equals(citAsset.getAssetGroupName())).collect(Collectors.toList());
//通过判断过滤后的集合来确认是否已经对该资产类别进行过分类
if(groupResults != null && groupResults.size()>0){
Integer assetGroupType = selectAssetGroup(groupResults.get(0).getAssetGroupId()).getAssetGroupType();
AssetDetailGroup assetDetailGroup = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId());
// Integer assetGroupType = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId()).getAssetGroupType();
//进行税务的计算
setCitAssetTaxData(citAsset,groupResults.get(0),assetGroupType);
setCitAssetTaxData(citAsset,groupResults.get(0),assetDetailGroup);
}else{
//没有进行过分类,放入Set集合里面
assetNameSet.add(assetName);
......@@ -357,10 +363,11 @@ public class AssetListServiceImpl extends BaseService {
for (CitAssetGroupResult assetGroupResult : assetGroupResults) {
//根据主键修改资产类别有关数据,主要修改的字段为资产一级分类主键、资产二级分类主键
assetGroupResultMapper.updateByPrimaryKeySelective(assetGroupResult);
Integer assetGroupType = selectAssetGroup(assetGroupResult.getAssetGroupId()).getAssetGroupType();
List<CitAssetsList> citAssetsLists = selectAssetsList(projectId, assetGroupResult.getAssetName());
AssetDetailGroup assetDetailGroup = selectAssetDetailGroup(assetGroupResult.getAssetDetailGroupId());
// Integer assetGroupType = selectAssetGroup(assetGroupResult.getAssetGroupId()).getAssetGroupType();
List<CitAssetsList> citAssetsLists = selectAssetsList(projectId, assetGroupResult.getAssetName(),saveGroupType);
citAssetsLists.stream().forEach(citAsset -> {
setCitAssetTaxData(citAsset,assetGroupResult,assetGroupType);
setCitAssetTaxData(citAsset,assetGroupResult,assetDetailGroup);
});
}
......@@ -373,14 +380,18 @@ public class AssetListServiceImpl extends BaseService {
return null;
}
/**
* 设置税务数据
* @param citAsset
* @param assetGroupResult
* @param assetGroupType
* @param assetDetailGroup
*/
public void setCitAssetTaxData(CitAssetsList citAsset,CitAssetGroupResult assetGroupResult,Integer assetGroupType){
public void setCitAssetTaxData(CitAssetsList citAsset,CitAssetGroupResult assetGroupResult,AssetDetailGroup assetDetailGroup){
Calendar cal = Calendar.getInstance();
//设置税法分类
citAsset.setTaxGroupName(assetDetailGroup.getDetailGroupName());
Integer assetGroupType = assetDetailGroup.getAssetGroupType();
//获取税务折旧期限,此值根据分类查数据库带出的值不在此进行操作
citAsset.setTaxDepreciationPeriod(assetGroupResult.getTaxDepreciationPeriod());
//获取截止去年累计折旧期间,此值根据分类查数据库带出的值不在此进行操作
......@@ -413,14 +424,23 @@ public class AssetListServiceImpl extends BaseService {
citAsset.setYearDifferenceAmount(citAsset.getTaxCurrentYearDepreciationAmount().subtract(citAsset.getAccountYearDepreciationAmount()));
//获取保留差异
citAsset.setIsRetain(1);
//获取资产一级分类
//获取资产一级分类的类型
citAsset.setAssetType(assetGroupType);
//设置税会比较值
citAsset.setTaxAccountCompare(citAsset.getTaxCurrentYearDepreciationAmount().compareTo(citAsset.getAccountYearDepreciationAmount())==1?1:0);
//更改资产状态,已进行分类并有效
citAsset.setStatus(1);
//根据主键修改资产清单数据
assetListMapper.updateByPrimaryKeySelective(citAsset);
}
public ApiResultDto updateAssetResultList(List<CitAssetsList> assetsLists, String projectId){
for(CitAssetsList citAsset:assetsLists){
assetListMapper.updateByPrimaryKeySelective(citAsset);
}
return null;
}
/**
* 获取符合条件(projectId、未进行分类)的资产清单数据
* @param projectId
......@@ -440,12 +460,16 @@ public class AssetListServiceImpl extends BaseService {
* @param assetName
* @return
*/
private List<CitAssetsList> selectAssetsList(String projectId, String assetName) {
private List<CitAssetsList> selectAssetsList(String projectId, String assetName, Integer saveGroupType) {
CitAssetsListExample assetListExample = new CitAssetsListExample();
CitAssetsListExample.Criteria criteria = assetListExample.createCriteria();
criteria.andProjectIdEqualTo(projectId);
//0表示未进行分类的数据
criteria.andStatusEqualTo(0);
//当 saveGroupType为1时证明是初次导入进来时的数据需要进行状态的判断,当为其他或者为2时需要查询全部状态的数据
if(saveGroupType == 1){
criteria.andStatusEqualTo(0);
}
criteria.andAssetGroupNameEqualTo(assetName);
return assetListMapper.selectByExample(assetListExample);
}
......@@ -460,4 +484,8 @@ public class AssetListServiceImpl extends BaseService {
AssetGroupExample.Criteria criteria = assetGroupExample.createCriteria();
return assetGroupMapper.selectByPrimaryKey(id);
}
private AssetDetailGroup selectAssetDetailGroup(Long id) {
return assetDetailGroupMapper.selectByPrimaryKey(id);
}
}
......@@ -105,5 +105,4 @@ public interface CitAssetGroupResultMapper extends MyMapper {
* @mbg.generated
*/
int updateByPrimaryKey(CitAssetGroupResult record);
}
\ No newline at end of file
......@@ -395,6 +395,28 @@ public class CitAssetsList extends BaseEntity implements Serializable {
*/
private Date updateTime;
/**
* Database Column Remarks:
* 税会折旧大小比较结果;1表示税大,2表示会大
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column assets_list.tax_account_compare
*
* @mbg.generated
*/
private Integer taxAccountCompare;
/**
* Database Column Remarks:
* 税法分类,也是资产二级分类(asset_detail_group表中的detailGroupName)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column assets_list.tax_group_name
*
* @mbg.generated
*/
private String taxGroupName;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table assets_list
......@@ -1243,6 +1265,54 @@ public class CitAssetsList extends BaseEntity implements Serializable {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column assets_list.tax_account_compare
*
* @return the value of assets_list.tax_account_compare
*
* @mbg.generated
*/
public Integer getTaxAccountCompare() {
return taxAccountCompare;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column assets_list.tax_account_compare
*
* @param taxAccountCompare the value for assets_list.tax_account_compare
*
* @mbg.generated
*/
public void setTaxAccountCompare(Integer taxAccountCompare) {
this.taxAccountCompare = taxAccountCompare;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column assets_list.tax_group_name
*
* @return the value of assets_list.tax_group_name
*
* @mbg.generated
*/
public String getTaxGroupName() {
return taxGroupName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column assets_list.tax_group_name
*
* @param taxGroupName the value for assets_list.tax_group_name
*
* @mbg.generated
*/
public void setTaxGroupName(String taxGroupName) {
this.taxGroupName = taxGroupName == null ? null : taxGroupName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table assets_list
......@@ -1290,6 +1360,8 @@ public class CitAssetsList extends BaseEntity implements Serializable {
sb.append(", assetType=").append(assetType);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", taxAccountCompare=").append(taxAccountCompare);
sb.append(", taxGroupName=").append(taxGroupName);
sb.append("]");
return sb.toString();
}
......
......@@ -2335,6 +2335,136 @@ public class CitAssetsListExample {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andTaxAccountCompareIsNull() {
addCriterion("tax_account_compare is null");
return (Criteria) this;
}
public Criteria andTaxAccountCompareIsNotNull() {
addCriterion("tax_account_compare is not null");
return (Criteria) this;
}
public Criteria andTaxAccountCompareEqualTo(Integer value) {
addCriterion("tax_account_compare =", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareNotEqualTo(Integer value) {
addCriterion("tax_account_compare <>", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareGreaterThan(Integer value) {
addCriterion("tax_account_compare >", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareGreaterThanOrEqualTo(Integer value) {
addCriterion("tax_account_compare >=", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareLessThan(Integer value) {
addCriterion("tax_account_compare <", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareLessThanOrEqualTo(Integer value) {
addCriterion("tax_account_compare <=", value, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareIn(List<Integer> values) {
addCriterion("tax_account_compare in", values, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareNotIn(List<Integer> values) {
addCriterion("tax_account_compare not in", values, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareBetween(Integer value1, Integer value2) {
addCriterion("tax_account_compare between", value1, value2, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxAccountCompareNotBetween(Integer value1, Integer value2) {
addCriterion("tax_account_compare not between", value1, value2, "taxAccountCompare");
return (Criteria) this;
}
public Criteria andTaxGroupNameIsNull() {
addCriterion("tax_group_name is null");
return (Criteria) this;
}
public Criteria andTaxGroupNameIsNotNull() {
addCriterion("tax_group_name is not null");
return (Criteria) this;
}
public Criteria andTaxGroupNameEqualTo(String value) {
addCriterion("tax_group_name =", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameNotEqualTo(String value) {
addCriterion("tax_group_name <>", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameGreaterThan(String value) {
addCriterion("tax_group_name >", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameGreaterThanOrEqualTo(String value) {
addCriterion("tax_group_name >=", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameLessThan(String value) {
addCriterion("tax_group_name <", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameLessThanOrEqualTo(String value) {
addCriterion("tax_group_name <=", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameLike(String value) {
addCriterion("tax_group_name like", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameNotLike(String value) {
addCriterion("tax_group_name not like", value, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameIn(List<String> values) {
addCriterion("tax_group_name in", values, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameNotIn(List<String> values) {
addCriterion("tax_group_name not in", values, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameBetween(String value1, String value2) {
addCriterion("tax_group_name between", value1, value2, "taxGroupName");
return (Criteria) this;
}
public Criteria andTaxGroupNameNotBetween(String value1, String value2) {
addCriterion("tax_group_name not between", value1, value2, "taxGroupName");
return (Criteria) this;
}
}
/**
......
......@@ -41,6 +41,8 @@
<result column="asset_type" jdbcType="INTEGER" property="assetType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="tax_account_compare" jdbcType="INTEGER" property="taxAccountCompare" />
<result column="tax_group_name" jdbcType="VARCHAR" property="taxGroupName" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -120,7 +122,8 @@
account_total_depreciation_amount, tax_depreciation_period, tax_to_last_year_depreciation_period,
tax_to_current_year_depreciation_period, tax_year_depreciation_period, tax_month_depreciation_amount,
tax_to_current_year_depreciation_amount, tax_current_year_depreciation_amount, total_difference_amount,
year_difference_amount, is_retain, asset_type, create_time, update_time
year_difference_amount, is_retain, asset_type, create_time, update_time, tax_account_compare,
tax_group_name
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.CitAssetsListExample" resultMap="BaseResultMap">
<!--
......@@ -186,7 +189,8 @@
tax_month_depreciation_amount, tax_to_current_year_depreciation_amount,
tax_current_year_depreciation_amount, total_difference_amount,
year_difference_amount, is_retain, asset_type,
create_time, update_time)
create_time, update_time, tax_account_compare,
tax_group_name)
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER},
#{assetNumber,jdbcType=VARCHAR}, #{assetGroupName,jdbcType=VARCHAR}, #{assetDetailGroupId,jdbcType=BIGINT},
#{assetDescription,jdbcType=VARCHAR}, #{buyDate,jdbcType=TIMESTAMP}, #{depreciationDate,jdbcType=TIMESTAMP},
......@@ -200,7 +204,8 @@
#{taxMonthDepreciationAmount,jdbcType=DECIMAL}, #{taxToCurrentYearDepreciationAmount,jdbcType=DECIMAL},
#{taxCurrentYearDepreciationAmount,jdbcType=DECIMAL}, #{totalDifferenceAmount,jdbcType=DECIMAL},
#{yearDifferenceAmount,jdbcType=DECIMAL}, #{isRetain,jdbcType=INTEGER}, #{assetType,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{taxAccountCompare,jdbcType=INTEGER},
#{taxGroupName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.CitAssetsList">
<!--
......@@ -314,6 +319,12 @@
<if test="updateTime != null">
update_time,
</if>
<if test="taxAccountCompare != null">
tax_account_compare,
</if>
<if test="taxGroupName != null">
tax_group_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -421,6 +432,12 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="taxAccountCompare != null">
#{taxAccountCompare,jdbcType=INTEGER},
</if>
<if test="taxGroupName != null">
#{taxGroupName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.entity.CitAssetsListExample" resultType="java.lang.Long">
......@@ -545,6 +562,12 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.taxAccountCompare != null">
tax_account_compare = #{record.taxAccountCompare,jdbcType=INTEGER},
</if>
<if test="record.taxGroupName != null">
tax_group_name = #{record.taxGroupName,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -590,7 +613,9 @@
is_retain = #{record.isRetain,jdbcType=INTEGER},
asset_type = #{record.assetType,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
tax_account_compare = #{record.taxAccountCompare,jdbcType=INTEGER},
tax_group_name = #{record.taxGroupName,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -704,6 +729,12 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="taxAccountCompare != null">
tax_account_compare = #{taxAccountCompare,jdbcType=INTEGER},
</if>
<if test="taxGroupName != null">
tax_group_name = #{taxGroupName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -746,7 +777,9 @@
is_retain = #{isRetain,jdbcType=INTEGER},
asset_type = #{assetType,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
tax_account_compare = #{taxAccountCompare,jdbcType=INTEGER},
tax_group_name = #{taxGroupName,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.CitAssetsListExample" resultMap="BaseResultMap">
......
{
"@HowToUse": "在提交前,使用PWC.sortJson()对json内容进行排序",
"1stQuarterlyCITFilingReturn": "1st Quarterly CIT Filing Return",
"2ndQuarterlyCITFilingReturn": "2nd Quarterly CIT Filing Return",
"3rdQuarterlyCITFilingReturn": "3rd Quarterly CIT Filing Return",
"4thQuarterlyCITFilingReturn": "4th Quarterly CIT Filing Return",
"AllTask": "All",
"AnnualCITFilingReturn": "Annual CIT Filing Return",
"AnnualCITFilingWorkingPaper": "Annual CIT Filing Working Paper",
"AuditFeedback": "Tax audit feedback",
"AuditImplementation": "Tax audit implementation",
"AuditNotice": "Tax audit notice",
"AuditReport": "Audit report",
"AuditSolution": "Tax audit solution",
"BNDKJTXE": "Amortization in current year:",
"BS": "Balance sheet",
"BankGroup": "Certificate of bank and group",
"Cancellation": "Establishment, liquidation and cancellation of branches",
"CompleteTask": "Completed",
"CreateTask": "Create Task",
"CreditRecord": "Tax credit record",
"DFFSETotal": "Total Credit Amt:",
"DFJETotal": "Total Credit Amt:",
"DataProcessDataName_AnnualSettlement": "Annual CIT Filing Return",
"DataProcessDataName_CITFirstQuarterly": "1st Quarter",
"DataProcessDataName_CITForthQuarterly": "4th Quarter",
"DataProcessDataName_CITQuarterly": "Quarterly CIT Filing Return",
"DataProcessDataName_CITSecondQuarterly": "2nd Quarter",
"DataProcessDataName_CITThirdQuarterly": "3rd Quarter",
"DataProcessDataName_UpdateReportConfig": "Update Report Configuration",
"DataProcessDataName_FinanceReport": "Financial Report",
"DataProcessDataName_GenerateReport": "Generate Report",
"DataProcessDataName_ModelAnalysis": "Model Analytics",
"DataProcessDataName_UpdateTB": "Update Trial Balance",
"DataProcessDataName_YearWorkPaper": "Annual CIT Filing Working Paper",
"DataProcessData_Generate": "Generate",
"DataProcessData_PreGenerate": "Generate",
"DataProcessData_Update": "Update",
"DepreciationCurrentYearTotal": "Total Depreciation",
"DepreciationPerTaxCurrentYearTotal": "Total Tax Depreciation",
"DividendReturn": "Dividend return",
"DueDate": "Due Date",
"FinancialReport": "Financial Report",
"InprogressTask": "In Progress",
"JFFSETotal": "Total Debit Amt:",
"JFJETotal": "Total Debit Amt:",
"NeedToUpdate": "Need to update",
"NotBeginTask": "Not Started",
"OtherRecordFiling": "Other record filing",
"OutDateTask": "Overdue",
"OutOfDateTask": "Overdue",
"PL": "Profit and Loss statement",
"PZCITCount": "Total Records:",
"Planning": "Tax planning",
"PleaseSelectAtLeastOneItem": "Please select at least one item!",
"ProfitAndLossStatement": "Profit and Loss statement",
"QCYETotal": "Total Begin Balance:",
"QMYETotal": "Total End Balance:",
"QNDKJZJE": "Depreciation last year:",
"QuarterlyCITFilingReturn": "Quarterly CIT Filing Return",
"RecordFiling": "Record filing of tax deduction on asset loss",
"SpecialTasks": "Special tax tasks",
"TBDataNum": "Total Records:",
"TaskDescription": "Description",
"TaskEntity": "Entity",
"TaskName": "Task Name",
"TaxInspection": "Tax inspection",
"TaxStatistics": "Investigation and statistics from tax bureau",
"TaxTaskManage": "Tax Task Management",
"TaxTaskType": "Task Type",
"ThisWeek": "This Week",
"Today": "Today",
"WaitCompleteTask": "In Progress",
"dateFormat4YearMonthDay": "yyyy-mm-dd",
"noData": "No Data",
"toUpdate": "To be updated",
"~MustBeEndOneApp": "I Must be the End One, please!"
{
"@HowToUse": "在提交前,使用PWC.sortJson()对json内容进行排序",
"1stQuarterlyCITFilingReturn": "1st Quarterly CIT Filing Return",
"2ndQuarterlyCITFilingReturn": "2nd Quarterly CIT Filing Return",
"3rdQuarterlyCITFilingReturn": "3rd Quarterly CIT Filing Return",
"4thQuarterlyCITFilingReturn": "4th Quarterly CIT Filing Return",
"AllTask": "All",
"AnnualCITFilingReturn": "Annual CIT Filing Return",
"AnnualCITFilingWorkingPaper": "Annual CIT Filing Working Paper",
"AuditFeedback": "Tax audit feedback",
"AuditImplementation": "Tax audit implementation",
"AuditNotice": "Tax audit notice",
"AuditReport": "Audit report",
"AuditSolution": "Tax audit solution",
"BNDKJTXE": "Amortization in current year:",
"BS": "Balance sheet",
"BankGroup": "Certificate of bank and group",
"Cancellation": "Establishment, liquidation and cancellation of branches",
"CompleteTask": "Completed",
"CreateTask": "Create Task",
"CreditRecord": "Tax credit record",
"DFFSETotal": "Total Credit Amt:",
"DFJETotal": "Total Credit Amt:",
"DataProcessDataName_AnnualSettlement": "Annual CIT Filing Return",
"DataProcessDataName_CITFirstQuarterly": "1st Quarter",
"DataProcessDataName_CITForthQuarterly": "4th Quarter",
"DataProcessDataName_CITQuarterly": "Quarterly CIT Filing Return",
"DataProcessDataName_CITSecondQuarterly": "2nd Quarter",
"DataProcessDataName_CITThirdQuarterly": "3rd Quarter",
"DataProcessDataName_UpdateReportConfig": "Update Report Configuration",
"DataProcessDataName_FinanceReport": "Financial Report",
"DataProcessDataName_GenerateReport": "Generate Report",
"DataProcessDataName_ModelAnalysis": "Model Analytics",
"DataProcessDataName_UpdateTB": "Update Trial Balance",
"DataProcessDataName_YearWorkPaper": "Annual CIT Filing Working Paper",
"DataProcessData_Generate": "Generate",
"DataProcessData_PreGenerate": "Generate",
"DataProcessData_Update": "Update",
"DepreciationCurrentYearTotal": "Total Depreciation",
"DepreciationPerTaxCurrentYearTotal": "Total Tax Depreciation",
"DividendReturn": "Dividend return",
"DueDate": "Due Date",
"FinancialReport": "Financial Report",
"InprogressTask": "In Progress",
"JFFSETotal": "Total Debit Amt:",
"JFJETotal": "Total Debit Amt:",
"NeedToUpdate": "Need to update",
"NotBeginTask": "Not Started",
"OtherRecordFiling": "Other record filing",
"OutDateTask": "Overdue",
"OutOfDateTask": "Overdue",
"PL": "Profit and Loss statement",
"PZCITCount": "Total Records:",
"Planning": "Tax planning",
"PleaseSelectAtLeastOneItem": "Please select at least one item!",
"ProfitAndLossStatement": "Profit and Loss statement",
"QCYETotal": "Total Begin Balance:",
"QMYETotal": "Total End Balance:",
"QNDKJZJE": "Depreciation last year:",
"QuarterlyCITFilingReturn": "Quarterly CIT Filing Return",
"RecordFiling": "Record filing of tax deduction on asset loss",
"SpecialTasks": "Special tax tasks",
"TBDataNum": "Total Records:",
"TaskDescription": "Description",
"TaskEntity": "Entity",
"TaskName": "Task Name",
"TaxInspection": "Tax inspection",
"TaxStatistics": "Investigation and statistics from tax bureau",
"TaxTaskManage": "Tax Task Management",
"TaxTaskType": "Task Type",
"ThisWeek": "This Week",
"Today": "Today",
"WaitCompleteTask": "In Progress",
"dateFormat4YearMonthDay": "yyyy-mm-dd",
"noData": "No Data",
"toUpdate": "To be updated",
"~MustBeEndOneApp": "I Must be the End One, please!",
"TaxAccountDifference": "税会差异",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧"
}
\ No newline at end of file
......@@ -81,6 +81,9 @@
"TaxGroupType": "税法分类",
"TaxToLastYearDepreciationPeriod": "截止去年累计折旧期间",
"TaxToCurrentYearDepreciationPeriod": "截止本年累计折旧期间",
"TaxAccountDifference": "税会差异",
"TaxGreaterAccount": "会计折旧&lt;=税务折旧",
"TaxLessAccount": "会计折旧&gt;税务折旧",
"BuyDateType": "日期错误",
"AssetNumberType": "资产编号错误",
"AssetGroupNameType": "资产类别错误",
......
......@@ -7,6 +7,7 @@
'use strict';
var projectId = vatSessionService.project.id;
var taxAccountCompare = 2;
var successCount = 0;
var uploadUrl = apiInterceptor.webApiHostUrl + '/asset/assetsImport';
var webHost = loginContext.apiHost;
......@@ -676,7 +677,7 @@
$scope.TotalAccountYearDepreciationAmount = 0;
$scope.TotalTaxCurrentYearDepreciationAmount = 0;
$scope.TotalYearDifferenceAmount = 0
assetListService.getAssetResultList(assetType).success(function (assetListData) {
assetListService.getAssetResultList(assetType,projectId,taxAccountCompare).success(function (assetListData) {
debugger;
var data = assetListData.data;
if (data) {
......@@ -758,7 +759,7 @@
}
}
//初始化编辑dataGrid
//初始化编辑d资产分类(asset_group_result)ataGrid
var InitGrid = function (showAdd) {
$scope.assetsGridOptions = {
bindingOptions: {
......@@ -927,10 +928,6 @@
{
caption: $translate.instant('IsRetain'), alignment: 'center', dataField: "isRetain", dataType: "boolean", width: 120, allowEditing: true
},
{
caption: $translate.instant('IsRetain'), alignment: 'center', dataField: "isRetain", dataType: "boolean", width: 120, allowEditing: true
},
];
$scope.assetsResultGridOptions = {
......@@ -962,6 +959,13 @@
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>');
e.cellElement.addClass('herder-center');
e.cellElement.append($compile(inputElement)($scope));
}
}
},
loadPanel: {
......@@ -1001,7 +1005,7 @@
var defaultFun = savebutton.options.onClick;
var saveAsset = function () {
defaultFun();
assetListService.updateAssetResultList(targetArray).success(function (data) {
assetListService.updateAssetResultList(targetArray,projectId).success(function (data) {
if (data) {
getAssetResultList($scope.displayType - 1);
SweetAlert.success($translate.instant('SaveSuccess'));
......@@ -1021,6 +1025,29 @@
}
}
}
//税会差异选项内容
$scope.applyFilterTypes = [{
key: "2",
name: $translate.instant('AllTheItems')
}, {
key: "0",
name: $translate.instant('TaxLessAccount')
}, {
key: "1",
name: $translate.instant('TaxGreaterAccount')
}];
//初始化税会差异选项
$scope.taxAccountDifferenceOptions = {
items: $scope.applyFilterTypes,
value: $scope.applyFilterTypes[0].key,
valueExpr: "key",
displayExpr: "name",
onValueChanged: function(data) {
debugger;
taxAccountCompare = data.value;
getAssetResultList($scope.displayType - 1);
}
};
//获取数据服务
var getGroupList = function () {
......@@ -1231,7 +1258,7 @@
}
};
//弹出分类界面
//弹出分类界面,1、先获取asset_group_result表中的数据,并赋值给数据集assetGroupResultDataSource
$scope.setAssetsGroup = function () {
assetListService.getAssetGroupResultData(projectId).success(function (groupResultData) {
var data = groupResultData.data;
......@@ -1243,7 +1270,9 @@
//orgAssetGroupList = angular.copy(data);
$scope.assetGroupResultDataSource = data;
}
//初始化资产分类Grid
InitGrid(true);
//此值传入后台用来分辨当前是导入文件时的保存资产分类或者是直接点击资产分类按钮保存资产分类
$scope.saveGroupType = 2;
$scope.isDisabled = false;
$scope.modalInstance = $uibModal.open({
......@@ -1375,7 +1404,7 @@
initColumns();
initDxGrid();
initAssetResultDxGrid();
getAssetResultList(1);
getAssetResultList(1);
// initDataFromDB();
getGroupList();
getGroupDetailList();
......
<div id="vat-import-container">
<div class="vat-import-menu">
<div class="vat-import-menu">
<perfect-scrollbar class="scroller" wheel-propagation="true" wheel-speed="1" min-scrollbar-length="20">
<div class="li" ng-repeat="menu in ::menus" atms-permission permission-control-type="ngIf" permission-code="{{::menu.permission}}" ng-show="true">
<a ui-sref-active="active" ui-sref=".{{::menu.name}}">
<i ng-show="menu.name==='balanceSheet' && errorCount !== 0" class="fa fa-circle" style="/* display: block; *//* padding-bottom: 10px; */color: rgb(255, 140, 60);/* float: left; *//* padding-right: 10px; */margin-left: 40px;font-size: 10px;" aria-hidden="true"></i>
<i class="{{::menu.icon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::menu.text}}</span>
</a>
</div>
<!--分组的万能导入菜单 -->
<ul class="nav" id="sidebar" ng-show="isImportMenu">
<li ng-repeat="tableGroup in tableMenuList" ng-include="'menuTree'">
</li>
</ul>
<!--没有分组的万能导入菜单 -->
<div class="li" ng-repeat="table in noGroupTableList" atms-permission permission-control-type="ngIf" permission-code="{{::table.citQueryCode}}" ng-show="isImportMenu && table.show">
<a ui-sref-active="active" ui-sref=".importDataView({ id: table.id, serviceType: serviceTypeId })">
<i class="{{::importIcon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::table.chineseName}}</span>
</a>
</div>
</perfect-scrollbar>
</div>
</div>
<script type="text/ng-template" id="menuTree">
<div class="table-menu" ng-click="showMenu(tableGroup)" title="{{::tableGroup.menuNameCN}}" ng-if="tableGroup.tableList && tableGroup.tableList.length>0">
<i class="fa fa-chevron-down" ng-if="!tableGroup.isMenuClosed" style="padding-bottom: 10px;" aria-hidden="true"></i>
<i class="fa fa-chevron-right" ng-if="tableGroup.isMenuClosed" style="padding-bottom: 10px;" aria-hidden="true"></i>
<i class="fa fa-align-left" style="padding-bottom: 10px;padding-left:5px;" aria-hidden="true"></i>
<span>{{::tableGroup.menuNameCN}}</span>
</div>
<div class="li" ng-repeat="table in ::tableGroup.tableList" atms-permission permission-control-type="ngIf" permission-code="{{::table.citQueryCode}}"
ng-show="isImportMenu && !tableGroup.isMenuClosed && table.show">
<a ui-sref-active="active" ui-sref=".importDataView({ id: table.id, serviceType: serviceTypeId })">
<i class="{{::importIcon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::table.chineseName}}</span>
</a>
</div>
</script>
<div class="vat-import-content" ui-view></div>
</div>
<div id="vat-import-container">
<div class="vat-import-menu">
<div class="vat-import-menu">
<perfect-scrollbar class="scroller" wheel-propagation="true" wheel-speed="1" min-scrollbar-length="20">
<div class="li" ng-repeat="menu in ::menus" atms-permission permission-control-type="ngIf" permission-code="{{::menu.permission}}" ng-show="true">
<a ui-sref-active="active" ui-sref=".{{::menu.name}}">
<i ng-show="menu.name==='balanceSheet' && errorCount !== 0" class="fa fa-circle" style="/* display: block; *//* padding-bottom: 10px; */color: rgb(255, 140, 60);/* float: left; *//* padding-right: 10px; */margin-left: 40px;font-size: 10px;" aria-hidden="true"></i>
<i class="{{::menu.icon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::menu.text}}</span>
</a>
</div>
<!--分组的万能导入菜单 -->
<ul class="nav" id="sidebar" ng-show="isImportMenu">
<li ng-repeat="tableGroup in tableMenuList" ng-include="'menuTree'">
</li>
</ul>
<!--没有分组的万能导入菜单 -->
<div class="li" ng-repeat="table in noGroupTableList" atms-permission permission-control-type="ngIf" permission-code="{{::table.citQueryCode}}" ng-show="isImportMenu && table.show">
<a ui-sref-active="active" ui-sref=".importDataView({ id: table.id, serviceType: serviceTypeId })">
<i class="{{::importIcon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::table.chineseName}}</span>
</a>
</div>
</perfect-scrollbar>
</div>
</div>
<script type="text/ng-template" id="menuTree">
<div class="table-menu" ng-click="showMenu(tableGroup)" title="{{::tableGroup.menuNameCN}}" ng-if="tableGroup.tableList && tableGroup.tableList.length>0">
<i class="fa fa-chevron-down" ng-if="!tableGroup.isMenuClosed" style="padding-bottom: 10px;" aria-hidden="true"></i>
<i class="fa fa-chevron-right" ng-if="tableGroup.isMenuClosed" style="padding-bottom: 10px;" aria-hidden="true"></i>
<i class="fa fa-align-left" style="padding-bottom: 10px;padding-left:5px;" aria-hidden="true"></i>
<span>{{::tableGroup.menuNameCN}}</span>
</div>
<div class="li" ng-repeat="table in ::tableGroup.tableList" atms-permission permission-control-type="ngIf" permission-code="{{::table.citQueryCode}}"
ng-show="isImportMenu && !tableGroup.isMenuClosed && table.show">
<a ui-sref-active="active" ui-sref=".importDataView({ id: table.id, serviceType: serviceTypeId })">
<i class="{{::importIcon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::table.chineseName}}</span>
</a>
</div>
</script>
<div class="vat-import-content" ui-view style="overflow: auto"></div>
</div>
......@@ -6,9 +6,9 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
debugger;
return $http.get('/asset/getAssetListData', apiConfig.create());
},
getAssetResultList: function (assetType) {
getAssetResultList: function (assetType,projectId, taxAccountCompare) {
debugger;
return $http.get('/asset/getAssetResultList?assetType=' + assetType, apiConfig.create());
return $http.get('/asset/getAssetResultList?assetType=' + assetType + '&projectId=' + projectId + '&taxAccountCompare=' + taxAccountCompare, apiConfig.create());
},
getAssetGroupResultData: function (projectId) {
debugger;
......@@ -26,6 +26,10 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
debugger;
return $http.post('/asset/saveAssetGroupInfo?saveGroupType=' + saveGroupType + '&projectId=' + projectId,assetGroupResults, apiConfig.create());
},
updateAssetResultList:function (assetsList,projectId) {
debugger;
return $http.post('/asset/updateAssetResultList?projectId=' + projectId,assetsList, 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