From 3a6636e5b470c4ea5f5c6bee141939f5393390fc Mon Sep 17 00:00:00 2001 From: 邱宇豪 <qyh123230312> Date: 星期二, 26 九月 2023 12:57:17 +0800 Subject: [PATCH] 调整预埋件 --- hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/impl/SysEmbedmentRecordServiceImpl.java | 8 +++++--- hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/SysEmbedmentRecordService.java | 3 ++- hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentRecordMapper.xml | 4 ++-- hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/controller/SysInsetRecordsController.java | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/controller/SysInsetRecordsController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/controller/SysInsetRecordsController.java index d7073b4..8258f39 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/controller/SysInsetRecordsController.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/controller/SysInsetRecordsController.java @@ -100,12 +100,12 @@ /** * 导出模板 - * @param embedmentRecordDto + * @param * @param response */ @PostMapping(value = "recordExportTemplate") - void recordExportTemplate(@RequestBody EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response){ - this.sysEmbedmentRecordService.recordExportTemplate(embedmentRecordDto,response); + void recordExportTemplate(HttpServletResponse response){ + this.sysEmbedmentRecordService.recordExportTemplate(null,response); } /** diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/SysEmbedmentRecordService.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/SysEmbedmentRecordService.java index b197edd..e057e1e 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/SysEmbedmentRecordService.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/SysEmbedmentRecordService.java @@ -1,6 +1,7 @@ package com.thhy.materials.modules.biz.embedment.service; import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.embedment.dto.EmbedmentGoodsDto; import com.thhy.materials.modules.biz.embedment.dto.EmbedmentRecordDto; import com.thhy.materials.modules.biz.embedment.entity.SysEmbedmentRecordEntity; import org.springframework.web.multipart.MultipartFile; @@ -43,7 +44,7 @@ void export(EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response); - void recordExportTemplate(EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response); + void recordExportTemplate(EmbedmentGoodsDto embedmentGoodsDto, HttpServletResponse response); BasicResult variateExcel(MultipartFile file, HttpServletRequest request); } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/impl/SysEmbedmentRecordServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/impl/SysEmbedmentRecordServiceImpl.java index 73740a3..398276d 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/impl/SysEmbedmentRecordServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/embedment/service/impl/SysEmbedmentRecordServiceImpl.java @@ -9,6 +9,7 @@ import com.thhy.general.exception.BasicException; import com.thhy.general.utils.ExcelUtils; import com.thhy.general.utils.UserInfoUtils; +import com.thhy.materials.modules.biz.embedment.dto.EmbedmentGoodsDto; import com.thhy.materials.modules.biz.embedment.dto.EmbedmentRecordDto; import com.thhy.materials.modules.biz.embedment.entity.SysEmbedmentGoodsEntity; import com.thhy.materials.modules.biz.embedment.entity.SysEmbedmentRecordEntity; @@ -142,7 +143,8 @@ } @Override - public void recordExportTemplate(EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response) { + public void recordExportTemplate(EmbedmentGoodsDto embedmentGoodsDto, HttpServletResponse response) { + embedmentGoodsDto = new EmbedmentGoodsDto(); SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String companyId = sysUserInfo.getCompanyId(); XSSFWorkbook book = new XSSFWorkbook(); @@ -153,8 +155,8 @@ row.createCell(2).setCellValue("单价"); row.createCell(3).setCellValue("金额"); row.createCell(4).setCellValue("备注"); - embedmentRecordDto.setCompanyId(companyId); - List<String> lx = sysEmbedmentRecordMapper.embedmentRecordList(embedmentRecordDto).stream().map(s -> s.getEmbedmentNameAndModel()).collect(Collectors.toList()); + embedmentGoodsDto.setCompanyId(companyId); + List<String> lx = sysEmbedmentGoodsMapper.findAll(embedmentGoodsDto).stream().map(s -> s.getEmbedmentName()+"-"+s.getEmbedmentModel()).collect(Collectors.toList()); String[] gjlx = lx.toArray(new String[lx.size()]); //物品名称-规格型号 diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentRecordMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentRecordMapper.xml index 481cae8..afed924 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentRecordMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentRecordMapper.xml @@ -171,8 +171,8 @@ <if test="companyId!=null and companyId!='' "> and ser.company_id=#{companyId} </if> - <if test="supplierId!=null and supplierId!='' "> - and ser.supplier_id=#{supplierId} + <if test="embedmentModel!=null and embedmentModel!='' "> + and seg.embedment_model=#{embedmentModel} </if> <if test="getDepart!=null and getDepart!='' "> and sd.depart_name like concat('%',#{getDepart},'%') -- Gitblit v1.9.3