From a9983a15c61d1df9ccce60d3b4cdf1ddae1c5a49 Mon Sep 17 00:00:00 2001 From: jiask <1069621233@qq.com> Date: Fri, 9 Jan 2026 10:48:02 +0800 Subject: [PATCH] =?UTF-8?q?JSK=20=20=E7=89=A9=E8=B5=84=E5=8E=82=E5=AE=B6?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/ma/service/impl/SupplierInfoServiceImpl.java | 7 +++++++ .../resources/mapper/material/ma/SupplierInfoMapper.xml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/SupplierInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/SupplierInfoServiceImpl.java index 108ce4be..712e8eca 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/SupplierInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/SupplierInfoServiceImpl.java @@ -8,6 +8,7 @@ import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.biz.domain.BmFileInfo; import com.bonus.material.basic.mapper.BmFileInfoMapper; +import com.bonus.material.ma.service.ITypeService; import com.bonus.system.api.RemoteFileService; import org.springframework.stereotype.Service; import com.bonus.material.ma.mapper.SupplierInfoMapper; @@ -35,6 +36,8 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService { @Resource private BmFileInfoMapper bmFileInfoMapper; + @Resource + private ITypeService iTypeService; /** * 查询物资厂家管理 * @@ -60,6 +63,8 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService { */ @Override public List selectSupplierInfoList(SupplierInfo supplierInfo) { + Long companyId=iTypeService.getUserDeptId(); + supplierInfo.setCompanyId(companyId+""); return supplierInfoMapper.selectSupplierInfoList(supplierInfo); } @@ -73,6 +78,8 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService { public AjaxResult insertSupplierInfo(SupplierInfo supplierInfo) { try { supplierInfo.setCreateTime(DateUtils.getNowDate()); + long companyId=iTypeService.getUserDeptId(); + supplierInfo.setCompanyId(companyId+""); int insertedSupplierInfoResult = supplierInfoMapper.insertSupplierInfo(supplierInfo); if (insertedSupplierInfoResult > 0) { if (CollectionUtils.isEmpty(supplierInfo.getBmFileInfos())) { diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/SupplierInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/SupplierInfoMapper.xml index 2cb99d9a..abcebba1 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/SupplierInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/SupplierInfoMapper.xml @@ -34,6 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and supplier like concat('%',#{supplier},'%') + + and company_id=#{companyId} + and supplier like concat('%',#{keyWord},'%')