Commit a4303810 authored by hongguangwu's avatar hongguangwu

优化lastMonth

parent 438bdd8f
...@@ -39,7 +39,8 @@ public interface TStatisticsCurrentReportMapper extends BaseMapper<TStatisticsCu ...@@ -39,7 +39,8 @@ public interface TStatisticsCurrentReportMapper extends BaseMapper<TStatisticsCu
IPage<TStatisticsCurrentReport> getTStatisticsCurrentReportPage(Page<TStatisticsCurrentReport> page, @Param("tStatisticsCurrentReport") TStatisticsCurrentReport tStatisticsCurrentReport); IPage<TStatisticsCurrentReport> getTStatisticsCurrentReportPage(Page<TStatisticsCurrentReport> page, @Param("tStatisticsCurrentReport") TStatisticsCurrentReport tStatisticsCurrentReport);
int insertStatisticsCurrentReport(@Param("declareMonth") String declareMonth int insertStatisticsCurrentReport(@Param("declareMonth") String declareMonth
, @Param("lastTwoMonth") String lastTwoMonth, @Param("lastTwoYear") String lastTwoYear); , @Param("lastMonth") String lastMonth, @Param("lastTwoMonth") String lastTwoMonth
, @Param("lastTwoYear") String lastTwoYear);
/** /**
* @param yearMonth * @param yearMonth
......
...@@ -64,5 +64,5 @@ public interface TStatisticsCurrentReportService extends IService<TStatisticsCur ...@@ -64,5 +64,5 @@ public interface TStatisticsCurrentReportService extends IService<TStatisticsCur
* @Date: 2022/2/23 15:10 * @Date: 2022/2/23 15:10
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/ **/
R<String> doRefreshStatisticsCurrentReport(String declareMonth, String lastTwoMonth); R<String> doRefreshStatisticsCurrentReport(String declareMonth, String lastMonth, String lastTwoMonth);
} }
...@@ -159,7 +159,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -159,7 +159,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
} }
@Override @Override
public R<String> doRefreshStatisticsCurrentReport(String declareMonth, String lastTwoMonth) { public R<String> doRefreshStatisticsCurrentReport(String declareMonth, String lastMonth, String lastTwoMonth) {
int firstDelete = baseMapper.deleteByYearMonth(declareMonth); int firstDelete = baseMapper.deleteByYearMonth(declareMonth);
if (firstDelete != -2) { if (firstDelete != -2) {
String mons = declareMonth.substring(4, 6); String mons = declareMonth.substring(4, 6);
...@@ -167,7 +167,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -167,7 +167,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
if ("02".equals(mons)) { if ("02".equals(mons)) {
lastTwoYear = "-"; lastTwoYear = "-";
} }
baseMapper.insertStatisticsCurrentReport(declareMonth, lastTwoMonth, lastTwoYear); baseMapper.insertStatisticsCurrentReport(declareMonth, lastMonth, lastTwoMonth, lastTwoYear);
return R.ok("已生成完毕!"); return R.ok("已生成完毕!");
} else { } else {
return R.failed("删除本期申报失败!"); return R.failed("删除本期申报失败!");
......
...@@ -66,7 +66,7 @@ public class TStatisticsTaxSalaryTwoServiceImpl extends ServiceImpl<TStatisticsT ...@@ -66,7 +66,7 @@ public class TStatisticsTaxSalaryTwoServiceImpl extends ServiceImpl<TStatisticsT
R<String> taxR = this.doStatisticsTaxSalary(tableName, declareMonth, lastMonth); R<String> taxR = this.doStatisticsTaxSalary(tableName, declareMonth, lastMonth);
if (taxR.getCode() == CommonConstants.SUCCESS) { if (taxR.getCode() == CommonConstants.SUCCESS) {
// 刷新对应结算月的 本期申报 // 刷新对应结算月的 本期申报
tStatisticsCurrentReportService.doRefreshStatisticsCurrentReport(declareMonth, lastTwoMonth); tStatisticsCurrentReportService.doRefreshStatisticsCurrentReport(declareMonth, lastMonth, lastTwoMonth);
} else { } else {
log.error(taxR.getMsg()); log.error(taxR.getMsg());
} }
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
s.UNIT_NAME, s.UNIT_NAME,
s.SPECIAL_DEDU_MONEY, s.SPECIAL_DEDU_MONEY,
s.sum_baby_money, s.sum_baby_money,
s.IS_NEW_EMPLOYEE, if (#{lastMonth} = s.CREATE_MONTH,1,0) IS_NEW_EMPLOYEE,
s.CREATE_MONTH, s.CREATE_MONTH,
s.EMP_PHONE s.EMP_PHONE
from t_statistics_tax_salary s from t_statistics_tax_salary s
......
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