|
@@ -162,10 +162,16 @@ public class FdCustomerController {
|
|
|
if(StringUtils.isNotBlank(abbreviation)){
|
|
|
fdCustomer.setAbbreviation(null);
|
|
|
}
|
|
|
+
|
|
|
+ String pkOrg=fdCustomer.getPkOrg();
|
|
|
+ if(StringUtils.isNotBlank(pkOrg)){
|
|
|
+ fdCustomer.setPkOrg(null);
|
|
|
+ }
|
|
|
QueryWrapper<FdCustomer> queryWrapper = QueryGenerator.initQueryWrapper(fdCustomer, req.getParameterMap());
|
|
|
Page<FdCustomer> page = new Page<FdCustomer>(pageNo, pageSize);
|
|
|
queryWrapper.eq("f.del_flag","0");
|
|
|
queryWrapper.eq("fs.is_default","1");
|
|
|
+ queryWrapper.eq("f.pk_org",pkOrg);
|
|
|
if(name!=null&&name!="") {
|
|
|
queryWrapper.like("f.name",name);
|
|
|
}
|
|
@@ -231,6 +237,7 @@ public class FdCustomerController {
|
|
|
LambdaQueryWrapper<FdCustomer> queryWrapper=new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(FdCustomer::getName,fdCustomer.getName());
|
|
|
queryWrapper.eq(FdCustomer::getDelFlag,"0");
|
|
|
+ queryWrapper.eq(FdCustomer::getPkOrg,fdCustomer.getPkOrg());
|
|
|
List<FdCustomer> fdCustomerList=fdCustomerService.list(queryWrapper);
|
|
|
if(!fdCustomerList.isEmpty()&&fdCustomerList.size()>0){
|
|
|
result.error500("客户名称已存在");
|
|
@@ -272,6 +279,7 @@ public class FdCustomerController {
|
|
|
queryWrapper2.eq(FdCustomer::getDelFlag,"0");
|
|
|
queryWrapper2.eq(FdCustomer::getAbbreviation,fdCustomer.getAbbreviation());
|
|
|
queryWrapper2.orderByDesc(FdCustomer::getCreateTime);
|
|
|
+ queryWrapper2.eq(FdCustomer::getPkOrg,fdCustomer.getPkOrg());
|
|
|
List<FdCustomer> fdCustomerList2=fdCustomerService.list(queryWrapper2);
|
|
|
|
|
|
if(fdCustomerList2!=null&&fdCustomerList2.size()>0){
|