Commit 8d8bda28 authored by huyuchen's avatar huyuchen

劳务费稿酬生成修改

parent 34ab759d
...@@ -46,5 +46,5 @@ public interface TStatisticsLaborMapper extends BaseMapper<TStatisticsLabor> { ...@@ -46,5 +46,5 @@ public interface TStatisticsLaborMapper extends BaseMapper<TStatisticsLabor> {
* @Description: 统计 * @Description: 统计
* @return: * @return:
**/ **/
List<TStatisticsLabor> doStatisticsLabor(@Param("nowMonth") String nowMonth, @Param("lastYear") String lastYear); List<TStatisticsLabor> doStatisticsLabor(@Param("nowMonth") String nowMonth, @Param("lastMonth") String lastMonth);
} }
...@@ -46,5 +46,5 @@ public interface TStatisticsRemunerationMapper extends BaseMapper<TStatisticsRem ...@@ -46,5 +46,5 @@ public interface TStatisticsRemunerationMapper extends BaseMapper<TStatisticsRem
* @Description: 统计 * @Description: 统计
* @return: * @return:
**/ **/
List<TStatisticsRemuneration> doStatisticsRemuneration(@Param("nowMonth") String nowMonth, @Param("lastYear") String lastYear); List<TStatisticsRemuneration> doStatisticsRemuneration(@Param("nowMonth") String nowMonth, @Param("lastMonth") String lastMonth);
} }
...@@ -254,8 +254,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap ...@@ -254,8 +254,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
return R.failed("上月数据已生成,不可重复生成!"); return R.failed("上月数据已生成,不可重复生成!");
} else { } else {
String lastMonth = DateUtil.addMonth(-1); //上月 String lastMonth = DateUtil.addMonth(-1); //上月
String lastYear = lastMonth.substring(0,4); List<TStatisticsLabor> stdvoList = baseMapper.doStatisticsLabor(nowMonth,lastMonth);
List<TStatisticsLabor> stdvoList = baseMapper.doStatisticsLabor(nowMonth,lastYear);
for (TStatisticsLabor declarer : stdvoList) { for (TStatisticsLabor declarer : stdvoList) {
this.save(declarer); this.save(declarer);
} }
......
...@@ -156,8 +156,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR ...@@ -156,8 +156,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
return R.failed("上月数据已生成,不可重复生成!"); return R.failed("上月数据已生成,不可重复生成!");
} else { } else {
String lastMonth = DateUtil.addMonth(-1); //上月 String lastMonth = DateUtil.addMonth(-1); //上月
String lastYear = lastMonth.substring(0,4); List<TStatisticsRemuneration> stdvoList = baseMapper.doStatisticsRemuneration(nowMonth,lastMonth);
List<TStatisticsRemuneration> stdvoList = baseMapper.doStatisticsRemuneration(nowMonth,lastYear);
for (TStatisticsRemuneration remuneration : stdvoList) { for (TStatisticsRemuneration remuneration : stdvoList) {
this.save(remuneration); this.save(remuneration);
} }
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
left join t_salary_account_item annualbonus on annualbonus.SALARY_ACCOUNT_ID = a.id and annualbonus.CN_NAME='年终奖' left join t_salary_account_item annualbonus on annualbonus.SALARY_ACCOUNT_ID = a.id and annualbonus.CN_NAME='年终奖'
left join t_salary_account_item tax on tax.SALARY_ACCOUNT_ID = a.id and tax.CN_NAME='年终奖单独扣税' left join t_salary_account_item tax on tax.SALARY_ACCOUNT_ID = a.id and tax.CN_NAME='年终奖单独扣税'
left join t_salary_standard s ON s.id = a.SALARY_FORM_ID left join t_salary_standard s ON s.id = a.SALARY_FORM_ID
where a.DELETE_FLAG = '1' and annualbonus.SALARY_MONEY > 0 and tax.SALARY_MONEY > 0 and s.SEND_MONTH like '${lastYear}%' where a.DELETE_FLAG = 0 and annualbonus.SALARY_MONEY > 0 and tax.SALARY_MONEY > 0 and s.SEND_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD,a.EMP_NAME GROUP BY a.EMP_IDCARD,a.EMP_NAME
</select> </select>
</mapper> </mapper>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,sum(a.ACTUAL_SALARY) INCOME, #{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,sum(a.ACTUAL_SALARY) INCOME,
a.INVOICE_TITLE DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE a.INVOICE_TITLE DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
from t_salary_account a from t_salary_account a
where a.DELETE_FLAG = '1' and a.SETTLEMENT_MONTH like '${lastYear}%' and a.FORM_TYPE = '3' where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH = #{lastMonth} and a.FORM_TYPE = '3'
GROUP BY a.EMP_IDCARD,a.EMP_NAME GROUP BY a.EMP_IDCARD,a.EMP_NAME
</select> </select>
</mapper> </mapper>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX, #{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,
sum(a.ACTUAL_SALARY) INCOME,a.INVOICE_TITLE DECLARE_UNIT,'居民身份证' CARD_TYPE sum(a.ACTUAL_SALARY) INCOME,a.INVOICE_TITLE DECLARE_UNIT,'居民身份证' CARD_TYPE
from t_salary_account a from t_salary_account a
where a.DELETE_FLAG = '1' and a.SETTLEMENT_MONTH like '${lastYear}%' and a.FORM_TYPE = '4' where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH = #{lastMonth} and a.FORM_TYPE = '4'
GROUP BY a.EMP_IDCARD,a.EMP_NAME GROUP BY a.EMP_IDCARD,a.EMP_NAME
</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