|
|
|
@ -296,55 +296,40 @@ public class SupManufacturerController {
|
|
|
|
|
return ResultVOUtils.error(500, "参数错误!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证证书是否齐全
|
|
|
|
|
FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest();
|
|
|
|
|
filterCertSetsRequest.setType(ConstantStatus.CERT_MANUFACTURER);
|
|
|
|
|
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
|
|
|
|
|
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
|
|
|
|
|
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
|
|
|
|
|
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|
|
|
|
|
||
|
|
|
|
|
(
|
|
|
|
|
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
|
|
|
|
|
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|
|
|
|
|
||
|
|
|
|
|
( supCertSetEntity.getForeign() != null
|
|
|
|
|
&& supCertSetEntity.getForeign() == 1
|
|
|
|
|
&& supManufacturerEntity.getCompanyType().equals("1"))
|
|
|
|
|
||
|
|
|
|
|
( supCertSetEntity.getForeign() != null
|
|
|
|
|
&& supCertSetEntity.getForeign() == 3
|
|
|
|
|
&& supManufacturerEntity.getCompanyType().equals("1"))) {
|
|
|
|
|
} else {
|
|
|
|
|
iterable.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(supManufacturerEntity.getAuditStatus()==2){
|
|
|
|
|
//查询上传的资质证书
|
|
|
|
|
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
|
|
|
|
|
filterSupCertRequest.setCustomerId(supManufacturerEntity.getCustomerId());
|
|
|
|
|
filterSupCertRequest.setManufacturerIdFk(supManufacturerEntity.getManufacturerId());
|
|
|
|
|
filterSupCertRequest.setType(ConstantStatus.CERT_MANUFACTURER);
|
|
|
|
|
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
|
|
|
|
|
//查询必须上传的资质证书
|
|
|
|
|
FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest();
|
|
|
|
|
filterCertSetsRequest.setType(ConstantStatus.CERT_MANUFACTURER);
|
|
|
|
|
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
|
|
|
|
|
//判断有没有存在必须上传而没有上传的证书
|
|
|
|
|
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
|
|
|
|
|
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
|
|
|
|
|
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|
|
|
|
|
||
|
|
|
|
|
(
|
|
|
|
|
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
|
|
|
|
|
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|
|
|
|
|
||
|
|
|
|
|
( supCertSetEntity.getForeign() != null
|
|
|
|
|
&& supCertSetEntity.getForeign() == 1
|
|
|
|
|
&& supManufacturerEntity.getCompanyType().equals("1"))
|
|
|
|
|
||
|
|
|
|
|
( supCertSetEntity.getForeign() != null
|
|
|
|
|
&& supCertSetEntity.getForeign() == 3
|
|
|
|
|
&& supManufacturerEntity.getCompanyType().equals("1"))) {
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
|
|
|
|
|
if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
|
|
|
|
|
if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) {
|
|
|
|
|
iterable.remove();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
iterable.remove();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String errMsg = "";
|
|
|
|
|
if (supCertSetEntities.size() > 0) {
|
|
|
|
|
return ResultVOUtils.error(500, "必传证书不齐全!");
|
|
|
|
|
}
|
|
|
|
|
String errMsg = "";
|
|
|
|
|
if (supCertSetEntities.size() > 0) {
|
|
|
|
|
for (SupCertSetEntity supCertSetEntity : supCertSetEntities) {
|
|
|
|
|
errMsg = errMsg + "," + supCertSetEntity.getName();
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.error(500, errMsg.substring(1) + "等必传证书未上传,无法完成审核!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|