This commit is contained in:
2026-03-02 17:30:07 +08:00
parent d437fd548e
commit 312ee8cbc8
10 changed files with 73 additions and 24 deletions

View File

@ -100,4 +100,5 @@ public class UpdateLngBDocCpDto implements Serializable {
private Long tenantId; private Long tenantId;
private String docTypeCode;
} }

View File

@ -39,6 +39,12 @@ public class LngCustomerDocVo {
@ApiModelProperty("资质证书类型") @ApiModelProperty("资质证书类型")
private String docTypeCode; private String docTypeCode;
/**
* 资质证书类型
*/
@ApiModelProperty("资质证书类型名称")
private String docTypeName;
/** /**
* 资质证书编号 * 资质证书编号

View File

@ -39,6 +39,12 @@ public class LngSupplierDocVo {
@ApiModelProperty("资质证书类型") @ApiModelProperty("资质证书类型")
private String docTypeCode; private String docTypeCode;
/**
* 资质证书类型
*/
@ApiModelProperty("资质证书名称")
private String docTypeName;
/** /**
* 资质证书编号 * 资质证书编号

View File

@ -24,12 +24,11 @@ import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.datalog.vo.DataChangeLogVo; import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
import com.xjrsoft.module.mdm.dto.LngBDocCpPageDto; import com.xjrsoft.module.mdm.dto.LngBDocCpPageDto;
import com.xjrsoft.module.mdm.dto.UpdateLngBDocCpDto; import com.xjrsoft.module.mdm.dto.UpdateLngBDocCpDto;
import com.xjrsoft.module.mdm.entity.LngBCurrency;
import com.xjrsoft.module.mdm.entity.LngBDocCp; import com.xjrsoft.module.mdm.entity.LngBDocCp;
import com.xjrsoft.module.mdm.entity.LngBRegion;
import com.xjrsoft.module.mdm.service.IDocCpService; import com.xjrsoft.module.mdm.service.IDocCpService;
import com.xjrsoft.module.mdm.vo.LngBDocCpPageVo; import com.xjrsoft.module.mdm.vo.LngBDocCpPageVo;
import com.xjrsoft.module.mdm.vo.LngBDocCpVo; import com.xjrsoft.module.mdm.vo.LngBDocCpVo;
import com.xjrsoft.module.mdm.vo.LngBRegionVo;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
@ -132,11 +131,25 @@ public class DocCpController {
LambdaQueryWrapper<LngBDocCp> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<LngBDocCp> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper queryWrapper
.like(StrUtil.isNotBlank(dto.getFullName()), LngBDocCp::getFullName, dto.getFullName()) .like(StrUtil.isNotBlank(dto.getFullName()), LngBDocCp::getFullName, dto.getFullName());
.eq(StrUtil.isNotBlank(dto.getValid()), LngBDocCp::getValid, dto.getValid()) if (StrUtil.isNotBlank(dto.getDocTypeCode())) {
.eq(StrUtil.isNotBlank(dto.getSuSign()), LngBDocCp::getSuSign, dto.getSuSign()) queryWrapper.and(wrapper -> {
.eq(StrUtil.isNotBlank(dto.getCuSign()), LngBDocCp::getCuSign, dto.getCuSign()) // 构建 (valid AND suSign) 的交集
.orderByDesc(LngBDocCp::getCode); wrapper.eq(StrUtil.isNotBlank(dto.getValid()),LngBDocCp::getValid, dto.getValid())
.eq(StrUtil.isNotBlank(dto.getCuSign()),LngBDocCp::getCuSign, dto.getCuSign())
.eq(StrUtil.isNotBlank(dto.getSuSign()),LngBDocCp::getSuSign, dto.getSuSign())
.or(w -> w.eq(LngBDocCp::getCode, dto.getDocTypeCode()));
});
}else {
queryWrapper.eq(StrUtil.isNotBlank(dto.getValid()),LngBDocCp::getValid, dto.getValid())
.eq(StrUtil.isNotBlank(dto.getCuSign()),LngBDocCp::getCuSign, dto.getCuSign())
.eq(StrUtil.isNotBlank(dto.getSuSign()),LngBDocCp::getSuSign, dto.getSuSign());
}
queryWrapper.orderByDesc(LngBDocCp::getCode);
List<LngBDocCpVo> voList = CollectionUtils.newArrayList(); List<LngBDocCpVo> voList = CollectionUtils.newArrayList();
List<LngBDocCp> docList = docCpService.list(queryWrapper); List<LngBDocCp> docList = docCpService.list(queryWrapper);
if(docList != null && docList.size() > 0) { if(docList != null && docList.size() > 0) {

View File

@ -2,8 +2,15 @@ package com.xjrsoft.module.sales.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.dayPlan.vo.LngPngSettlePurVo;
import com.xjrsoft.module.sales.entity.LngCustomerDoc; import com.xjrsoft.module.sales.entity.LngCustomerDoc;
import com.xjrsoft.module.sales.vo.LngCustomerDocVo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/** /**
* @title: mapper * @title: mapper
@ -14,4 +21,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface LngCustomerDocMapper extends MPJBaseMapper<LngCustomerDoc>,BaseMapper<LngCustomerDoc> { public interface LngCustomerDocMapper extends MPJBaseMapper<LngCustomerDoc>,BaseMapper<LngCustomerDoc> {
@Select("SELECT a.*, cu.cu_sname,doc.full_name as doc_type_name" +
" FROM lng_customer_doc a" +
" LEFT JOIN lng_customer cu ON cu.cu_code=a.cu_code" +
" LEFT JOIN lng_b_doc_cp doc ON doc.code=a.doc_type_code"+
" WHERE a.cu_code = #{cuCode} order by a.sort")
List<LngCustomerDocVo> queryLngCustomerDocList(@Param("cuCode")String cuCode);
} }

View File

@ -86,6 +86,8 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
} }
} }
} }
List<LngCustomerDocVo> docList = lngCustomerDocMapper.queryLngCustomerDocList(vo.getCuCode());
vo.setLngCustomerDocList(docList);
if(CollectionUtil.isNotEmpty(vo.getLngCustomerDocList())) { if(CollectionUtil.isNotEmpty(vo.getLngCustomerDocList())) {
for(LngCustomerDocVo lngCustomerDoc: vo.getLngCustomerDocList()) { for(LngCustomerDocVo lngCustomerDoc: vo.getLngCustomerDocList()) {
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_customer_doc", "fileList", lngCustomerDoc.getId()); List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_customer_doc", "fileList", lngCustomerDoc.getId());

View File

@ -2,9 +2,16 @@ package com.xjrsoft.module.supplier.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.sales.vo.LngCustomerDocVo;
import com.xjrsoft.module.supplier.entity.LngSupplierContact; import com.xjrsoft.module.supplier.entity.LngSupplierContact;
import com.xjrsoft.module.supplier.entity.LngSupplierDoc; import com.xjrsoft.module.supplier.entity.LngSupplierDoc;
import com.xjrsoft.module.supplier.vo.LngSupplierDocVo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/** /**
* @title: mapper * @title: mapper
@ -15,4 +22,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface LngSupplierDocMapper extends MPJBaseMapper<LngSupplierDoc>,BaseMapper<LngSupplierDoc> { public interface LngSupplierDocMapper extends MPJBaseMapper<LngSupplierDoc>,BaseMapper<LngSupplierDoc> {
@Select("SELECT a.*, su.su_sname,doc.full_name as doc_type_name" +
" FROM lng_supplier_doc a" +
" LEFT JOIN lng_supplier su ON su.su_code=a.su_code" +
" LEFT JOIN lng_b_doc_cp doc ON doc.code=a.doc_type_code"+
" WHERE a.su_code = #{suCode} order by a.sort")
List<LngSupplierDocVo> queryLngSupplierDocList(@Param("suCode")String suCode);
} }

View File

@ -29,7 +29,7 @@ public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepSe
* @param ids * @param ids
* @return * @return
*/ */
Boolean delete(List<Long> ids); //Boolean delete(List<Long> ids);
LngSupplierVo getSupplierById(Long id); LngSupplierVo getSupplierById(Long id);

View File

@ -47,8 +47,11 @@ public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScor
return null; return null;
} }
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class); LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
LngSupplier supplier = supplierMapper.selectOne(new LambdaQueryWrapper<LngSupplier>()
.eq(LngSupplier::getSuCode, vo.getCpCode())); LambdaQueryWrapper<LngSupplier> queryWrapper = new LambdaQueryWrapper<LngSupplier>();
queryWrapper.eq(LngSupplier::getSuCode,lngScore.getCpCode());
LngSupplier supplier = supplierMapper.selectOne(queryWrapper);
if(supplier != null) { if(supplier != null) {
vo.setCpClassCode(supplier.getClassCode()); vo.setCpClassCode(supplier.getClassCode());
vo.setCpName(supplier.getSuName()); vo.setCpName(supplier.getSuName());

View File

@ -15,6 +15,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
import com.pictc.enums.ApproveCodeEnum; import com.pictc.enums.ApproveCodeEnum;
import com.xjrsoft.module.mdm.client.ILngBankClient; import com.xjrsoft.module.mdm.client.ILngBankClient;
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto; import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
import com.xjrsoft.module.sales.vo.LngCustomerDocVo;
import com.xjrsoft.module.supplier.entity.LngSupplier; import com.xjrsoft.module.supplier.entity.LngSupplier;
import com.xjrsoft.module.supplier.entity.LngSupplierBank; import com.xjrsoft.module.supplier.entity.LngSupplierBank;
import com.xjrsoft.module.supplier.entity.LngSupplierContact; import com.xjrsoft.module.supplier.entity.LngSupplierContact;
@ -46,25 +47,14 @@ import lombok.AllArgsConstructor;
public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, LngSupplier> implements ISupplierService { public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, LngSupplier> implements ISupplierService {
private final LngSupplierMapper supplierMapper; private final LngSupplierMapper supplierMapper;
private final LngSupplierBankMapper supplierLngSupplierBankMapper; private final LngSupplierBankMapper lngSupplierBankMapper;
private final LngSupplierContactMapper supplierLngSupplierContactMapper; private final LngSupplierContactMapper lngSupplierContactMapper;
private final LngSupplierDocMapper supplierLngSupplierDocMapper; private final LngSupplierDocMapper lngSupplierDocMapper;
private final IFileClient fileClient; private final IFileClient fileClient;
private final ILngBankClient bankClient; private final ILngBankClient bankClient;
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean delete(List<Long> ids) {
supplierMapper.deleteBatchIds(ids);
supplierLngSupplierBankMapper.delete(Wrappers.lambdaQuery(LngSupplierBank.class).in(LngSupplierBank::getSuCode, ids));
supplierLngSupplierContactMapper.delete(Wrappers.lambdaQuery(LngSupplierContact.class).in(LngSupplierContact::getSuCode, ids));
supplierLngSupplierDocMapper.delete(Wrappers.lambdaQuery(LngSupplierDoc.class).in(LngSupplierDoc::getSuCode, ids));
return true;
}
@Override @Override
public LngSupplierVo getSupplierById(Long id) { public LngSupplierVo getSupplierById(Long id) {
LngSupplier lngSupplier = this.getByIdDeep(id); LngSupplier lngSupplier = this.getByIdDeep(id);
@ -86,6 +76,8 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
} }
} }
} }
List<LngSupplierDocVo> docList = lngSupplierDocMapper.queryLngSupplierDocList(vo.getSuCode());
vo.setLngSupplierDocList(docList);
if(CollectionUtil.isNotEmpty(vo.getLngSupplierDocList())) { if(CollectionUtil.isNotEmpty(vo.getLngSupplierDocList())) {
for(LngSupplierDocVo lngSupplierDoc: vo.getLngSupplierDocList()) { for(LngSupplierDocVo lngSupplierDoc: vo.getLngSupplierDocList()) {
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_Supplier_doc", "fileList", lngSupplierDoc.getId()); List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_Supplier_doc", "fileList", lngSupplierDoc.getId());