Commit 0725bacf authored by hongguangwu's avatar hongguangwu

MVP1.6.10工资相关

parent cfd563ba
......@@ -490,6 +490,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("新员工是否更新:0否;1是")
private String newEmpUpdateFlag;
/**
* 是否固定列,1是,默认,0否
*/
@ExcelAttribute(name = "是否固定列")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否固定列")
private Integer isFixedColumn;
/**
* 工资月份-起
*/
......
......@@ -135,6 +135,14 @@ public class TSalaryStandardOriginal extends BaseEntity {
@ExcelProperty("数据所在行")
private Integer dateNum;
/**
* 是否固定列,1是,默认,0否
*/
@ExcelAttribute(name = "是否固定列")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否固定列")
private Integer isFixedColumn;
/**
* 明细
*/
......
......@@ -56,6 +56,22 @@ public class TSalaryStandardOriginalDetail {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "原表表头")
private String excelName;
/**
* 原表计算规则,默认空为 等于,可选包含
*/
@Length(max = 50, message = "原表计算规则不能超过50个字符")
@ExcelAttribute(name = "原表计算规则", maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "原表计算规则")
private String excelRule;
/**
* 原表表头关键字
*/
@Length(max = 50, message = "原表表头关键字不能超过50个字符")
@ExcelAttribute(name = "原表表头关键字", maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "原表表头关键字")
private String excelKey;
/**
* 模板表头
*/
......
......@@ -63,4 +63,9 @@ public class TSalaryAccountSumVo {
private BigDecimal enterpriseAnnuity;
@ExcelProperty("单位年金合计")
private BigDecimal enterpriseAnnuityUnit;
@ExcelProperty("个人代扣金额合计")
private BigDecimal pdeduction;
@ExcelProperty("免个税个人代扣合计")
private BigDecimal exemptionPersionTax;
}
......@@ -71,6 +71,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
implements TSalaryStandardOriginalService {
private final SalaryUploadService salaryUploadService;
private final TSalaryStandardOriginalService tSalaryStandardOriginalService;
private final TSalaryStandardOriginalDetailService tSalaryStandardOriginalDetailService;
/**
......@@ -800,11 +801,15 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
if (Common.isEmpty(originalId)) {
return R.failed("识别配置为空,请选择识别配置!");
}
TSalaryStandardOriginal original = tSalaryStandardOriginalService.getById(originalId);
if (original == null || Common.isEmpty(original.getId())) {
return R.failed("请检查表头配置!");
}
List<TSalaryStandardOriginalDetail> detailList = tSalaryStandardOriginalDetailService.getTSalaryStandardOriginalDetailByOrgId(originalId);
Map<String, TSalaryStandardOriginalDetail> detailMap = new HashMap<>();
int idCardNum = -1;
if (detailList == null || detailList.isEmpty() || detailList.size() < 4) {
return R.failed("请检查表头配置!");
return R.failed("请检查表头配置!");
}
int maxColumn = detailList.size() + 10;
for (TSalaryStandardOriginalDetail detail : detailList) {
......
......@@ -1371,10 +1371,14 @@
,sum(ifnull(enterpriseAnnuity.SALARY_MONEY,0))+sum(ifnull(enterpriseAnnuityUnit.SALARY_MONEY,0)) ALL_enterprise_Annuity
,sum(ifnull(enterpriseAnnuity.SALARY_MONEY,0)) enterprise_Annuity
,sum(ifnull(enterpriseAnnuityUnit.SALARY_MONEY,0)) enterprise_Annuity_Unit
,sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeduction
,sum(ifnull(exemptionPersionTax.SALARY_MONEY,0)) exemptionPersionTax
from t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId}
</select>
......
......@@ -88,6 +88,7 @@
<result property="setName" column="SET_NAME"/>
<result property="originalSetName" column="ORIGINAL_SET_NAME"/>
<result property="newEmpUpdateFlag" column="NEW_EMP_UPDATE_FLAG"/>
<result property="isFixedColumn" column="IS_FIXED_COLUMN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -153,7 +154,8 @@
a.EXCEL_TYPE,
a.SET_NAME,
a.ORIGINAL_SET_NAME,
a.NEW_EMP_UPDATE_FLAG
a.NEW_EMP_UPDATE_FLAG,
a.IS_FIXED_COLUMN
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......
......@@ -31,6 +31,8 @@
<result property="modelName" column="MODEL_NAME"/>
<result property="flag" column="FLAG"/>
<result property="formulaNo" column="FORMULA_NO"/>
<result property="excelRule" column="EXCEL_RULE"/>
<result property="excelKey" column="EXCEL_KEY"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -39,7 +41,9 @@
a.EXCEL_NAME,
a.MODEL_NAME,
a.FLAG,
a.FORMULA_NO
a.FORMULA_NO,
a.EXCEL_RULE,
a.EXCEL_KEY
</sql>
<sql id="TSalaryStandardOriginalDetail_where">
<if test="tSalaryStandardOriginalDetail != null">
......
......@@ -42,6 +42,7 @@
<result property="attaType" column="ATTA_TYPE"/>
<result property="dateNum" column="DATE_NUM"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="isFixedColumn" column="IS_FIXED_COLUMN"/>
</resultMap>
<resultMap id="TSalaryOriginalExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryOriginalExportVo">
......@@ -69,7 +70,8 @@
a.ATTA_SIZE,
a.ATTA_TYPE,
a.DATE_NUM,
a.DELETE_FLAG
a.DELETE_FLAG,
a.IS_FIXED_COLUMN
</sql>
<sql id="TSalaryStandardOriginal_where">
<if test="tSalaryStandardOriginal != null">
......
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