|
|
|
@ -10,6 +10,7 @@ import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiRelevanceEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.SupCertEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.SupCertSetEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.SupManufacturerEntity;
|
|
|
|
@ -105,14 +106,14 @@ public class SupProductController {
|
|
|
|
|
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
|
|
|
|
|
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
) {
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
|
|
|
|
@ -188,9 +189,9 @@ public class SupProductController {
|
|
|
|
|
}
|
|
|
|
|
//判断是不是存在草稿
|
|
|
|
|
List<SupCertEntity> supCertEntityList1 = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId());
|
|
|
|
|
for(SupCertEntity obj:supCertEntityList1){
|
|
|
|
|
if(obj.getAuditStatus()==0){
|
|
|
|
|
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!");
|
|
|
|
|
for (SupCertEntity obj : supCertEntityList1) {
|
|
|
|
|
if (obj.getAuditStatus() == 0) {
|
|
|
|
|
return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//提交审核
|
|
|
|
@ -213,14 +214,14 @@ public class SupProductController {
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
|
|
|
|
|
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
|
|
|
|
|
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
) {
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
|
|
|
|
@ -263,7 +264,7 @@ public class SupProductController {
|
|
|
|
|
if (supProductEntity.getAuditStatus() == null) {
|
|
|
|
|
return ResultVOUtils.error(500, "参数错误!");
|
|
|
|
|
}
|
|
|
|
|
if(supProductEntity.getAuditStatus()==1){
|
|
|
|
|
if (supProductEntity.getAuditStatus() == 1) {
|
|
|
|
|
//查询用户上传的证书
|
|
|
|
|
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
|
|
|
|
|
filterSupCertRequest.setCustomerId(supProductEntity.getCustomerId());
|
|
|
|
@ -281,14 +282,14 @@ public class SupProductController {
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
|
|
|
|
|
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
|
|
|
|
|
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|
|
|
|
|
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
|
|
|
|
|
) {
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
|
|
|
|
@ -334,6 +335,14 @@ public class SupProductController {
|
|
|
|
|
|
|
|
|
|
supProductEntity.setUpdateTime(new Date());
|
|
|
|
|
boolean b = supProductService.modifyRegistration(supProductEntity);
|
|
|
|
|
if (StrUtil.isNotEmpty(supProductEntity.getRelIdFk())) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(Long.parseLong(supProductEntity.getRelIdFk()));
|
|
|
|
|
if (udiRelevanceEntity != null) {
|
|
|
|
|
udiRelevanceEntity.setDispatch(true);
|
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) {
|
|
|
|
|
// SupProductResponse supProductResponse = supProductService.findJoinRegistration(supProductEntity.getId());
|
|
|
|
|