资质证书校验问题相关修改

dev
anthonywj 2 years ago
parent 85a4d6a26e
commit 6c91a2e9e7

@ -199,8 +199,6 @@ public class UdiContrastController {
} else {
return ResultVOUtils.error(500, "更新失败!");
}
}

@ -763,7 +763,7 @@ public class IoCodeTempController extends BaseController {
BaseResponse baseResponse = checkRelId(codeEnttity, unitFk);
if (bussinessTypeEntity.getCheckCertExpire() == 2 && udiRelevanceResponse.isNeedCert()) {
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), "");
SupProductEntity supProductEntity = supProductService.findExitByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory());
if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) {
List<SupCertEntity> supCertEntities = supCertService.findByProductId(supProductEntity.getProductId());
if (CollUtil.isNotEmpty(supCertEntities)) {
@ -775,7 +775,12 @@ public class IoCodeTempController extends BaseController {
}
}
} else {
return ResultVOUtils.error(500, "产品资质证书未通过审核!");
if (supProductEntity == null) {
return ResultVOUtils.error(500, "产品资质证书未维护!");
} else {
return ResultVOUtils.error(500, "产品资质证书未通过审核!");
}
}
}

@ -167,7 +167,7 @@ public class IoOrderDetailBizController extends BaseController {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(item.getRelId(), addBizProductReqeust.getSupId());
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (bussinessTypeEntity.getCheckCertExpire() == 2 && udiRelevanceResponse.isNeedCert()) {
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), "");
SupProductEntity supProductEntity = supProductService.findExitByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory());
if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) {
List<SupCertEntity> supCertEntities = supCertService.findByProductId(supProductEntity.getProductId());

@ -157,27 +157,27 @@ public class SupProductController {
public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk()));
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId());
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), selectProductBindRequest.getManufacturerId());
if (supProductEntity != null) {
return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!");
}else{
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
} else {
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
}

@ -215,8 +215,11 @@ public class ThrProductsController {
// udiProductEntity.setGgxh(thrProductsEntity.getStandard());
udiProductService.updateUdiInfo(udiProductEntity);
}
}
//todo 若产品信息
return ResultVOUtils.success("修改成功!");
}

@ -30,4 +30,6 @@ public interface SupProductDao extends BaseMapperPlus<SupProductDao, SupProductE
boolean deleteById(@Param("id") String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
SupProductEntity findByManufactury(@Param("cpmctymc") String cpmctymc, @Param("manufactory") String manufactory);
}

@ -18,7 +18,9 @@ public interface SupProductService extends IService<SupProductEntity> {
SupProductEntity findByRelIdFk(String relIdFk);
SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk);
SupProductEntity findByManufactury(String cpmctymc, String manufactory, String manufacturerIdFk);
SupProductEntity findExitByManufactury(String cpmctymc, String manufactory);
SupProductResponse findByPassByReCert(String registerCert);

@ -102,6 +102,11 @@ public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProduct
else return null;
}
@Override
public SupProductEntity findExitByManufactury(String cpmctymc, String manufactory) {
return supProductDao.findByManufactury(cpmctymc, manufactory);
}
@Override
public SupProductEntity findRegistrationByName(String recordProductName) {
return supProductDao.findRegistrationByName(recordProductName);

@ -129,11 +129,11 @@
sup_manufacturer.companyName,
sup_manufacturer.agentName
FROM sup_product
inner join sup_company
on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk
inner join sup_company
on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk
<where>
<if test="id != null and id != ''">
@ -389,4 +389,12 @@
FROM sup_product
WHERE enterpriseId = #{enterpriseId}
</delete>
<select id="findByManufactury" parameterType="Map"
resultType="com.glxp.api.entity.purchase.SupProductEntity">
select sup_product.*
from sup_product
INNER JOIN sup_manufacturer on sup_product.manufacturerIdFk = sup_manufacturer.manufacturerId
WHERE sup_manufacturer.companyName = #{manufactory}
and sup_product.recordProductName = #{cpmctymc}
</select>
</mapper>

@ -438,6 +438,6 @@ CALL Pro_Temp_ColumnWork('io_order', 'rmDeptCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'rmInvCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'outSickInfo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode',
'varchar(255) ', 1);
'varchar(255) ', 1);

Loading…
Cancel
Save