|
@@ -7,6 +7,7 @@ import java.util.stream.Collectors;
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import cn.ezhizao.common.utils.SecurityUtils;
|
|
|
+import cn.ezhizao.project.business.entrust.mapper.BizEntrustMapper;
|
|
|
import cn.ezhizao.project.business.order.mapper.BizArchiveInputMapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -28,6 +29,8 @@ public class BizWorkOrderServiceImpl extends ServiceImpl<BizWorkOrderMapper, Bi
|
|
|
private BizArchiveInputMapper bizArchiveInputMapper;
|
|
|
@Resource
|
|
|
private BizWorkOrderMapper bizWorkOrderMapper;
|
|
|
+ @Resource
|
|
|
+ private BizEntrustMapper bizEntrustMapper;
|
|
|
final String[] reportTaskTableNames = {"biz_financial_individual_income_tax", "biz_financial_keep_account", "biz_financial_receive_ticket", "biz_financial_report_tax", "biz_financial_salary"};
|
|
|
|
|
|
final String[] housingFundTaskTableNames = {"biz_housing_fund_confirm", "biz_housing_fund_declare"};
|
|
@@ -73,23 +76,27 @@ public class BizWorkOrderServiceImpl extends ServiceImpl<BizWorkOrderMapper, Bi
|
|
|
public void continueStop(List<BizWorkOrder> list) {
|
|
|
|
|
|
for(BizWorkOrder bizWorkOrder : list){
|
|
|
+// Date endMonth = bizWorkOrder.getEndMonth();
|
|
|
+ //工单实际结束时间,代理记账要多一个月
|
|
|
Date endDate;
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ // 获取上一个月的第一天
|
|
|
+ LocalDate firstDayOfLastMonth = now.minusMonths(1).withDayOfMonth(1);
|
|
|
+ LocalDate firstDayOfMonth = now.withDayOfMonth(1);
|
|
|
if (bizWorkOrder.getTaskTypeId()==1){
|
|
|
- // 获取当前日期的 LocalDate 对象
|
|
|
- LocalDate now = LocalDate.now();
|
|
|
- // 获取上一个月的第一天
|
|
|
- LocalDate firstDayOfLastMonth = now.minusMonths(1).withDayOfMonth(1);
|
|
|
// 将 LocalDate 对象转换为 Date 对象
|
|
|
endDate = Date.from(firstDayOfLastMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
+ if(endDate.compareTo(bizWorkOrder.getEndMonth())>0){
|
|
|
+ //endDate = Date.from(firstDayOfMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
+ bizEntrustMapper.deleteByDate(bizWorkOrder.getId(),endDate,bizWorkOrder.getTaskTypeId(), SecurityUtils.getUserId());
|
|
|
+ }
|
|
|
}else {
|
|
|
- // 获取当前日期的 LocalDate 对象
|
|
|
- LocalDate now = LocalDate.now();
|
|
|
- // 将 LocalDate 对象的日期设置为当前月份的第一天
|
|
|
- LocalDate firstDayOfMonth = now.withDayOfMonth(1);
|
|
|
// 将 LocalDate 对象转换为 Date 对象
|
|
|
endDate = Date.from(firstDayOfMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
+ if(endDate.compareTo(bizWorkOrder.getEndMonth())>0){
|
|
|
+ bizEntrustMapper.deleteByDate(bizWorkOrder.getId(),endDate,bizWorkOrder.getTaskTypeId(), SecurityUtils.getUserId());
|
|
|
+ }
|
|
|
}
|
|
|
- bizArchiveInputMapper.deleteByDate(bizWorkOrder.getId(),endDate,bizWorkOrder.getTaskTypeId(), SecurityUtils.getUserId());
|
|
|
}
|
|
|
}
|
|
|
|