|
|
|
@ -19,6 +19,7 @@ import com.glxp.api.service.purchase.SupCertService;
|
|
|
|
|
import com.glxp.api.service.purchase.SupCompanyService;
|
|
|
|
|
import com.glxp.api.service.purchase.SupManufacturerService;
|
|
|
|
|
import com.glxp.api.service.purchase.SupProductService;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
@ -208,17 +209,17 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
|
|
|
|
|
supCertEntity.setCreateTime(new Date());
|
|
|
|
|
supCertEntity.setUpdateTime(new Date());
|
|
|
|
|
boolean b = supCertDao.updateCompanyCert(supCertEntity);
|
|
|
|
|
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
|
|
|
|
|
if (IntUtil.value(supCertEntity.getType()) == ConstantStatus.CERT_COMPANY) {
|
|
|
|
|
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
|
|
|
|
|
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
|
|
|
|
|
supCompanyEntity.setUpdateTime(new Date());
|
|
|
|
|
supCompanyService.modifyCompany(supCompanyEntity);
|
|
|
|
|
} else if (supCertEntity.getType() == ConstantStatus.CERT_MANUFACTURER) {
|
|
|
|
|
} else if (IntUtil.value(supCertEntity.getType()) == ConstantStatus.CERT_MANUFACTURER) {
|
|
|
|
|
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
|
|
|
|
|
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
|
|
|
|
|
supManufacturerEntity.setUpdateTime(new Date());
|
|
|
|
|
supManufacturerService.modifyCompany(supManufacturerEntity);
|
|
|
|
|
} else if (supCertEntity.getType() == ConstantStatus.CERT_PRODUCT) {
|
|
|
|
|
} else if (IntUtil.value(supCertEntity.getType()) == ConstantStatus.CERT_PRODUCT) {
|
|
|
|
|
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
|
|
|
|
|
SupProductEntity supProductEntity = new SupProductEntity();
|
|
|
|
|
supProductEntity.setId(supProductResponse.getId());
|
|
|
|
|