Commit 87c5da5e authored by hongguangwu's avatar hongguangwu

优化导入,精简字段

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