|
@@ -368,6 +368,19 @@ public class BizStandardCompanyController extends BaseController {
|
|
|
@Log(title = "standardCompany", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
|
public AjaxResult remove(@PathVariable List<Long> ids) {
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ LocalDate firstDayOfMonth = now.withDayOfMonth(1);
|
|
|
+ java.util.Date endDate = java.util.Date.from(firstDayOfMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
+
|
|
|
+ Long count = bizEntrustService
|
|
|
+ .query()
|
|
|
+ .eq("work_month",endDate)
|
|
|
+ .in("company_id",ids)
|
|
|
+ .eq("deleted",0)
|
|
|
+ .count();
|
|
|
+ if(null != count && count > 0){
|
|
|
+ return error("当前客户有正在进行的服务,无法删除!");
|
|
|
+ }
|
|
|
return toAjax(bizStandardCompanyService.removeBatchByIds(ids));
|
|
|
}
|
|
|
|