资质证书预警等相关修改

dev_test1.0
anthonywj 1 year ago
parent c03a6b8cbf
commit 479705f562

@ -794,7 +794,7 @@ public class IoCodeTempController extends BaseController {
}
if (IntUtil.value(bussinessTypeEntity.getCheckCertExpire()) == 2 && udiRelevanceResponse.isNeedCert()) {
SupProductEntity supProductEntity = supProductService.findExitByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory());
SupProductEntity supProductEntity = supProductService.findExitByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), unitFk);
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)) {

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

@ -446,7 +446,7 @@ public class SupCertController {
}
String param = JSON.toJSONString(list);
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
}
/**
@ -561,7 +561,7 @@ public class SupCertController {
}
String param = JSON.toJSONString(list);
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
}
/**
@ -627,7 +627,7 @@ public class SupCertController {
}
String param = JSON.toJSONString(list);
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
}
//首营预览文件

@ -1,12 +1,16 @@
package com.glxp.api.controller.purchase;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.dao.purchase.SupCertRemindMsgDao;
import com.glxp.api.entity.purchase.SupCertRemindMsgEntity;
import com.glxp.api.req.purchase.FilterCertRemindMsgRequest;
import com.glxp.api.res.purchase.SupCertRemindMsgResponse;
import com.glxp.api.service.purchase.SupCertRemindMsgService;
@ -40,6 +44,15 @@ public class SupCertRemindMsgController {
return ResultVOUtils.page(pageInfo);
}
@Resource
private SupCertRemindMsgDao supCertRemindMsgDao;
@GetMapping("/sup/cert/remind/msg/getCount")
public BaseResponse getCount(FilterCertRemindMsgRequest filterCertRemindMsgRequest) {
long count = supCertRemindMsgDao.selectCount(new LambdaQueryWrapper<SupCertRemindMsgEntity>().eq(SupCertRemindMsgEntity::getStatus, 1));
return ResultVOUtils.success(count);
}
/**
*
*

@ -80,6 +80,7 @@ public class SupProductController {
@AuthRuleAnnotation("")
@GetMapping("/sup/product/getRegistrationList")
public BaseResponse getRegistrationList(FilterPoductRequest filterPoductRequest) {
filterPoductRequest.setCustomerId(null);
List<SupProductResponse> companyEntities = supProductService.getRegistration(filterPoductRequest);
PageInfo<SupProductResponse> pageInfo = new PageInfo<>(companyEntities);
PageSimpleResponse<SupProductResponse> pageSimpleResponse = new PageSimpleResponse<>();
@ -98,9 +99,13 @@ public class SupProductController {
//判断是否上级供应商是否审核通过
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk());
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN
|| supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) {
return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!");
// if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN
// || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) {
// return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!");
// }
if (supManufacturerEntity == null) {
return ResultVOUtils.error(500, "所属生产企业资质未维护!");
}
//验证证书是否齐全
@ -222,9 +227,12 @@ public class SupProductController {
//判断是否上级供应商是否审核通过
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk());
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN
|| supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) {
return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!");
// if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN
// || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) {
// return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!");
// }
if (supManufacturerEntity == null) {
return ResultVOUtils.error(500, "所属生产企业资质未维护!");
}
//验证证书是否齐全

@ -16,7 +16,9 @@ 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);
@ -31,5 +33,5 @@ public interface SupProductDao extends BaseMapperPlus<SupProductDao, SupProductE
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
SupProductEntity findByManufactury(@Param("cpmctymc") String cpmctymc, @Param("manufactory") String manufactory);
SupProductEntity findByManufactury(@Param("cpmctymc") String cpmctymc, @Param("manufactory") String manufactory, @Param("customerId") String customerId);
}

@ -98,5 +98,7 @@ public class SupCertRemindMsgResponse {
*/
private int remindCount;
private String supName;
}

@ -166,60 +166,60 @@ public class IoCheckInoutService {
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (!bussinessTypeEntity.isCheckEnable()) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
} else {
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
if (bussinessTypeEntity.getCheckUdims() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (bussinessTypeEntity.getCheckWebNew() == 0 || bussinessTypeEntity.getCheckWebNew() == 4) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
if (bussinessTypeEntity.getCheckPdaEd() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
if (bussinessTypeEntity.getCheckPdaUn() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
if (bussinessTypeEntity.getCheckPc() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
if (bussinessTypeEntity.getCheckChange() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (bussinessTypeEntity.getCheckBalance() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDISP) {
if (bussinessTypeEntity.getCheckSp() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
if (bussinessTypeEntity.getCheckCopy() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (bussinessTypeEntity.getCheckReview() == 0) {
unCheckFirstFinish(orderEntity,codeTempEntities);
unCheckFirstFinish(orderEntity, codeTempEntities);
return;
}
}
checkFirstFinish(orderEntity,codeTempEntities);
checkFirstFinish(orderEntity, codeTempEntities);
}
}
@ -229,27 +229,27 @@ public class IoCheckInoutService {
* 2code codesum code 0
*/
private void serialNoUniquenessVerification(List<IoCodeTempEntity> codeTempEntities) {
if (CollUtil.isNotEmpty(codeTempEntities)){
if (CollUtil.isNotEmpty(codeTempEntities)) {
List<String> codes = new ArrayList<>(codeTempEntities.size());
codeTempEntities.stream().forEach( x -> {
if (StrUtil.isNotBlank(x.getSerialNo())){
codeTempEntities.stream().forEach(x -> {
if (StrUtil.isNotBlank(x.getSerialNo())) {
codes.add(x.getCode());
}
});
if (CollUtil.isNotEmpty(codes)){
if (CollUtil.isNotEmpty(codes)) {
//正式code表里 对code分组sum实际库存数量
List<IoCodeResponse> codeSumReCountList = codeService.findByCodeSumReCount(codes);
if (codeSumReCountList.size() > 0 ){
if (codeSumReCountList.size() > 0) {
StringBuilder msg = new StringBuilder();
codeSumReCountList.forEach( x -> {
if (x.getReCount() > 0){
msg.append(x.getCode()+",");
codeSumReCountList.forEach(x -> {
if (x.getReCount() > 0) {
msg.append(x.getCode() + ",");
}
});
if (StrUtil.isNotEmpty(msg)){
msg.deleteCharAt(msg.length()-1);
throw new JsonException(500,"产品UDI码" + msg + "存库唯一性校验不通过!");
if (StrUtil.isNotEmpty(msg)) {
msg.deleteCharAt(msg.length() - 1);
throw new JsonException(500, "产品UDI码" + msg + "存库唯一性校验不通过!");
}
}
}
@ -376,7 +376,7 @@ public class IoCheckInoutService {
//一次校验(无需校验)完成
public void unCheckFirstFinish(IoOrderEntity orderEntity,List<IoCodeTempEntity> codeTempEntities) {
public void unCheckFirstFinish(IoOrderEntity orderEntity, List<IoCodeTempEntity> codeTempEntities) {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderEntity.getBillNo());
@ -443,7 +443,7 @@ public class IoCheckInoutService {
//一次校验完成
public void checkFirstFinish(IoOrderEntity orderEntity,List<IoCodeTempEntity> codeTempEntities) {
public void checkFirstFinish(IoOrderEntity orderEntity, List<IoCodeTempEntity> codeTempEntities) {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderEntity.getBillNo());
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(orderEntity.getBillNo());

@ -50,5 +50,6 @@ public interface SupCertService extends IService<SupCertEntity> {
List<SupCertEntity> selectSupCertList(purPlanPrintRequest purPlanPrintRequest);
boolean revokeSupCert(SupCertEntity supCertEntity);
}

@ -20,7 +20,7 @@ public interface SupProductService extends IService<SupProductEntity> {
SupProductEntity findByManufactury(String cpmctymc, String manufactory, String manufacturerIdFk);
SupProductEntity findExitByManufactury(String cpmctymc, String manufactory);
SupProductEntity findExitByManufactury(String cpmctymc, String manufactory, String customerId);
SupProductResponse findByPassByReCert(String registerCert);
@ -35,7 +35,9 @@ 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);

@ -15,6 +15,7 @@ import com.glxp.api.req.purchase.FilterCertRemindMsgRequest;
import com.glxp.api.res.purchase.SupCertRemindMsgResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.purchase.SupCertRemindMsgService;
import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -150,6 +151,10 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
return wrapper;
}
@Resource
SupCertService supCertService;
/**
*
*
@ -164,8 +169,13 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
SupCertRemindMsgEntity msgEntity = getSupCertRemindMsg(supCertEntity, type);
if (null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() > new Date().getTime()) {
//生成,更新预警信息
saveMsg(msgEntity);
try {
saveMsg(msgEntity);
} catch (Exception e) {
e.printStackTrace();
}
}
supCertService.revokeSupCert(supCertEntity);
});
}
@ -187,7 +197,7 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
supCertRemindMsgDao.insert(msgEntity);
} else {
log.info("更新资质预警:{}", JSONUtil.toJsonStr(msgEntity));
supCertRemindMsgDao.insert(msgEntity);
supCertRemindMsgDao.updateById(msgEntity);
}
}
@ -217,7 +227,7 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
default:
break;
}
SupCertRemindMsgEntity msgEntity = supCertRemindMsgDao.selectOne(new QueryWrapper<SupCertRemindMsgEntity>().eq("idFk", idFk).eq("type", type).eq("code", supCertEntity.getCode()));
SupCertRemindMsgEntity msgEntity = supCertRemindMsgDao.selectOne(new QueryWrapper<SupCertRemindMsgEntity>().eq("idFk", idFk).eq("type", type).eq("code", supCertEntity.getCode()).last("limit 1"));
if (null == msgEntity) {
//构造新的资质预警信息
msgEntity = new SupCertRemindMsgEntity();

@ -4,18 +4,28 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.purchase.SupCertDao;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.purchase.SupCompanyEntity;
import com.glxp.api.entity.purchase.SupManufacturerEntity;
import com.glxp.api.entity.purchase.SupProductEntity;
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.res.purchase.SupProductResponse;
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 org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@Service
@ -185,4 +195,37 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
public List<SupCertEntity> selectSupCertList(purPlanPrintRequest purPlanPrintRequest) {
return supCertDao.selectSupCertList(purPlanPrintRequest);
}
@Resource
SupCompanyService supCompanyService;
@Resource
SupManufacturerService supManufacturerService;
@Resource
SupProductService supProductService;
public boolean revokeSupCert(SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
boolean b = supCertDao.updateCompanyCert(supCertEntity);
if (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) {
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) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supProductService.modifyRegistration(supProductEntity);
}
return b;
}
}

@ -103,8 +103,8 @@ public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProduct
}
@Override
public SupProductEntity findExitByManufactury(String cpmctymc, String manufactory) {
return supProductDao.findByManufactury(cpmctymc, manufactory);
public SupProductEntity findExitByManufactury(String cpmctymc, String manufactory, String customerId) {
return supProductDao.findByManufactury(cpmctymc, manufactory, customerId);
}
@Override

@ -1015,7 +1015,7 @@
#{isDisable},
#{isLock},
#{lockStatus},
#{isAdavence}, #{purType},#{attributeType},#{hcType}
#{isAdavence}, #{purType},#{attributeType},#{hcType},
#{useMuti},
#{useNum},
#{supName},

@ -3,11 +3,11 @@
<mapper namespace="com.glxp.api.dao.purchase.SupCertRemindMsgDao">
<select id="selectSupRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
select m.*,
c.companyName `name`,
c.companyName `name`,
(select `name` from sup_cert s where s.code = m.code and s.CustomerId = m.idFk limit 1) certName
from sup_cert_remind_msg m
left join sup_company c on m.idFk = c.customerId
left join sup_cert bc on bc.code = m.code
left join sup_company c on m.idFk = c.customerId
left join sup_cert bc on bc.code = m.code
<where>
<if test="supId != null and supId != ''">
@ -28,18 +28,19 @@
<if test="certName != null and certName != ''">
AND bc.name like concat('%', #{certName}, '%')
</if>
</where>
order by m.updateTime desc
</select>
<select id="selectManufactureRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
select m.*,
c.companyName `name`,
c.companyName `name`,
(select `name` from sup_cert s where s.code = m.code and s.manufacturerIdFk = m.idFk limit 1) certName
,
(select name from basic_corp where erpId = c.customerId) supName
from sup_cert_remind_msg m
left join sup_manufacturer c on m.idFk = c.manufacturerId
left join sup_cert bc on bc.code = m.code
left join sup_manufacturer c on m.idFk = c.manufacturerId
left join sup_cert bc on bc.code = m.code
<where>
<if test="supId != null and supId != ''">
AND c.customerId = #{supId}
@ -59,18 +60,21 @@
<if test="certName != null and certName != ''">
AND bc.name like concat('%', #{certName}, '%')
</if>
</where>
order by m.updateTime desc
</select>
<select id="selectProductRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
select m.*,
c.recordProductName `name`,
c.recordProductName `name`,
(select `name` from sup_cert s where s.code = m.code and s.productIdFk = m.idFk limit 1) certName
,
(select name from basic_corp where erpId = c.customerId) supName
from sup_cert_remind_msg m
left join sup_product c on m.idFk = c.productId
left join sup_cert bc on bc.code = m.code
left join sup_product c on m.idFk = c.productId
left join sup_cert bc on bc.code = m.code
<where>
<if test="supId != null and supId != ''">

@ -135,7 +135,8 @@
INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk
INNER join basic_products on basic_products.cpmctymc = sup_product.recordProductName and basic_products.manufactory = sup_product.manufactory
INNER join basic_products on basic_products.cpmctymc = sup_product.recordProductName and
basic_products.manufactory = sup_product.manufactory
<where>
<if test="id != null and id != ''">
and sup_product.id = #{id}
@ -182,7 +183,7 @@
and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4)
</if>
</where>
GROUP BY cpmctymc, manufactory,ggxh
GROUP BY cpmctymc, manufactory, ggxh
</select>
<update id="modifyRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity">
@ -392,6 +393,7 @@
(SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk})
and recordCode = #{recordCode}
and recordProductName = #{recordProductName}
and sup_product.customerId = #{customerId}
</select>
<delete id="deleteById" parameterType="Map">
DELETE
@ -411,6 +413,7 @@
INNER JOIN sup_manufacturer on sup_product.manufacturerIdFk = sup_manufacturer.manufacturerId
WHERE sup_manufacturer.companyName = #{manufactory}
and sup_product.recordProductName = #{cpmctymc}
and sup_product.customerId = #{customerId}
limit 1
</select>
</mapper>

Loading…
Cancel
Save