Commit 87c5da5e authored by hongguangwu's avatar hongguangwu

优化导入,精简字段

parent 34077fc0
......@@ -97,6 +97,6 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
* 财务类型0:工资;1:绩效;2:其他;3:劳务费
*/
@TableField(exist = false)
private String salaryType;
private String formType;
}
......@@ -13,9 +13,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.List;
/**
* 工资报账表附加-工资明细
*
......
......@@ -86,7 +86,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
* @param jsonString 客户原表数据
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description: 普通工资上传
* @Author: hgw
* @Date: 2019/9/4 15:58
......@@ -176,6 +176,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage());
return R.failed("数据导入解析失败!");
}
......@@ -242,6 +243,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
s.setDeptId(dept.getId());
s.setDeptName(dept.getDepartName());
s.setDeptNo(dept.getDepartNo());
s.setUnitId(dept.getCustomerId());
s.setUnitName(dept.getCustomerName());
s.setUnitNo(dept.getCustomerCode());
if (dept.getProvince() != null) {
s.setProvince(dept.getProvince());
}
......@@ -902,7 +906,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccountItem> backList = new ArrayList<>();
if (itemList != null && !itemList.isEmpty()) {
for (TSalaryAccountItem item : itemList) {
if (!"3".equals(item.getSalaryType()) && Integer.parseInt(item.getSettlementMonth()) >= maxYearMonth) {
if (!"3".equals(item.getFormType()) && Integer.parseInt(item.getSettlementMonth()) >= maxYearMonth) {
backList.add(item);
}
}
......@@ -922,7 +926,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccountItem> backList = new ArrayList<>();
if (itemList != null && !itemList.isEmpty()) {
for (TSalaryAccountItem item : itemList) {
if ("3".equals(item.getSalaryType()) && settleMonth.equals(item.getSettlementMonth())) {
if ("3".equals(item.getFormType()) && settleMonth.equals(item.getSettlementMonth())) {
backList.add(item);
}
}
......
......@@ -136,6 +136,7 @@ public class SalaryAccountUtil implements Serializable {
salaryStyle = SalaryConstants.SALARY_STYLE_BANK;
relaySalary = null;
actualSalarySum = null;
entity.setSettlementMonth(nowMonth);
entity.setAnnualBonusType(SalaryConstants.ANNUAL_BONUS_TAX_TYPE_VALUE[0]);
for (Map.Entry<String, TSalaryConfigStandard> entry : salaryConfigMap.entrySet()) {
cellValueObj = getFieldValueByName(entry.getKey(), temp);
......
......@@ -25,7 +25,7 @@
<result property="isTax" column="IS_TAX"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="settlementMonth" column="SETTLEMENT_MONTH"/>
<result property="salaryType" column="SALARY_TYPE"/>
<result property="formType" column="FORM_TYPE"/>
</resultMap>
<!--tSalaryAccountItem简单分页查询-->
......@@ -104,7 +104,7 @@
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0 and a.SALARY_TYPE != 7
a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
<if test="idCard != null and idCard.trim() != ''">
AND a.EMP_IDCARD = #{idCard}
</if>
......@@ -320,8 +320,8 @@
<if test="tSalaryAccount.deduProvidentMonth != null and tSalaryAccount.deduProvidentMonth.trim() != ''">
AND a.DEDU_PROVIDENT_MONTH = #{tSalaryAccount.deduProvidentMonth}
</if>
<if test="tSalaryAccount.salaryType != null and tSalaryAccount.salaryType.trim() != ''">
AND a.SALARY_TYPE = #{tSalaryAccount.salaryType}
<if test="tSalaryAccount.formType != null and tSalaryAccount.formType.trim() != ''">
AND a.FORM_TYPE = #{tSalaryAccount.formType}
</if>
<if test="tSalaryAccount.salaryTaxFlag != null and tSalaryAccount.salaryTaxFlag.trim() != ''">
AND a.SALARY_TAX_FLAG = #{tSalaryAccount.salaryTaxFlag}
......@@ -417,7 +417,7 @@
i.IS_TAX,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SALARY_TYPE
a.FORM_TYPE
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
......@@ -431,7 +431,7 @@
<if test="invoiceTitle != null and invoiceTitle.trim() != ''">
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
AND a.DELETE_FLAG = 0 and a.SALARY_TYPE != 7
AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
</where>
</select>
<select id="getSumByAccountId" resultType="java.util.Map">
......
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