Commit d3594b77 authored by huyuchen's avatar huyuchen

申报修改

parent eb60b0c4
...@@ -89,14 +89,14 @@ public class TStatisticsDeclarer { ...@@ -89,14 +89,14 @@ public class TStatisticsDeclarer {
* 任职受雇从业类型 * 任职受雇从业类型
*/ */
@Length(max = 2, message = "任职受雇从业类型不能超过2个字符") @Length(max = 2, message = "任职受雇从业类型不能超过2个字符")
@ExcelIgnore @ExcelAttribute(name = "任职受雇从业类型", maxLength = 2,readConverterExp = "0=雇员,1=其他")
@ExcelProperty("任职受雇从业类型")
private String occupationType; private String occupationType;
/** /**
* 任职受雇从业日期 * 任职受雇从业日期
*/ */
@ExcelAttribute(name = "任职受雇从业日期", maxLength = 20)
@Length(max = 20, message = "任职受雇从业日期不能超过20个字符") @Length(max = 20, message = "任职受雇从业日期不能超过20个字符")
@ExcelProperty("任职受雇从业日期") @ExcelIgnore
private String occupationMonth; private String occupationMonth;
/** /**
* 本月是否申报 0 是 1 否 * 本月是否申报 0 是 1 否
......
...@@ -201,7 +201,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -201,7 +201,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (sdr != null && sdr.getData() != null) { if (sdr != null && sdr.getData() != null) {
dept = sdr.getData(); dept = sdr.getData();
} }
if (dept == null || dept.getId() == null) { if (dept != null && dept.getId() != null) {
invoiceTitle = dept.getBusinessSubjectName(); invoiceTitle = dept.getBusinessSubjectName();
} }
...@@ -273,10 +273,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -273,10 +273,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus()); finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus());
//年终奖合并扣税 //年终奖合并扣税
if (isSend) { if (isSend) {
wSalary = infoVo.getAnnualBonus();
finalSalaryWithSalary = finalSalaryNoSalary; finalSalaryWithSalary = finalSalaryNoSalary;
} else { } else {
finalSalaryWithSalary = calculationSalary(annousTax, BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), wSalary = BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), infoVo.getAnnualTSalary());
infoVo.getAnnualTSalary())); finalSalaryWithSalary = calculationSalary(annousTax, wSalary);
} }
if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary). if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
...@@ -471,8 +472,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -471,8 +472,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
zySalary.add(BigDecimalUtils.safeAdd(res,anRes)); zySalary.add(BigDecimalUtils.safeAdd(res,anRes));
map.put(BigDecimalUtils.safeAdd(res,anRes).toString(),i); map.put(BigDecimalUtils.safeAdd(res,anRes).toString(),i);
} }
BigDecimal salary = BigDecimal.ZERO;
if (Common.isNotNull(zySalary)) {
salary = Collections.min(zySalary);
}
jsonObject.put("anRes",map); jsonObject.put("anRes",map);
jsonObject.put("zySalary",Collections.max(zySalary)); jsonObject.put("zySalary",salary);
return jsonObject; return jsonObject;
} }
......
...@@ -95,12 +95,15 @@ ...@@ -95,12 +95,15 @@
<!--统计--> <!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap"> <select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
select SELECT
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE DECLARE_UNIT, #{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(a.FORM_TYPE=0,'0',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE FROM
from t_salary_account a (SELECT s.* FROM t_salary_account s,
left join t_salary_employee b on b.id = a.EMP_ID (SELECT a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,MAX(CREATE_TIME) max_day,a.SETTLEMENT_MONTH
where a.DELETE_FLAG = '0' and a.SETTLEMENT_MONTH = #{lastMonth} FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastYear}
GROUP BY a.EMP_IDCARD,OCCUPATION_TYPE,DECLARE_UNIT,a.SETTLEMENT_MONTH GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,a.FORM_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH AND s.FORM_TYPE = b.FORM_TYPE ) c
</select> </select>
</mapper> </mapper>
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