恢复对比功能
This commit is contained in:
parent
f40d2bec91
commit
89812f45f8
|
|
@ -4,7 +4,9 @@ import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
|||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.remote.tax.response.calculate.GetASynIndividualIncomeTaxFeedbackResponse;
|
||||
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -56,6 +58,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getZcgzxj().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
REMUNERATION_FOR_LABOR(4, "0400", "一般劳务报酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 160488) {
|
||||
@Override
|
||||
|
|
@ -86,6 +96,15 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getLwbclb().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
ONETIME_ANNUAL_BONUS(2, "0103", "全年一次性奖金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 160489) {
|
||||
@Override
|
||||
|
|
@ -116,6 +135,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getQnycxjjsslb().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
COMPENSATION_FOR_RETIRE(107, "0107", "内退一次性补偿金", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181936) {
|
||||
@Override
|
||||
|
|
@ -146,6 +172,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getNtycxbcjlb().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
COMPENSATION_FOR_DISMISS(108, "0108", "解除劳动合同一次性补偿金", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181937) {
|
||||
@Override
|
||||
|
|
@ -175,7 +208,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getJcldhtycxbcjlb().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE(109, "0109", "个人股权激励收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181938) {
|
||||
@Override
|
||||
|
|
@ -205,7 +244,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getGrgqjl().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
ANNUITY_RECEIPT(110, "0110", "年金领取", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181939) {
|
||||
@Override
|
||||
|
|
@ -235,7 +280,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getQynj().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
INCOME_FOR_INSURANCE_SALESMAN(402, "0402", "保险营销员佣金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181940) {
|
||||
@Override
|
||||
|
|
@ -266,6 +317,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getBxyxy().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
|
||||
},
|
||||
INCOME_FOR_SECURITIES_BROKER(403, "0403", "证券经纪人佣金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181942) {
|
||||
@Override
|
||||
|
|
@ -296,6 +355,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getZqjjr().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
|
||||
},
|
||||
REMUNERATION_FOR_OTHER_CONTINUOUS_LABOR(489, "0489", "其他连续劳务报酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181943) {
|
||||
@Override
|
||||
|
|
@ -325,7 +392,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtlxlwbc().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
REMUNERATION_FOR_OTHER_LABOR(499, "0499", "其他非连续劳务报酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 175330) {
|
||||
@Override
|
||||
|
|
@ -356,6 +429,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtflxlwbc().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
|
||||
},
|
||||
REMUNERATION_FOR_AUTHOR(500, "0500", "稿酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181944) {
|
||||
@Override
|
||||
|
|
@ -385,7 +466,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getGcsdlb().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
ROYALTIES(600, "0600", "特许权使用费所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181945) {
|
||||
|
||||
|
|
@ -417,6 +504,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw> zhsd = declareTaxResultFeedbackResponse.getBody().getZhsd().getTxq().getSscglb();
|
||||
List<List<Object>> zhsdSheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.zhsd.zcgzxj.zhsdscjgbw.class, zhsd);
|
||||
result.put(this.getDefaultLabel(), zhsdSheetData);
|
||||
return result;
|
||||
}
|
||||
|
||||
},
|
||||
NON_RESIDENT_INCOME_WAGES_AND_SALARIES(700, "0700", "无住所个人正常工资薪金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
|
||||
|
|
@ -447,7 +542,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw> fjmsd = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjgzxjlb().getSscglb();
|
||||
List<List<Object>> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw.class, fjmsd);
|
||||
result.put(this.getDefaultLabel(), sheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
NON_RESIDENT_INCOME_MONTHLY_BONUS(710, "0710", "无住所个人数月奖金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -477,7 +578,13 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw> fjmsd = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjrysyjjlb().getSscglb();
|
||||
List<List<Object>> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw.class, fjmsd);
|
||||
result.put(this.getDefaultLabel(), sheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
NON_RESIDENT_INCOME_REMUNERATION_FOR_LABOR(720, "0720", "一般劳务报酬所得", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -507,6 +614,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw> fjmsd = declareTaxResultFeedbackResponse.getBody().getFjmsd().getLwbclb().getSscglb();
|
||||
List<List<Object>> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw.class, fjmsd);
|
||||
result.put(this.getDefaultLabel(), sheetData);
|
||||
return result;
|
||||
}
|
||||
},
|
||||
NON_RESIDENT_INCOME_COMPENSATION_FOR_DISMISS(730, "0730", "解除劳动合同一次性补偿金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -536,6 +651,14 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) {
|
||||
List<GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw> fjmsd = declareTaxResultFeedbackResponse.getBody().getFjmsd().getJcldhtycxbcjlb().getSscglb();
|
||||
List<List<Object>> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw.class, fjmsd);
|
||||
result.put(this.getDefaultLabel(), sheetData);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -560,6 +683,9 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
public abstract Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO);
|
||||
|
||||
|
||||
public abstract Map<String, List<List<Object>>> parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse);
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@ package com.engine.salary.remote.tax.client;
|
|||
import com.engine.salary.constant.SzyhApiConstant;
|
||||
import com.engine.salary.entity.taxdeclaration.response.CancelDeclareFeedbackResponse;
|
||||
import com.engine.salary.entity.taxdeclaration.response.UpdateDeclareResponse;
|
||||
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
||||
import com.engine.salary.util.HttpUtil;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SingnatureData;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -22,6 +27,23 @@ public class DeclareClient extends TaxBaseClient {
|
|||
super(taxAgentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申报内置算税结果查询
|
||||
* @param requestId·
|
||||
* @return
|
||||
*/
|
||||
public GetDeclareTaxResultFeedbackResponse getDeclareTaxResultFeedback(String requestId){
|
||||
// 供应商信息
|
||||
String url = super.apiConfig.getHost() + "/gateway/iit/report/getDeclareTaxResultFeedback";
|
||||
Map<String, String> params = new HashMap<>(1);
|
||||
params.put("requestId", requestId);
|
||||
Map<String, String> header = SingnatureData.initHeader(Collections.emptyMap(), apiConfig.getAppKey(), apiConfig.getAppSecret());
|
||||
String res = HttpUtil.getRequest(url, header, params);
|
||||
|
||||
log.info("getDeclareTaxResultFeedback res --- {}", res);
|
||||
return JsonUtil.parseObject(res, GetDeclareTaxResultFeedbackResponse.class);
|
||||
}
|
||||
|
||||
|
||||
public CancelDeclareFeedbackResponse cancel(Map<String, Object> requestParam, Map<String, String> responseParam) {
|
||||
String url = apiConfig.getHost() + SzyhApiConstant.CANCEL_DECLARE;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationValueListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.ContrastQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationValueListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclareRecordDetailSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 个税申报表明细
|
||||
|
|
@ -86,6 +89,17 @@ public interface TaxDeclarationValueService {
|
|||
*/
|
||||
void autoAddWagesDeclare(TaxDeclareRecordPO po);
|
||||
|
||||
/**
|
||||
* 对比
|
||||
* @param param
|
||||
*/
|
||||
Map<String, Object> contrast(ContrastQueryParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 导出在线对比
|
||||
*/
|
||||
XSSFWorkbook exportContrast(ContrastQueryParam param);
|
||||
|
||||
/**
|
||||
* 根据主键删除
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ package com.engine.salary.service;
|
|||
|
||||
import com.engine.salary.common.YearMonthRange;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationRateDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.DeclareTaxResultFeedbackQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
|
@ -131,6 +133,16 @@ public interface TaxDeclareRecordService {
|
|||
void getDeclareFeedback(Long id, Integer reportType, TaxDeclarationRateDTO taxDeclarationRate);
|
||||
|
||||
|
||||
/**
|
||||
* 申报内置算税结果查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
Object getDeclareTaxResultFeedback(Long id);
|
||||
|
||||
XSSFWorkbook exportGetDeclareTaxResultFeedback(DeclareTaxResultFeedbackQueryParam param);
|
||||
|
||||
/**
|
||||
* 作废
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ public interface TaxReportColumnService {
|
|||
*/
|
||||
List<TaxReportColumnPO> listAll();
|
||||
|
||||
|
||||
/**
|
||||
* 根据是否是对比字段查询
|
||||
* @param contrastType 1是 0否
|
||||
* @return
|
||||
*/
|
||||
List<TaxReportColumnPO> listByContrastType(Integer contrastType);
|
||||
|
||||
/**
|
||||
* 根据所得项目查询个税申报表表头
|
||||
*
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public class SalaryCalcTaxServiceImpl extends Service implements SalaryCalcTaxSe
|
|||
// 查询个税扣缴义务人关联的报税信息
|
||||
List<TaxAgentTaxReturnPO> taxAgentTaxReturns = getTaxAgentTaxReturnService(user).getByTaxAgentIds(taxAgentIds);
|
||||
// 查询个税申报表字段
|
||||
List<TaxReportColumnPO> taxReportColumns = getTaxReportColumnService(user).listAll();
|
||||
List<TaxReportColumnPO> taxReportColumns = getTaxReportColumnService(user).listByContrastType(0);
|
||||
// 查询薪资核算记录关联薪资账套的个税申报配置
|
||||
List<SalarySobTaxReportRulePO> salarySobTaxReportRules = getSalarySobTaxReportRuleService(user)
|
||||
.listBySalarySobIds(Collections.singleton(salaryAcctRecord.getSalarySobId()));
|
||||
|
|
|
|||
|
|
@ -343,6 +343,192 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar
|
|||
batchSave(autoAddValuePOs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> contrast(ContrastQueryParam param) {
|
||||
|
||||
|
||||
TaxDeclarationPO taxDeclaration = getTaxDeclarationService(user).getById(param.getTaxDeclarationId());
|
||||
if (taxDeclaration == null) {
|
||||
throw new SalaryRunTimeException("无申报表");
|
||||
}
|
||||
|
||||
TaxDeclareRecordPO taxDeclareRecordPO = getTaxDeclareRecordMapper().getById(taxDeclaration.getTaxDeclareRecordId());
|
||||
if (taxDeclareRecordPO == null) {
|
||||
throw new SalaryRunTimeException("申报记录不存在!");
|
||||
}
|
||||
|
||||
Integer reportType = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()).getReportType().getValue();
|
||||
TaxDeclareStatusPO taxDeclareStatus = getTaxDeclareStatusService(user).getTaxDeclareStatus(taxDeclareRecordPO.getId(), reportType);
|
||||
|
||||
//线上数据
|
||||
DeclareClient declareClient = new DeclareClient(taxDeclareRecordPO.getTaxAgentId());
|
||||
GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse = declareClient.getDeclareTaxResultFeedback(taxDeclareStatus.getDeclareRequestId());
|
||||
|
||||
Map<String, List<List<Object>>> onlineDataMap = new HashMap<>();
|
||||
List<TaxDeclarationPO> list = getTaxDeclarationService(user).listByTaxDeclareRecordId(taxDeclareRecordPO.getId());
|
||||
list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(onlineDataMap, declareTaxResultFeedbackResponse));
|
||||
|
||||
Map<String, Object> resultList = new HashMap<>();
|
||||
List<TaxDeclarationValuePO> taxDeclarationValues = listByTaxDeclarationId(taxDeclaration.getId());
|
||||
|
||||
// 查询个税申报表表头
|
||||
IncomeCategoryEnum incomeCategoryEnum = SalaryEnumUtil.enumMatchByValue(taxDeclaration.getIncomeCategory(), IncomeCategoryEnum.class);
|
||||
List<TaxReportColumnPO> taxReportColumns = getTaxReportColumnService(user).listByIncomeCategory(incomeCategoryEnum);
|
||||
List<String> columns = SalaryEntityUtil.properties(taxReportColumns, TaxReportColumnPO::getReportColumnName, Collectors.toList());
|
||||
// 人员id
|
||||
Set<Long> employeeIds = SalaryEntityUtil.properties(taxDeclarationValues, TaxDeclarationValuePO::getEmployeeId);
|
||||
// 查询报送的人员
|
||||
List<EmployeeDeclarePO> employeeDeclares = getEmployeeDeclareService(user).listByTaxCycleAndTaxAgentIdAndEmployeeIds(taxDeclaration.getTaxCycle(), taxDeclaration.getTaxAgentId(), employeeIds);
|
||||
// 查询人员信息
|
||||
List<Long> simpleEmployeeIds = taxDeclarationValues.stream().filter(taxDeclarationValue -> taxDeclarationValue.getEmployeeType() == null || Objects.equals(taxDeclarationValue.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())).map(TaxDeclarationValuePO::getEmployeeId).distinct().collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIds(simpleEmployeeIds);
|
||||
// 查询人员薪资(身份证号码等)
|
||||
List<DataCollectionEmployee> simpleUserInfos = getSalaryEmployeeService(user).getEmployeeByIds(simpleEmployeeIds);
|
||||
// 查询外部人员
|
||||
List<Long> extEmployeeIds = taxDeclarationValues.stream().filter(taxDeclarationValue -> Objects.equals(taxDeclarationValue.getEmployeeType(), EmployeeTypeEnum.EXT_EMPLOYEE.getValue())).map(TaxDeclarationValuePO::getEmployeeId).collect(Collectors.toList());
|
||||
List<ExtEmpPO> extEmployees = getExtEmpService(user).getExtEmpByIds(extEmployeeIds);
|
||||
|
||||
// 艾志分权 240529注释
|
||||
// List<Long> taxAgentIds = getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
// Map<String, Object> authMap = getEmployeeDeclareService(user).empIdsByAzGssbAuth(user.getUID());
|
||||
// List<Long> canManageEmpIds = (List<Long>)authMap.get("canManageEmpIds");
|
||||
// if (!taxAgentIds.contains(taxDeclareRecordPO.getTaxAgentId())) {
|
||||
// taxDeclarationValues = taxDeclarationValues.stream().filter(po -> canManageEmpIds.contains(po.getEmployeeId())).collect(Collectors.toList());
|
||||
// }
|
||||
|
||||
// 列表数据
|
||||
List<Map<String, Object>> localList = TaxDeclarationValueList.buildTableData(incomeCategoryEnum, taxReportColumns, taxDeclarationValues, employeeDeclares, simpleEmployees, simpleUserInfos, extEmployees, true);
|
||||
|
||||
|
||||
Map<String, Map<String, Object>> localMap = new HashMap<>();
|
||||
for (Map<String, Object> map : localList) {
|
||||
String no = map.getOrDefault("证件号码", "").toString();
|
||||
localMap.put(no, map);
|
||||
}
|
||||
|
||||
List<List<Object>> onlineData = onlineDataMap.get(incomeCategoryEnum.getDefaultLabel());
|
||||
List<Object> heads = onlineData.get(0);
|
||||
List<List<Object>> data = onlineData.subList(1, onlineData.size());
|
||||
List<Map<String, Object>> onlineMap = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
List<Object> row = data.get(i);
|
||||
Map<String, Object> m = new HashMap<>();
|
||||
for (int j = 0; j < heads.size(); j++) {
|
||||
String key = heads.get(j).toString();
|
||||
m.put(key, row.get(j));
|
||||
}
|
||||
onlineMap.add(m);
|
||||
}
|
||||
|
||||
Map<String, Map<String, Object>> onlineNoMap = new HashMap<>();
|
||||
for (Map<String, Object> map : onlineMap) {
|
||||
String no = map.getOrDefault("证件号码", "").toString();
|
||||
onlineNoMap.put(no, map);
|
||||
}
|
||||
|
||||
List<String> onlyShowColumns = new ArrayList<>();
|
||||
List<Map<String, Object>> oneResultList = new ArrayList<>();
|
||||
for (Map<String, Object> local : localList) {
|
||||
AtomicBoolean hasDiff = new AtomicBoolean(false);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("工号", local.get("工号"));
|
||||
result.put("姓名", local.get("姓名"));
|
||||
result.put("证件类型", local.get("证件类型"));
|
||||
result.put("证件号码", local.get("证件号码"));
|
||||
String no = local.getOrDefault("证件号码", "").toString();
|
||||
Map<String, Object> online = onlineNoMap.get(no);
|
||||
|
||||
taxReportColumns.stream().map(TaxReportColumnPO::getReportColumnName).forEach(col -> {
|
||||
ContrastListDTO dto = new ContrastListDTO();
|
||||
// 系统值
|
||||
String localValue = Util.null2String(local.get(col));
|
||||
// 线上值
|
||||
String onlineValue = Util.null2String(online.get(col));
|
||||
dto.setLocal(localValue);
|
||||
dto.setOnline(onlineValue);
|
||||
if (NumberUtil.isNumber(localValue) && NumberUtil.isNumber(onlineValue)) {
|
||||
BigDecimal diff = new BigDecimal(localValue).subtract(new BigDecimal(onlineValue));
|
||||
if (diff.compareTo(new BigDecimal(0)) != 0) {
|
||||
dto.setDiff(diff);
|
||||
onlyShowColumns.add(col);
|
||||
hasDiff.set(true);
|
||||
}
|
||||
} else {
|
||||
if (!Objects.equals(localValue, onlineValue)) {
|
||||
dto.setDiff(localValue);
|
||||
onlyShowColumns.add(col);
|
||||
hasDiff.set(true);
|
||||
}
|
||||
}
|
||||
result.put(col, dto);
|
||||
});
|
||||
if (param.isOnlyShowDiffEmp()) {
|
||||
if (hasDiff.get()) {
|
||||
oneResultList.add(result);
|
||||
}
|
||||
} else {
|
||||
oneResultList.add(result);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> finalOnlyShowColumns = onlyShowColumns.stream().distinct().collect(Collectors.toList());
|
||||
List<String> headerList = new ArrayList<>();
|
||||
headerList.add("工号");
|
||||
headerList.add("姓名");
|
||||
headerList.add("证件类型");
|
||||
headerList.add("证件号码");
|
||||
headerList.addAll((param.isOnlyShowDiffItem() ? finalOnlyShowColumns : columns).stream().collect(Collectors.toList()));
|
||||
resultList.put("columns", headerList);
|
||||
resultList.put("pageInfo", SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), oneResultList));
|
||||
|
||||
// 显示定制列
|
||||
List<WeaTableColumn> weaColumns = new ArrayList<>();
|
||||
weaColumns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "工号"), "工号"));
|
||||
weaColumns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "姓名"), "姓名"));
|
||||
weaColumns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "证件类型"), "证件类型"));
|
||||
weaColumns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "证件号码"));
|
||||
for (TaxReportColumnPO columnPO : taxReportColumns) {
|
||||
weaColumns.add(new WeaTableColumn("100px", columnPO.getReportColumnName(), columnPO.getReportColumnName()));
|
||||
}
|
||||
|
||||
SalaryWeaTable<SalaryArchiveListDTO> table = new SalaryWeaTable<SalaryArchiveListDTO>(user, TaxDeclarationValueListDTO.class);
|
||||
table.setColumns(weaColumns);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
resultList.put("dataKey", result.getResultMap());
|
||||
return resultList;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook exportContrast(ContrastQueryParam param) {
|
||||
param.setPageSize(1000000000);
|
||||
param.setCurrent(1);
|
||||
// 获取线下对比结果
|
||||
Map<String, Object> contrastMap = contrast(param);
|
||||
List<String> header = ((List<String>) contrastMap.get("columns"));
|
||||
PageInfo<Map<String, Object>> pageInfo = (PageInfo<Map<String, Object>>)contrastMap.get("pageInfo");
|
||||
List<Map<String, Object>> list = pageInfo.getList();
|
||||
|
||||
List<WeaTableColumn> empInfoColumns = new ArrayList<>();
|
||||
empInfoColumns.add(new WeaTableColumn("100px", "工号", "jobNum"));
|
||||
empInfoColumns.add(new WeaTableColumn("100px", "姓名", "username"));
|
||||
empInfoColumns.add(new WeaTableColumn("100px", "证件类型", "cardType"));
|
||||
empInfoColumns.add(new WeaTableColumn("100px", "证件号码", "cardNum"));
|
||||
|
||||
List<String> empInfoList = empInfoColumns.stream().map(WeaTableColumn::getText).collect(Collectors.toList());
|
||||
header = header.stream().filter(h -> !empInfoList.contains(h)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(param.getColumns())) {
|
||||
List<String> finalHeader = header;
|
||||
header = param.getColumns().stream().filter(col -> finalHeader.contains(col)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
return ExcelUtilPlus.genWorkbook4TaxDeclareContrast(empInfoColumns, header, list, "在线对比结果");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(Long deleteId) {
|
||||
getTaxDeclarationValueMapper().deleteByIds(Collections.singletonList(deleteId));
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.engine.salary.entity.taxapiflow.po.TaxDeclarationApiFlowRecordPO;
|
|||
import com.engine.salary.entity.taxdeclaration.bo.*;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationRateDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.AbnormalEmployeeListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.DeclareTaxResultFeedbackQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.*;
|
||||
|
|
@ -39,6 +40,7 @@ import com.engine.salary.enums.OperateTypeEnum;
|
|||
import com.engine.salary.enums.employeedeclare.DeclareStatusEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
import com.engine.salary.enums.salarysob.DeclareReportTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnStatusEnum;
|
||||
import com.engine.salary.enums.taxdeclaration.*;
|
||||
|
|
@ -46,11 +48,13 @@ import com.engine.salary.exception.SalaryRunTimeException;
|
|||
import com.engine.salary.mapper.taxdeclaration.TaxDeclareRecordMapper;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclareStatusMapper;
|
||||
import com.engine.salary.remote.tax.client.DeclareClient;
|
||||
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.factory.TaxPaymentServiceFactory;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
|
@ -59,6 +63,7 @@ import com.google.common.collect.Sets;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -991,6 +996,65 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getDeclareTaxResultFeedback(Long id) {
|
||||
TaxDeclareRequest taxDeclareRequest = buildTaxDeclareRequest(id);
|
||||
TaxDeclareRecordPO taxDeclareRecord = taxDeclareRequest.getTaxDeclareRecord();
|
||||
|
||||
DeclareClient declareClient = new DeclareClient(taxDeclareRecord.getTaxAgentId());
|
||||
GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse = declareClient.getDeclareTaxResultFeedback(taxDeclareRecord.getDeclareRequestId());
|
||||
|
||||
Map<String, List<List<Object>>> map = new HashMap<>();
|
||||
List<TaxDeclarationPO> list = getTaxDeclarationService(user).listByTaxDeclareRecordId(id);
|
||||
list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(map, declareTaxResultFeedbackResponse));
|
||||
return declareClient.getDeclareTaxResultFeedback(taxDeclareRecord.getDeclareRequestId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook exportGetDeclareTaxResultFeedback(DeclareTaxResultFeedbackQueryParam param) {
|
||||
Long id = param.getId();
|
||||
TaxDeclareRecordPO taxDeclareRecord = getById(id);
|
||||
String requestId = param.getRequestId();
|
||||
TaxDeclareStatusPO declareStatus = getTaxDeclareStatusService(user).getTaxDeclareStatus(id, param.getReportType());
|
||||
|
||||
DeclareClient declareClient = new DeclareClient(taxDeclareRecord.getTaxAgentId());
|
||||
GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse = declareClient.getDeclareTaxResultFeedback(StringUtils.isEmpty(requestId) ? declareStatus.getDeclareRequestId() : requestId);
|
||||
|
||||
Map<String, List<List<Object>>> map = new HashMap<>();
|
||||
List<TaxDeclarationPO> list = getTaxDeclarationService(user).listByTaxDeclareRecordId(id);
|
||||
list.stream()
|
||||
.map(TaxDeclarationPO::getIncomeCategory)
|
||||
.map(IncomeCategoryEnum::parseByValue)
|
||||
.filter(incomeCategoryEnum -> incomeCategoryEnum.getReportType().getValue().equals(param.getReportType()))
|
||||
.collect(Collectors.toList()).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(map, declareTaxResultFeedbackResponse));
|
||||
list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(map, declareTaxResultFeedbackResponse));
|
||||
// 艾志分权 - 240529注释
|
||||
// List<Long> taxAgentIds = getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
// if (!taxAgentIds.contains(taxDeclareRecord.getTaxAgentId())) {
|
||||
// Map<String, Object> authMap = getEmployeeDeclareService(user).empIdsByAzGssbAuth(user.getUID());
|
||||
// List<Long> canManageEmpIds = (List<Long>)authMap.get("canManageEmpIds");
|
||||
// // 获取这些人在人员信息报送中的证件号码
|
||||
// List<EmployeeDeclarePO> employeeDeclareList = getEmployeeDeclareService(user).listByTaxCycleAndTaxAgentId(taxDeclareRecord.getTaxCycle(), taxDeclareRecord.getTaxAgentId());
|
||||
// List<String> canManageCardNum = employeeDeclareList.stream().filter(declare -> canManageEmpIds.contains(declare.getEmployeeId())).map(EmployeeDeclarePO::getCardNum).collect(Collectors.toList());
|
||||
// for (Map.Entry<String, List<List<Object>>> entry : map.entrySet()) {
|
||||
// List<List<Object>> valueList = entry.getValue();
|
||||
// List<List<Object>> newvalueList = new ArrayList<>();
|
||||
// newvalueList.add(valueList.get(0));
|
||||
// for (int i =1; i<valueList.size(); i++) {
|
||||
// List<Object> value = valueList.get(i);
|
||||
// String cardNum = Util.null2String(value.get(2));
|
||||
// if (canManageCardNum.contains(cardNum)) {
|
||||
// newvalueList.add(value);
|
||||
// }
|
||||
// }
|
||||
// map.put(entry.getKey(), newvalueList);
|
||||
// }
|
||||
// }
|
||||
|
||||
return ExcelUtil.genWorkbookV2(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateDeclare(Long id, Integer reportType) {
|
||||
TaxDeclareRequest taxDeclareRequest = buildTaxDeclareRequest(id);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@ public class TaxReportColumnServiceImpl extends Service implements TaxReportColu
|
|||
return getTaxReportColumnMapper().listAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaxReportColumnPO> listByContrastType(Integer contrastType) {
|
||||
|
||||
return getTaxReportColumnMapper().listSome(TaxReportColumnPO.builder().contrastType(contrastType).build());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaxReportColumnPO> listByIncomeCategory(IncomeCategoryEnum incomeCategory, Integer... contrastTypes) {
|
||||
return getTaxReportColumnMapper().listSome(TaxReportColumnPO.builder().contrastTypes(Arrays.asList(contrastTypes)).incomeCategory(incomeCategory.getValue().toString()).build());
|
||||
|
|
|
|||
|
|
@ -248,6 +248,100 @@ public class TaxDeclarationController {
|
|||
return new ResponseResult<TaxDeclareRecordParam, String>(user).run(getTaxDeclareRecordWrapper(user)::getDeclareFeedback, taxDeclareRecordParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申报内置算税结果查询
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getDeclareTaxResultFeedback")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getDeclareTaxResultFeedback(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "id") Long id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, Object>(user).run(getTaxDeclareRecordWrapper(user)::getDeclareTaxResultFeedback, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申报内置算税结果
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/exportGetDeclareTaxResultFeedback")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportGetDeclareTaxResultFeedback(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeclareTaxResultFeedbackQueryParam param) {
|
||||
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
XSSFWorkbook workbook = getTaxDeclareRecordWrapper(user).exportGetDeclareTaxResultFeedback(param);
|
||||
String fileName = "申报内置算税结果-" + LocalDate.now();
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
StreamingOutput output = outputStream -> {
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
};
|
||||
response.setContentType("application/octet-stream");
|
||||
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
} catch (Exception e) {
|
||||
log.error("申报内置算税结果导出异常", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比算税过程
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/contrast")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String contrast(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ContrastQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<ContrastQueryParam, Map<String, Object>>(user).run(getTaxDeclareRecordWrapper(user)::contrast, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出在线对比
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/exportContrast")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportContrast(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ContrastQueryParam param) {
|
||||
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
XSSFWorkbook workbook = getTaxDeclareRecordWrapper(user).exportContrast(param);
|
||||
String fileName = "在线对比结果-" + LocalDate.now();
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
StreamingOutput output = outputStream -> {
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
};
|
||||
response.setContentType("application/octet-stream");
|
||||
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
} catch (Exception e) {
|
||||
log.error("在线对比结果导出异常", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 作废
|
||||
|
|
|
|||
|
|
@ -509,6 +509,15 @@ public class TaxDeclareRecordWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
public Object getDeclareTaxResultFeedback(Long id) {
|
||||
return getTaxDeclareRecordService(user).getDeclareTaxResultFeedback(id);
|
||||
}
|
||||
|
||||
|
||||
public XSSFWorkbook exportGetDeclareTaxResultFeedback(DeclareTaxResultFeedbackQueryParam param) {
|
||||
return getTaxDeclareRecordService(user).exportGetDeclareTaxResultFeedback(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废
|
||||
*/
|
||||
|
|
@ -633,6 +642,24 @@ public class TaxDeclareRecordWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 对比算税结果
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
public Map<String, Object> contrast(ContrastQueryParam param) {
|
||||
return getTaxDeclarationValueService(user).contrast(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出在线对比
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public XSSFWorkbook exportContrast(ContrastQueryParam param) {
|
||||
return getTaxDeclarationValueService(user).exportContrast(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据
|
||||
|
|
|
|||
Loading…
Reference in New Issue