Merge remote-tracking branch 'origin/dev' into dev

dev
郑明梁 2 years ago
commit e1f4439413

@ -169,14 +169,15 @@ public class IoOrderDetailBizController extends BaseController {
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (bussinessTypeEntity.getCheckCertExpire() == 2 && udiRelevanceResponse.isNeedCert()) {
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());
// List<SupCertEntity> supCertEntities = supCertService.findByProductId(supProductEntity.getProductId());
addBizProductReqeust.setProductId(supProductEntity.getProductId());
List<SupCertEntity> supCertEntities = supCertService.findByzczbhhzbapzbh(addBizProductReqeust);
if (CollUtil.isNotEmpty(supCertEntities)) {
Date curDate = new Date();
for (SupCertEntity supCertEntity : supCertEntities) {
if (supCertEntity.getExpireDate() != null && supCertEntity.getExpireDate().compareTo(curDate) < 0) {
return ResultVOUtils.error(500, "产品资质证书已过期!");
return ResultVOUtils.error(500, "该注册备案号所属产品资质证书已过期!");
}
}
}

@ -140,6 +140,9 @@ public class SupProductController {
return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!");
}
}
int i = supProductService.findProduct(supProductEntity);
System.out.println(i);
if (i == 0) {
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setId(IdUtil.getSnowflakeNextId());
@ -148,6 +151,8 @@ public class SupProductController {
return ResultVOUtils.success("添加成功");
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}} else {
return ResultVOUtils.error(ResultEnum.DATA_REPEAT);
}
}
@ -158,27 +163,27 @@ public class SupProductController {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk()));
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());
}
// 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());
// }
return ResultVOUtils.success(supProductEntity);

@ -4,6 +4,7 @@ package com.glxp.api.dao.purchase;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.req.inout.AddBizProductReqeust;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import org.apache.ibatis.annotations.Mapper;
@ -23,6 +24,8 @@ public interface SupCertDao extends BaseMapperPlus<SupCertDao, SupCertEntity, Su
List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> findByzczbhhzbapzbh(AddBizProductReqeust addBizProductReqeust);
boolean updateCompanyCert(SupCertEntity supCertEntity);
boolean insertCompanyCert(SupCertEntity supCertEntity);

@ -16,7 +16,7 @@ import java.util.List;
public interface SupProductDao extends BaseMapperPlus<SupProductDao, SupProductEntity, SupProductEntity> {
SupProductEntity findRegistration(Long id);
int findProduct(SupProductEntity supProductEntity);
SupProductEntity findRegistrationByName(String recordProductName);
List<SupProductResponse> getRegistration(FilterPoductRequest filterPoductRequest);

@ -13,6 +13,7 @@ public class AddBizProductReqeust {
//单选添加
private Long relId;
private String zczbhhzbapzbh;
private String productId;
private String supId;
private String batchNo;
private String productDate;

@ -3,6 +3,7 @@ package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.req.inout.AddBizProductReqeust;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
@ -22,6 +23,8 @@ public interface SupCertService extends IService<SupCertEntity> {
List<SupCertEntity> findByProductId(String productId);
List<SupCertEntity> findByzczbhhzbapzbh(AddBizProductReqeust addBizProductReqeust);
List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -35,7 +35,7 @@ public interface SupProductService extends IService<SupProductEntity> {
boolean modifyRegistration(SupProductEntity supProductEntity);
boolean insertRegistration(SupProductEntity supProductEntity);
int findProduct(SupProductEntity supProductEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);

@ -7,6 +7,7 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.purchase.SupCertDao;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.req.inout.AddBizProductReqeust;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import com.glxp.api.service.purchase.SupCertService;
@ -111,6 +112,10 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
return supCertDao.selectList(new QueryWrapper<SupCertEntity>().eq("productIdFk", productId));
}
@Override
public List<SupCertEntity> findByzczbhhzbapzbh(AddBizProductReqeust addBizProductReqeust) {
return supCertDao.findByzczbhhzbapzbh(addBizProductReqeust);
}
@Override
public boolean updateCompanyCert(SupCertEntity supCertEntity) {

@ -147,7 +147,10 @@ public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProduct
public boolean insertRegistration(SupProductEntity companyEntity) {
return supProductDao.insert(companyEntity) > 0 ? true : false;
}
@Override
public int findProduct(SupProductEntity supProductEntity) {
return supProductDao.findProduct(supProductEntity);
}
@Override
public boolean deleteById(String id) {
return supProductDao.deleteById(id);

@ -1255,7 +1255,9 @@
ON basic_products.uuid = basic_udirel.uuid
left join company_product_relevance
on basic_udirel.id = company_product_relevance.udiRlIdFk
left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId
left JOIN basic_corp
on basic_corp.erpId = company_product_relevance.customerId
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')

@ -50,6 +50,25 @@
</select>
<select id="findByzczbhhzbapzbh" parameterType="com.glxp.api.req.inout.AddBizProductReqeust"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
SELECT sc.*
FROM sup_cert sc
LEFT JOIN sup_product sp ON sc.productIdFk = sp.productId
<where>
<if test="relId != null and relId != ''">
and sp.relIdFk = #{relId}
</if>
<if test="productId != null and productId != ''">
and sp.productId = #{productId}
</if>
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
AND sp.recordCode like concat('%', #{zczbhhzbapzbh}, '%')
</if>
</where>
</select>
<select id="findCompanyCertByName" parameterType="java.lang.String"
resultType="com.glxp.api.entity.purchase.SupCertEntity">

@ -377,7 +377,18 @@
#{hchzsb}, #{relIdFk}, #{manufactory}, #{allowNoBatch}, #{allowNoExpire}, #{allowNoProduct},
#{allowNoSerial})
</insert>
<select id="findProduct" parameterType="com.glxp.api.entity.purchase.SupProductEntity"
resultType="java.lang.Integer" >
SELECT count(*)
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
WHERE sup_manufacturer.companyName=(SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk})
and recordCode=#{recordCode} and recordProductName=#{recordProductName}
</select>
<delete id="deleteById" parameterType="Map">
DELETE
FROM sup_product

Loading…
Cancel
Save