diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/scrap/controller/ScrapApplyDetailsController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/scrap/controller/ScrapApplyDetailsController.java index d3bd3601..8f4a1311 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/scrap/controller/ScrapApplyDetailsController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/scrap/controller/ScrapApplyDetailsController.java @@ -57,6 +57,8 @@ public class ScrapApplyDetailsController extends BaseController { // @RequiresPermissions("scrap:details:list") @GetMapping("/list") public AjaxResult list(ScrapApplyDetails scrapApplyDetails) { + Long deptId = typeService.getUserDeptId(); + scrapApplyDetails.setCompanyId(deptId); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails); @@ -182,6 +184,8 @@ public class ScrapApplyDetailsController extends BaseController { //@RequiresPermissions("scrap:details:export") @PostMapping("/exportScrapList") public void exportScrapList(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) { + Long deptId = typeService.getUserDeptId(); + scrapApplyDetails.setCompanyId(deptId); List list = scrapApplyDetailsService.getScrapList(scrapApplyDetails); ExcelUtil util = new ExcelUtil<>(ScrapTotalListVo.class); util.exportExcel(response, list, "报废台账任务数据"); @@ -252,6 +256,8 @@ public class ScrapApplyDetailsController extends BaseController { if (scrapApplyDetails.getStartTime() != null && scrapApplyDetails.getEndTime() != null) { fileName = "报废审核列表"+ "(时间" +scrapApplyDetails.getStartTime() + "至" + scrapApplyDetails.getEndTime()+ ")"; } + Long deptId = typeService.getUserDeptId(); + scrapApplyDetails.setCompanyId(deptId); List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails); // 根据list集合数,去填充序号 for (int i = 0; i < list.size(); i++) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java index 3110c56f..e6a25868 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java @@ -1624,6 +1624,8 @@ public class SltAgreementInfoController extends BaseController { List list = sltAgreementInfoService.getLostReportList(bean); return getDataTable(list);*/ + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); List list = sltAgreementInfoService.getLostReportList(bean); @@ -1640,6 +1642,8 @@ public class SltAgreementInfoController extends BaseController { public void exportLostList(HttpServletResponse response, SltAgreementInfoLose bean) { String fileName = "丢失费用报表"; + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); List list = sltAgreementInfoService.getLostReportListExport(bean); // 根据list集合数,去填充序号 for (int i = 0; i < list.size(); i++) { @@ -1657,6 +1661,8 @@ public class SltAgreementInfoController extends BaseController { @ApiOperation(value = "维修报表list查询") @GetMapping("/getRepairReportList") public TableDataInfo getRepairReportList(SltAgreementInfo bean) { + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); startPage(); List list = sltAgreementInfoService.getRepairReportList(bean); return getDataTable(list); @@ -1671,6 +1677,8 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportRepairList") public void exportRepairList(HttpServletResponse response, SltAgreementInfoRepair bean) { + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); String fileName = "维修费用报表"; List list = sltAgreementInfoService.getRepairReportListExport(bean); // 根据list集合数,去填充序号 @@ -1689,6 +1697,8 @@ public class SltAgreementInfoController extends BaseController { @ApiOperation(value = "报废报表list查询") @GetMapping("/getScrapReportList") public TableDataInfo getScrapReportList(SltAgreementInfo bean) { + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); startPage(); List list = sltAgreementInfoService.getScrapReportList(bean); return getDataTable(list); @@ -1703,6 +1713,8 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportScrapList") public void exportScrapList(HttpServletResponse response, SltAgreementInfoScrap bean) { + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); String fileName = "报废费用报表"; List list = sltAgreementInfoService.getScrapReportListExport(bean); // 根据list集合数,去填充序号 @@ -1721,6 +1733,8 @@ public class SltAgreementInfoController extends BaseController { @ApiOperation(value = "已结算报表list查询") @GetMapping("/getSltReportedList") public TableDataInfo getSltReportedList(SltAgreementInfo bean) { + Long deptId = typeService.getUserDeptId(); + bean.setCompanyId(deptId); startPage(); List list = sltAgreementInfoService.getSltReportedList(bean); return getDataTable(list); @@ -1737,6 +1751,9 @@ public class SltAgreementInfoController extends BaseController { if (query == null) { query = new SltAgreementInfo(); } + + Long deptId = typeService.getUserDeptId(); + query.setCompanyId(deptId); startPage(); // ----------- 查询未结算的全部协议 --------------- @@ -1820,6 +1837,8 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportUnreported") public void exportUnreported(HttpServletResponse response, SltAgreementInfo query) { + Long deptId = typeService.getUserDeptId(); + query.setCompanyId(deptId); // ----------- 查询未结算的全部协议 --------------- List list = sltAgreementInfoService.getSltReportList(query); if(CollectionUtils.isEmpty(list)){ @@ -1894,6 +1913,8 @@ public class SltAgreementInfoController extends BaseController { // 设置查询条件 SltHistoryReport query = new SltHistoryReport(); + Long deptId = typeService.getUserDeptId(); + query.setCompanyId(deptId); query.setSettlementType(settlementType); query.setYearMonth(yearMonth.replace("-", "")); List list = sltHistoryReportService.selectHistoryReportList(query); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/SltHistoryReport.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/SltHistoryReport.java index 5f499c06..58d788ec 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/SltHistoryReport.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/SltHistoryReport.java @@ -28,5 +28,6 @@ public class SltHistoryReport { private BigDecimal reductionCost; private String yearMonth; private LocalDateTime createTime; + private Long companyId; } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/scrap/ScrapApplyDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/scrap/ScrapApplyDetailsMapper.xml index cdecee29..fdc220dd 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/scrap/ScrapApplyDetailsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/scrap/ScrapApplyDetailsMapper.xml @@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_dept sd on sd.dept_id = bpi.imp_unit where sad.scrap_source = '2' + and bpi.company_id=#{companyId} and type_id = #{typeId} and tt.task_status = #{appTaskStatus} @@ -518,7 +519,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" scrap_apply_details sad LEFT JOIN ma_type mt ON sad.type_id = mt.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id + LEFT JOIN tm_task tt on tt.task_id =sad.task_id WHERE sad.`status` = '1' and sad.ledger_status = '1' + and tt.company_id =#{companyId} and bai.company_id = #{companyId} and bui.unit_id = #{unitId} @@ -1014,7 +1015,7 @@ LEFT JOIN slt_agreement_info sai on bai.agreement_id = sai.agreement_id WHERE bai.status = '1' AND sai.is_slt = 0 - + and bai.company_id =#{companyId} AND bai.unit_id IN @@ -1185,6 +1186,9 @@ left join ma_type mt1 on mt.parent_id = mt1.type_id where rc.status in ('0','1') and rc.repair_type in ('1','2') + + and bai.company_id = #{info.companyId} + and mt.jiju_type = #{info.settlementType} @@ -1252,6 +1256,7 @@ LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit where rc.status in ('0','1') and rc.repair_type in ('1','2') + and bai.company_id = #{info.companyId} and mt.jiju_type = #{info.settlementType} @@ -1314,6 +1319,7 @@ LEFT JOIN ma_type mt1 on mt.parent_id = mt1.type_id where rc.status in ('0','1') and rc.repair_type = '3' + and bai.company_id =#{info.companyId} and mt.jiju_type = #{info.settlementType} @@ -1381,6 +1387,7 @@ LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit where rc.status in ('0','1') and rc.repair_type = '3' + and bai.company_id = #{info.companyId} and mt.jiju_type = #{info.settlementType} @@ -1497,7 +1504,9 @@ left join ma_type mt on sad.type_id = mt.type_id left join ma_type mt1 on mt.parent_id = mt1.type_id - + + and bai.company_id = #{companyId} + and mt.jiju_type = #{settlementType} @@ -1629,6 +1638,9 @@ LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit + + and bai.company_id = #{companyId} + and mt.jiju_type = #{settlementType} @@ -2157,26 +2169,28 @@