|
@@ -89,8 +89,8 @@ public class BizCompanyController extends BaseController
|
|
public AjaxResult add(@RequestBody BizCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
|
|
public AjaxResult add(@RequestBody BizCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
|
|
{
|
|
{
|
|
//tenant_id,companyCode,company_alias不能为空
|
|
//tenant_id,companyCode,company_alias不能为空
|
|
- if(bizCompany.getTenantId() == null || bizCompany.getCompanyCode() == null || bizCompany.getCompanyCode() == "" || bizCompany.getCompanyAlias() == null || bizCompany.getCompanyAlias() ==""|| bizCompany.getCompanyName() == null || bizCompany.getCompanyName() ==""){
|
|
|
|
- return error("新增客户失败,必填项:厂别,公司编码,公司名称,公司别名不能为空");
|
|
|
|
|
|
+ if(bizCompany.getJdId() == null ||bizCompany.getTenantId() == null || bizCompany.getCompanyCode() == null || bizCompany.getCompanyCode() == "" || bizCompany.getCompanyAlias() == null || bizCompany.getCompanyAlias() ==""|| bizCompany.getCompanyName() == null || bizCompany.getCompanyName() ==""){
|
|
|
|
+ return error("新增客户失败,必填项:金蝶id,厂别,公司编码,公司名称,公司别名不能为空");
|
|
}
|
|
}
|
|
//判断厂别是否存在
|
|
//判断厂别是否存在
|
|
List<BizTenant> tenantList = bizTenantService.query().eq("id", bizCompany.getTenantId()).list();
|
|
List<BizTenant> tenantList = bizTenantService.query().eq("id", bizCompany.getTenantId()).list();
|
|
@@ -102,7 +102,8 @@ public class BizCompanyController extends BaseController
|
|
if(!companyList.isEmpty()){
|
|
if(!companyList.isEmpty()){
|
|
return error("新增客户失败,相同厂别不能有重复的公司编码");
|
|
return error("新增客户失败,相同厂别不能有重复的公司编码");
|
|
}
|
|
}
|
|
- return toAjax(bizCompanyService.save(bizCompany));
|
|
|
|
|
|
+ bizCompanyService.save(bizCompany);
|
|
|
|
+ return success(bizCompany.getId());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -149,7 +150,8 @@ public class BizCompanyController extends BaseController
|
|
return error("修改客户失败,相同厂别不能有重复的公司编码");
|
|
return error("修改客户失败,相同厂别不能有重复的公司编码");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return toAjax(bizCompanyService.updateById(bizCompany));
|
|
|
|
|
|
+ bizCompanyService.updateById(bizCompany);
|
|
|
|
+ return success(bizCompany.getId());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|