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;