|
@ -31,6 +31,7 @@ import com.yxt.common.core.vo.PagerVo; |
|
|
import com.yxt.crm.biz.crmcustomer.*; |
|
|
import com.yxt.crm.biz.crmcustomer.*; |
|
|
import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgQuery; |
|
|
import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgQuery; |
|
|
import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgVo; |
|
|
import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgVo; |
|
|
|
|
|
import com.yxt.crm.biz.crmmaintenanceenterpriserecord.CrmMaintenanceenterpriseRecordService; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@ -60,7 +61,8 @@ public class CrmCustomerRest { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private CrmCustomerService crmCustomerService; |
|
|
private CrmCustomerService crmCustomerService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private CrmMaintenanceenterpriseRecordService crmMaintenanceenterpriseRecordService; |
|
|
|
|
|
|
|
|
@ApiOperation("根据条件分页查询客户信息的列表") |
|
|
@ApiOperation("根据条件分页查询客户信息的列表") |
|
|
@PostMapping("/customerListPage") |
|
|
@PostMapping("/customerListPage") |
|
@ -96,6 +98,12 @@ public class CrmCustomerRest { |
|
|
@DeleteMapping("/delBySids") |
|
|
@DeleteMapping("/delBySids") |
|
|
public ResultBean delBySids(@RequestBody String[] sids) { |
|
|
public ResultBean delBySids(@RequestBody String[] sids) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
|
|
for (String sid : sids) { |
|
|
|
|
|
int count = crmMaintenanceenterpriseRecordService.selCountByCustomerSid(sid); |
|
|
|
|
|
if (count > 0) { |
|
|
|
|
|
return rb.setMsg("删除数据中包含欠款客户月结备案数据,删除失败"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
crmCustomerService.delBySids(sids); |
|
|
crmCustomerService.delBySids(sids); |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|