Merge branch 'release/个税版本' into feature/个税2312版本功能
This commit is contained in:
commit
e2b341b675
|
|
@ -1,3 +1,3 @@
|
|||
ALTER TABLE hrsa_tax_declaration ADD COLUMN income_category int NOT NULL ;
|
||||
ALTER TABLE hrsa_tax_declaration ADD COLUMN income_category int ;
|
||||
|
||||
ALTER TABLE hrsa_tax_declaration_detail ADD COLUMN employee_type int NOT NULL ;
|
||||
ALTER TABLE hrsa_tax_declaration_detail ADD COLUMN employee_type int ;
|
||||
|
|
@ -167,6 +167,8 @@ public class SalaryTemplateBO {
|
|||
.id(String.valueOf(e.getSalaryItemId()))
|
||||
.salaryItemId(String.valueOf(e.getSalaryItemId()))
|
||||
.name(e.getName())
|
||||
.salaryItemShowName(e.getName())
|
||||
.originName(e.getName())
|
||||
.sortedIndex(e.getSortedIndex())
|
||||
.build()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.taxdeclaration.dto;
|
|||
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.util.excel.ExcelHead;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
|
@ -31,59 +32,69 @@ public class TaxDeclarationAnnualListDTO {
|
|||
text = "工号", width = "10%", column = "jobNum"
|
||||
)
|
||||
@TableTitle(title ="工号",dataIndex = "jobNum",key = "jobNum")
|
||||
@ExcelHead(title ="工号",dataIndex = "jobNum")
|
||||
private String jobNum;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "姓名", width = "10%", column = "username"
|
||||
)
|
||||
@TableTitle(title ="姓名",dataIndex = "username",key = "username")
|
||||
@ExcelHead(title ="姓名",dataIndex = "username")
|
||||
private String username;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "证件类型", width = "10%", column = "cardType"
|
||||
)
|
||||
@TableTitle(title ="证件类型",dataIndex = "cardType",key = "cardType")
|
||||
@ExcelHead(title ="证件类型",dataIndex = "cardType")
|
||||
private String cardType;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "证件号码", width = "10%", column = "cardNum"
|
||||
)
|
||||
@TableTitle(title ="证件号码",dataIndex = "cardNum",key = "cardNum")
|
||||
@ExcelHead(title ="证件号码",dataIndex = "cardNum")
|
||||
private String cardNum;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "全年一次性奖金额", width = "10%", column = "annualIncome"
|
||||
)
|
||||
@TableTitle(title ="全年一次性奖金额",dataIndex = "annualIncome",key = "annualIncome")
|
||||
@ExcelHead(title ="全年一次性奖金额",dataIndex = "annualIncome")
|
||||
private String annualIncome;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "免税收入", width = "10%", column = "annualTaxFreeIncome"
|
||||
)
|
||||
@TableTitle(title ="免税收入",dataIndex = "annualTaxFreeIncome",key = "annualTaxFreeIncome")
|
||||
@ExcelHead(title ="免税收入",dataIndex = "annualTaxFreeIncome")
|
||||
private String annualTaxFreeIncome;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "其他", width = "10%", column = "annualOther"
|
||||
)
|
||||
@TableTitle(title ="其他",dataIndex = "annualOther",key = "annualOther")
|
||||
@ExcelHead(title ="其他",dataIndex = "annualOther")
|
||||
private String annualOther;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "准予扣除的捐赠额", width = "10%", column = "annualDonateTax"
|
||||
)
|
||||
@TableTitle(title ="准予扣除的捐赠额",dataIndex = "annualDonateTax",key = "annualDonateTax")
|
||||
@ExcelHead(title ="准予扣除的捐赠额",dataIndex = "annualDonateTax")
|
||||
private String annualDonateTax;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "减免税额", width = "10%", column = "annualTaxSavings"
|
||||
)
|
||||
@TableTitle(title ="减免税额",dataIndex = "annualTaxSavings",key = "annualTaxSavings")
|
||||
@ExcelHead(title ="减免税额",dataIndex = "annualTaxSavings")
|
||||
private String annualTaxSavings;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "备注", width = "10%", column = "annualRemark"
|
||||
)
|
||||
@TableTitle(title ="备注",dataIndex = "annualRemark",key = "annualRemark")
|
||||
@ExcelHead(title ="备注",dataIndex = "annualRemark")
|
||||
private String annualRemark;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.taxdeclaration.dto;
|
|||
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.util.excel.ExcelHead;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
|
@ -30,78 +31,91 @@ public class TaxDeclarationLaborListDTO {
|
|||
@SalaryTableColumn(
|
||||
text = "工号", width = "10%", column = "jobNum"
|
||||
)
|
||||
@TableTitle(title ="工号",dataIndex = "jobNum",key = "jobNum")
|
||||
@TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum")
|
||||
@ExcelHead(title = "工号", dataIndex = "jobNum")
|
||||
private String jobNum;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "姓名", width = "10%", column = "username"
|
||||
)
|
||||
@TableTitle(title ="姓名",dataIndex = "username",key = "username")
|
||||
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
|
||||
@ExcelHead(title = "姓名", dataIndex = "username")
|
||||
private String username;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "证件类型", width = "10%", column = "cardType"
|
||||
)
|
||||
@TableTitle(title ="证件类型",dataIndex = "cardType",key = "cardType")
|
||||
@TableTitle(title = "证件类型", dataIndex = "cardType", key = "cardType")
|
||||
@ExcelHead(title = "证件类型", dataIndex = "cardType")
|
||||
private String cardType;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "证件号码", width = "10%", column = "cardNum"
|
||||
)
|
||||
@TableTitle(title ="证件号码",dataIndex = "cardNum",key = "cardNum")
|
||||
@TableTitle(title = "证件号码", dataIndex = "cardNum", key = "cardNum")
|
||||
@ExcelHead(title = "证件号码", dataIndex = "cardNum")
|
||||
private String cardNum;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "所得项目", width = "10%", column = "incomeItems"
|
||||
)
|
||||
@TableTitle(title ="所得项目",dataIndex = "incomeItems",key = "incomeItems")
|
||||
@TableTitle(title = "所得项目", dataIndex = "incomeItems", key = "incomeItems")
|
||||
@ExcelHead(title = "所得项目", dataIndex = "incomeItems")
|
||||
private String incomeItems;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "劳务收入", width = "10%", column = "laborIncome"
|
||||
)
|
||||
@TableTitle(title ="劳务收入",dataIndex = "laborIncome",key = "laborIncome")
|
||||
@TableTitle(title = "劳务收入", dataIndex = "laborIncome", key = "laborIncome")
|
||||
@ExcelHead(title = "劳务收入", dataIndex = "laborIncome")
|
||||
private String laborIncome;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "劳务免税收入", width = "10%", column = "laborTaxFreeIncome"
|
||||
)
|
||||
@TableTitle(title ="劳务免税收入",dataIndex = "laborTaxFreeIncome",key = "laborTaxFreeIncome")
|
||||
@TableTitle(title = "劳务免税收入", dataIndex = "laborTaxFreeIncome", key = "laborTaxFreeIncome")
|
||||
@ExcelHead(title = "劳务免税收入", dataIndex = "laborTaxFreeIncome")
|
||||
private String laborTaxFreeIncome;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "商业健康保险", width = "10%", column = "commercialHealthInsurance"
|
||||
)
|
||||
@TableTitle(title ="商业健康保险",dataIndex = "commercialHealthInsurance",key = "commercialHealthInsurance")
|
||||
@TableTitle(title = "商业健康保险", dataIndex = "commercialHealthInsurance", key = "commercialHealthInsurance")
|
||||
@ExcelHead(title = "商业健康保险", dataIndex = "commercialHealthInsurance")
|
||||
private String commercialHealthInsurance;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "税延养老保险", width = "10%", column = "taxDeferredEndowmentInsurance"
|
||||
)
|
||||
@TableTitle(title ="税延养老保险",dataIndex = "taxDeferredEndowmentInsurance",key = "taxDeferredEndowmentInsurance")
|
||||
@TableTitle(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance", key = "taxDeferredEndowmentInsurance")
|
||||
@ExcelHead(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance")
|
||||
private String taxDeferredEndowmentInsurance;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "其他", width = "10%", column = "other"
|
||||
)
|
||||
@TableTitle(title ="其他",dataIndex = "other",key = "other")
|
||||
@TableTitle(title = "其他", dataIndex = "other", key = "other")
|
||||
@ExcelHead(title = "其他", dataIndex = "other")
|
||||
private String other;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "准予扣除的捐赠额", width = "10%", column = "allowedDonation"
|
||||
)
|
||||
@TableTitle(title ="准予扣除的捐赠额",dataIndex = "allowedDonation",key = "allowedDonation")
|
||||
@TableTitle(title = "准予扣除的捐赠额", dataIndex = "allowedDonation", key = "allowedDonation")
|
||||
@ExcelHead(title = "准予扣除的捐赠额", dataIndex = "allowedDonation")
|
||||
private String allowedDonation;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "减免税额", width = "10%", column = "taxDeduction"
|
||||
)
|
||||
@TableTitle(title ="减免税额",dataIndex = "taxDeduction",key = "taxDeduction")
|
||||
@TableTitle(title = "减免税额", dataIndex = "taxDeduction", key = "taxDeduction")
|
||||
@ExcelHead(title = "减免税额", dataIndex = "taxDeduction")
|
||||
private String taxDeduction;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "备注", width = "10%", column = "description"
|
||||
)
|
||||
@TableTitle(title ="备注",dataIndex = "description",key = "description")
|
||||
@TableTitle(title = "备注", dataIndex = "description", key = "description")
|
||||
@ExcelHead(title = "备注", dataIndex = "description")
|
||||
private String description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.cloudstore.eccom.pc.table.WeaTableType;
|
|||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.util.excel.ExcelHead;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -35,101 +36,126 @@ public class TaxDeclarationWageListDTO {
|
|||
|
||||
@SalaryTableColumn(text = "工号", width = "10%", column = "jobNum")
|
||||
@TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum")
|
||||
@ExcelHead(title = "工号", dataIndex = "jobNum")
|
||||
private String jobNum;
|
||||
|
||||
@SalaryTableColumn(text = "姓名", width = "10%", column = "username")
|
||||
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
|
||||
@ExcelHead(title = "姓名", dataIndex = "username")
|
||||
private String username;
|
||||
|
||||
@SalaryTableColumn(text = "证件类型", width = "10%", column = "cardType")
|
||||
@TableTitle(title = "证件类型", dataIndex = "cardType", key = "cardType")
|
||||
@ExcelHead(title = "证件类型", dataIndex = "cardType")
|
||||
private String cardType;
|
||||
|
||||
@SalaryTableColumn(text = "证件号码", width = "10%", column = "cardNum")
|
||||
@TableTitle(title = "证件号码", dataIndex = "cardNum", key = "cardNum")
|
||||
@ExcelHead(title = "证件号码", dataIndex = "cardNum")
|
||||
private String cardNum;
|
||||
|
||||
@SalaryTableColumn(text = "本期收入", width = "10%", column = "income")
|
||||
@TableTitle(title = "本期收入", dataIndex = "income", key = "income")
|
||||
@ExcelHead(title = "本期收入", dataIndex = "income")
|
||||
private String income;
|
||||
|
||||
@SalaryTableColumn(text = "本期免税收入", width = "10%", column = "taxFreeIncome")
|
||||
@TableTitle(title = "本期免税收入", dataIndex = "taxFreeIncome", key = "taxFreeIncome")
|
||||
@ExcelHead(title = "本期免税收入", dataIndex = "taxFreeIncome")
|
||||
private String taxFreeIncome;
|
||||
|
||||
@SalaryTableColumn(text = "基本养老保险费", width = "10%", column = "endowmentInsurance")
|
||||
@TableTitle(title = "基本养老保险费", dataIndex = "endowmentInsurance", key = "endowmentInsurance")
|
||||
@ExcelHead(title = "基本养老保险费", dataIndex = "endowmentInsurance")
|
||||
private String endowmentInsurance;
|
||||
|
||||
@SalaryTableColumn(text = "基本医疗保险费", width = "10%", column = "medicalInsurance")
|
||||
@TableTitle(title = "基本医疗保险费", dataIndex = "medicalInsurance", key = "medicalInsurance")
|
||||
@ExcelHead(title = "基本医疗保险费", dataIndex = "medicalInsurance")
|
||||
private String medicalInsurance;
|
||||
|
||||
@SalaryTableColumn(text = "失业保险费", width = "10%", column = "unemploymentInsurance")
|
||||
@TableTitle(title = "失业保险费", dataIndex = "unemploymentInsurance", key = "unemploymentInsurance")
|
||||
@ExcelHead(title = "失业保险费", dataIndex = "unemploymentInsurance")
|
||||
private String unemploymentInsurance;
|
||||
|
||||
@SalaryTableColumn(text = "住房公积金", width = "10%", column = "housingProvidentFund")
|
||||
@TableTitle(title = "住房公积金", dataIndex = "housingProvidentFund", key = "housingProvidentFund")
|
||||
@ExcelHead(title = "住房公积金", dataIndex = "housingProvidentFund")
|
||||
private String housingProvidentFund;
|
||||
|
||||
@SalaryTableColumn(text = "累计子女教育", width = "10%", column = "addUpChildEducation")
|
||||
@TableTitle(title = "累计子女教育", dataIndex = "addUpChildEducation", key = "addUpChildEducation")
|
||||
@ExcelHead(title = "累计子女教育", dataIndex = "addUpChildEducation")
|
||||
private String addUpChildEducation;
|
||||
|
||||
@SalaryTableColumn(text = "累计住房贷款利息", width = "10%", column = "addUpHousingLoanInterest")
|
||||
@TableTitle(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest", key = "addUpHousingLoanInterest")
|
||||
@ExcelHead(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest")
|
||||
private String addUpHousingLoanInterest;
|
||||
|
||||
@SalaryTableColumn(text = "累计住房租金", width = "10%", column = "addUpHousingRent")
|
||||
@TableTitle(title = "累计住房租金", dataIndex = "addUpHousingRent", key = "addUpHousingRent")
|
||||
@ExcelHead(title = "累计住房租金", dataIndex = "addUpHousingRent")
|
||||
private String addUpHousingRent;
|
||||
|
||||
@SalaryTableColumn(text = "累计继续教育", width = "10%", column = "addUpContinuingEducation")
|
||||
@TableTitle(title = "累计继续教育", dataIndex = "addUpContinuingEducation", key = "addUpContinuingEducation")
|
||||
@ExcelHead(title = "累计继续教育", dataIndex = "addUpContinuingEducation")
|
||||
private String addUpContinuingEducation;
|
||||
|
||||
@SalaryTableColumn(text = "累计赡养老人", width = "10%", column = "addUpSupportElderly")
|
||||
@TableTitle(title = "累计赡养老人", dataIndex = "addUpSupportElderly", key = "addUpSupportElderly")
|
||||
@ExcelHead(title = "累计赡养老人", dataIndex = "addUpSupportElderly")
|
||||
private String addUpSupportElderly;
|
||||
|
||||
@SalaryTableColumn(text = "累计大病医疗", width = "10%", column = "addUpIllnessMedical")
|
||||
@TableTitle(title = "累计大病医疗", dataIndex = "addUpIllnessMedical", key = "addUpIllnessMedical")
|
||||
@ExcelHead(title = "累计大病医疗", dataIndex = "addUpIllnessMedical")
|
||||
private String addUpIllnessMedical;
|
||||
|
||||
@SalaryTableColumn(text = "累计3岁以下婴幼儿照护", width = "10%", column = "addUpInfantCare")
|
||||
@TableTitle(title = "累计3岁以下婴幼儿照护", dataIndex = "addUpInfantCare", key = "addUpInfantCare")
|
||||
@ExcelHead(title = "累计3岁以下婴幼儿照护", dataIndex = "addUpInfantCare")
|
||||
private String addUpInfantCare;
|
||||
|
||||
@SalaryTableColumn(text = "累计个人养老金", width = "10%", column = "addUpPrivatePension")
|
||||
@TableTitle(title = "累计个人养老金", dataIndex = "addUpPrivatePension", key = "addUpPrivatePension")
|
||||
@ExcelHead(title = "累计个人养老金", dataIndex = "addUpPrivatePension")
|
||||
private String addUpPrivatePension;
|
||||
|
||||
@SalaryTableColumn(text = "企业(职业)年金", width = "10%", column = "annuity")
|
||||
@TableTitle(title = "企业(职业)年金", dataIndex = "annuity", key = "annuity")
|
||||
@ExcelHead(title = "企业(职业)年金", dataIndex = "annuity")
|
||||
private String annuity;
|
||||
|
||||
@SalaryTableColumn(text = "商业健康保险", width = "10%", column = "commercialHealthInsurance")
|
||||
@TableTitle(title = "商业健康保险", dataIndex = "commercialHealthInsurance", key = "commercialHealthInsurance")
|
||||
@ExcelHead(title = "商业健康保险", dataIndex = "commercialHealthInsurance")
|
||||
private String commercialHealthInsurance;
|
||||
|
||||
@SalaryTableColumn(text = "税延养老保险", width = "10%", column = "taxDeferredEndowmentInsurance")
|
||||
@TableTitle(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance", key = "taxDeferredEndowmentInsurance")
|
||||
@ExcelHead(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance")
|
||||
private String taxDeferredEndowmentInsurance;
|
||||
|
||||
@SalaryTableColumn(text = "其他", width = "10%", column = "other")
|
||||
@TableTitle(title = "其他", dataIndex = "other", key = "other")
|
||||
@ExcelHead(title = "其他", dataIndex = "other")
|
||||
private String other;
|
||||
|
||||
@SalaryTableColumn(text = "准予扣除的捐赠额", width = "10%", column = "allowedDonation")
|
||||
@TableTitle(title = "准予扣除的捐赠额", dataIndex = "allowedDonation", key = "allowedDonation")
|
||||
@ExcelHead(title = "准予扣除的捐赠额", dataIndex = "allowedDonation")
|
||||
private String allowedDonation;
|
||||
|
||||
@SalaryTableColumn(text = "减免税额", width = "10%", column = "taxDeduction")
|
||||
@TableTitle(title = "减免税额", dataIndex = "taxDeduction", key = "taxDeduction")
|
||||
@ExcelHead(title = "减免税额", dataIndex = "taxDeduction")
|
||||
private String taxDeduction;
|
||||
|
||||
@SalaryTableColumn(text = "备注", width = "10%", column = "description")
|
||||
@TableTitle(title = "备注", dataIndex = "description", key = "description")
|
||||
@ExcelHead(title = "备注", dataIndex = "description")
|
||||
private String description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -956,7 +956,7 @@
|
|||
#{tenantKey},
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
#{sms_setting},
|
||||
#{smsSetting},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,31 @@
|
|||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND name like '%'||#{param.name}||'%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND name like '%'+#{param.name}+'%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- 查询 -->
|
||||
<select id="listBySome" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
Arrays.asList(salaryReportConditions.split(",")).forEach(paramMd5 -> {
|
||||
if (StringUtils.isNotBlank(paramMd5)) {
|
||||
//条件对应的结果
|
||||
getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5);
|
||||
getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
|
||||
/**
|
||||
* 复制薪资账套
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void duplicate(Long id) {
|
||||
|
|
@ -322,7 +323,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
//报表中缓存的条件
|
||||
salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id));
|
||||
if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) {
|
||||
return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5);
|
||||
return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -344,9 +345,10 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
resultMap.put("reportId", id);
|
||||
|
||||
|
||||
//设置报表缓存
|
||||
getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_IDS, salaryReportIds + "," + id);
|
||||
getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id, salaryReportConditions + "," + paramMd5);
|
||||
getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5, resultMap);
|
||||
getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5, resultMap);
|
||||
|
||||
|
||||
return resultMap;
|
||||
|
|
|
|||
|
|
@ -267,7 +267,8 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(0, "证件号码格式不正确"));
|
||||
errorData.add(errorMessageMap);
|
||||
} else {
|
||||
employeeDeclareExcel.setCardNum(dataValue);
|
||||
// 身份证号全部转为大写
|
||||
employeeDeclareExcel.setCardNum(dataValue.toUpperCase());
|
||||
employeeDeclareExcel.setGender(SalaryCardUtil.judgeGender(dataValue).getValue().toString());
|
||||
employeeDeclareExcel.setBirthday(SalaryCardUtil.judgeBirthday(dataValue).toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum DataTypeEnum {
|
||||
string("string", "字符类型"),
|
||||
number("string", "数字类型"),
|
||||
date("string", "日期类型");
|
||||
|
||||
private String value;
|
||||
private String name;
|
||||
|
||||
DataTypeEnum(String value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public static DataTypeEnum parseByValue(String value) {
|
||||
return Arrays.stream(DataTypeEnum.values()).filter(typeEnum -> Objects.equals(typeEnum.getValue(), value)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 数据列表表头
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Target({ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface ExcelHead {
|
||||
|
||||
String title() default "";
|
||||
|
||||
String dataIndex() default "";
|
||||
|
||||
DataTypeEnum dataType() default DataTypeEnum.string;
|
||||
|
||||
int labelId() default -1;
|
||||
|
||||
String width() default "";
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.annotation.SalaryTableColumn;
|
|||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
|
|
@ -14,6 +15,8 @@ import org.apache.poi.xssf.usermodel.*;
|
|||
import java.awt.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class ExcelUtil {
|
||||
|
|
@ -379,4 +382,24 @@ public class ExcelUtil {
|
|||
return rows;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析表头
|
||||
*
|
||||
* @param clazz
|
||||
* @param headerList
|
||||
* @param dataIndexList
|
||||
* @param <T>
|
||||
*/
|
||||
public static <T> void parseHeader(Class<T> clazz, List<Object> headerList, List<String> dataIndexList) {
|
||||
Field[] declaredFields = clazz.getDeclaredFields();
|
||||
for (Field declaredField : declaredFields) {
|
||||
if (!declaredField.isAnnotationPresent(ExcelHead.class)) {
|
||||
continue;
|
||||
}
|
||||
ExcelHead annotation = declaredField.getAnnotation(ExcelHead.class);
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(annotation.labelId(), annotation.title()));
|
||||
dataIndexList.add(declaredField.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue