From dbf9e35923c9a7721ea69bffd2064c22467c505e Mon Sep 17 00:00:00 2001 From: jiask <1069621233@qq.com> Date: Fri, 9 Jan 2026 14:28:48 +0800 Subject: [PATCH] =?UTF-8?q?jsk=20=20=E6=A3=80=E9=AA=8C=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=20=E6=9D=83=E9=99=90=E6=94=B9=E9=80=A0-=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expectations/service/impl/ExpectationsServiceImpl.java | 5 +++++ .../mapper/material/expectations/ExpectationsMapper.xml | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/expectations/service/impl/ExpectationsServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/expectations/service/impl/ExpectationsServiceImpl.java index 8d321c95..93116460 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/expectations/service/impl/ExpectationsServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/expectations/service/impl/ExpectationsServiceImpl.java @@ -59,6 +59,11 @@ public class ExpectationsServiceImpl implements ExpectationsService { @Override public AjaxResult getCountExpectations(ExpectationsEntity entity) { try { + /** + * jsk + */ + Long companyId=iTypeService.getUserDeptId(); + entity.setCompanyId(companyId); Map countExpectations = mapper.getCountExpectations(entity); if (entity != null && "2".equals(entity.getUseStatus())) { //在用设备量 diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/expectations/ExpectationsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/expectations/ExpectationsMapper.xml index 63ddc517..7421de14 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/expectations/ExpectationsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/expectations/ExpectationsMapper.xml @@ -33,7 +33,7 @@ ) - AND mm.company_id=#{companyId} + AND mt1.company_id=#{companyId} GROUP BY mm.type_id, @@ -55,6 +55,9 @@ WHERE mm.ma_status = #{useStatus} AND mm.next_check_time < DATE_ADD(CURDATE(), INTERVAL 30 DAY) AND mt2.type_id not in (6032,6008,6270) + + AND mt.company_id=#{companyId} + GROUP BY name;