From 915803074bba519a3edd25431e5ee878e5fb516a Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期三, 17 五月 2023 16:02:09 +0800 Subject: [PATCH] 修改了家庭模块的导出模块,可以选择导出了 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java | 13 +++ zhang-content/src/main/java/com/ruoyi/service/ZfEquipmentService.java | 3 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java | 13 +++ zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java | 12 +++ zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java | 12 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java | 14 +++ zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java | 2 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 13 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java | 13 +++ zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java | 16 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java | 14 +++ zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 13 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java | 13 +++ zhang-content/src/main/java/com/ruoyi/service/ZfEconomyService.java | 2 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java | 13 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java | 13 +++ zhang-content/src/main/java/com/ruoyi/service/IZfPropertyService.java | 3 zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java | 1 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java | 11 ++ zhang-content/src/main/java/com/ruoyi/service/ZfCollectionService.java | 1 zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java | 15 +++ zhang-content/src/main/java/com/ruoyi/service/ZfContactService.java | 2 zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java | 2 zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java | 12 +++ zhang-content/src/main/java/com/ruoyi/service/ZfCleanService.java | 1 25 files changed, 214 insertions(+), 13 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java index ed7e7d4..13e7d7a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java @@ -71,6 +71,19 @@ ExcelUtil<ZfClean> util = new ExcelUtil<>(ZfClean.class); util.exportExcel(response, list, "淇濇磥鏀剁撼璁板綍鏁版嵁"); } + /** + * 瀵煎嚭淇濇磥鏀剁撼璁板綍鍒楄〃 + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "淇濇磥鏀剁撼璁板綍", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfClean> list = zfCleanService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfClean> util = new ExcelUtil<>(ZfClean.class); + util.exportExcel(response, list, "淇濇磥鏀剁撼璁板綍鏁版嵁"); + } /** * 瀵煎叆淇濇磥鏀剁撼璁板綍鍒楄〃 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java index 0e4539c..f938ef0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java @@ -72,6 +72,19 @@ ExcelUtil<ZfCollection> util = new ExcelUtil<>(ZfCollection.class); util.exportExcel(response, list, "鏀惰棌鍜岃崳瑾夎褰曟暟鎹�"); } + /** + * 瀵煎嚭鏀惰棌鍜岃崳瑾夎褰曞垪琛� + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "鏀惰棌鍜岃崳瑾夎褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfCollection> list = zfCollectionService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfCollection> util = new ExcelUtil<>(ZfCollection.class); + util.exportExcel(response, list, "鏀惰棌鍜岃崳瑾夎褰曟暟鎹�"); + } // /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java index 9a1df60..58d7002 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java @@ -72,6 +72,19 @@ } /** + * 瀵煎嚭閫氳褰曡褰曞垪琛� + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "閫氳褰曡褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfContact> list = zfContactService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfContact> util = new ExcelUtil<>(ZfContact.class); + util.exportExcel(response, list, "閫氳褰曡褰曟暟鎹�"); + } + /** * 瀵煎叆閫氳褰曡褰曞垪琛� */ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java index fe722be..9a197dd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java @@ -70,7 +70,19 @@ ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class); util.exportExcel(response, list, "瀹跺涵灏忓尰鐢熻褰曟暟鎹�"); } - + /** + * 瀵煎嚭瀹跺涵灏忓尰鐢熻褰曞垪琛� + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "瀹跺涵灏忓尰鐢熻褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export1(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfDoctor> list = zfDoctorService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class); + util.exportExcel(response, list, "瀹跺涵灏忓尰鐢熻褰曟暟鎹�"); + } /** * 瀵煎叆瀹跺涵灏忓尰鐢熻褰曞垪琛� */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java index 2afc357..2521423 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java @@ -70,6 +70,19 @@ ExcelUtil<ZfEconomy> util = new ExcelUtil<>(ZfEconomy.class); util.exportExcel(response, list, "瀹跺涵鏀舵敮鍙拌处璁板綍鏁版嵁"); } + /** + * 瀵煎嚭瀹跺涵鏀舵敮鍙拌处璁板綍鍒楄〃 + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "瀹跺涵鏀舵敮鍙拌处璁板綍", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfEconomy> list = zfEconomyService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfEconomy> util = new ExcelUtil<>(ZfEconomy.class); + util.exportExcel(response, list, "瀹跺涵鏀舵敮鍙拌处璁板綍鏁版嵁"); + } // /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java index 342a580..b871ac0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java @@ -9,6 +9,7 @@ import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.domain.ZfEquipment; +import com.ruoyi.domain.ZfEvent; import com.ruoyi.domain.excel.ZfEconomyExcelBean; import com.ruoyi.domain.excel.ZfEquipmentExcelBean; import com.ruoyi.service.ZfEquipmentService; @@ -72,6 +73,19 @@ ExcelUtil<ZfEquipment> util = new ExcelUtil<ZfEquipment>(ZfEquipment.class); util.exportExcel(response, list, "瀹跺涵璁惧璁板綍鏁版嵁"); } + /** + * 瀵煎嚭瀹跺涵璁惧璁板綍鍒楄〃 + */ + @Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export1(HttpServletResponse response, @PathVariable Long[] ids) { + List<ZfEquipment> list = zfEquipmentService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}", list); + ExcelUtil<ZfEquipment> util = new ExcelUtil<ZfEquipment>(ZfEquipment.class); + util.exportExcel(response, list, "瀹跺涵澶т簨浠惰褰曟暟鎹�"); + + } + // /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java index 2a07cf5..d923814 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java @@ -69,6 +69,19 @@ ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class); util.exportExcel(response, list, "榄呭疇璁板綍鏁版嵁"); } + /** + * 瀵煎嚭榄呭疇璁板綍鍒楄〃 + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "榄呭疇璁板綍", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export(HttpServletResponse response, @PathVariable Long[] ids) + { + List<ZfPet> list = zfPetService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class); + util.exportExcel(response, list, "榄呭疇璁板綍鏁版嵁"); + } /** * 瀵煎叆榄呭疇璁板綍鍒楄〃 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java index 1d82913..46810a1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.domain.ZfEquipment; import com.ruoyi.domain.ZfProperty; import com.ruoyi.domain.excel.ZfEconomyExcelBean; import com.ruoyi.domain.excel.ZfPropertyExcelBean; @@ -67,6 +68,18 @@ ExcelUtil<ZfProperty> util = new ExcelUtil<>(ZfProperty.class); util.exportExcel(response, list, "瀹跺涵璧勪骇璁板綍鏁版嵁"); } + /** + * 瀵煎嚭瀹跺涵璧勪骇璁板綍鍒楄〃 + */ + @Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export1(HttpServletResponse response, @PathVariable Long[] ids) { + List<ZfProperty> list = zfPropertyService.selectByIds(ids); + log.info("瀵煎嚭璁板綍涓�:{}", list); + ExcelUtil<ZfProperty> util = new ExcelUtil<ZfProperty>(ZfProperty.class); + util.exportExcel(response, list, "瀹跺涵澶т簨浠惰褰曟暟鎹�"); + + } // /** diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java index 8867a1d..fdef2d3 100644 --- a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java +++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java @@ -23,7 +23,7 @@ /** * 鍙戠敓鏃堕棿 */ - @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd") + @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") private Date happenTime; /** diff --git a/zhang-content/src/main/java/com/ruoyi/service/IZfPropertyService.java b/zhang-content/src/main/java/com/ruoyi/service/IZfPropertyService.java index 448bad5..a61ca00 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/IZfPropertyService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/IZfPropertyService.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.domain.ZfEquipment; import com.ruoyi.domain.ZfProperty; import org.springframework.web.multipart.MultipartFile; @@ -19,7 +20,7 @@ List<ZfProperty> selectByCondition(ZfProperty zfProperty); AjaxResult selectPropertyList(ZfProperty zfProperty,Integer pageNum,Integer pageSize); - + List<ZfProperty> selectByIds( Long[] ids); AjaxResult addData(ZfProperty zfProperty); AjaxResult addData2(ZfProperty zfProperty); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfCleanService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfCleanService.java index 1a02dac..89e4f16 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfCleanService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfCleanService.java @@ -23,6 +23,7 @@ List<ZfClean> selectByCondition(ZfClean zfClean); + List<ZfClean> selectByIds(Long[] ids); AjaxResult addData(ZfClean zfClean); AjaxResult addData2(ZfClean zfClean); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfCollectionService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfCollectionService.java index 4b84d99..118b331 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfCollectionService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfCollectionService.java @@ -22,6 +22,7 @@ List<ZfCollection> selectByCondition(ZfCollection zfCollection); + List<ZfCollection> selectByIds(Long[] ids); AjaxResult importExcel(MultipartFile file); AjaxResult addData2(ZfCollection zfCollection); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfContactService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfContactService.java index fa6efe4..4130db4 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfContactService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfContactService.java @@ -22,7 +22,7 @@ AjaxResult selectDataList(ZfContact zfContact, Integer pageNum, Integer pageSize); List<ZfContact> selectByCondition(ZfContact zfContact); - + List<ZfContact> selectByIds(Long [] ids); AjaxResult addData(ZfContact zfContact); AjaxResult addData2(ZfContact zfContact); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java index a2112ac..c748b58 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java @@ -20,6 +20,7 @@ AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize); List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor); + List<ZfDoctor> selectByIds(Long[] ids); AjaxResult mySave(ZfDoctor zfDoctor); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfEconomyService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfEconomyService.java index 73ea5cb..83c97cf 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfEconomyService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfEconomyService.java @@ -21,7 +21,7 @@ AjaxResult selectDataList(ZfEconomy zfEconomy, Integer pageNum, Integer pageSize); List<ZfEconomy> selectByCondition(ZfEconomy zfEconomy); - + List<ZfEconomy> selectByIds(Long [] ids); AjaxResult importExcel(MultipartFile file); AjaxResult addData2(ZfEconomy zfEconomy); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfEquipmentService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfEquipmentService.java index 8df6b0e..428f483 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfEquipmentService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfEquipmentService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.domain.ZfEquipment; +import com.ruoyi.domain.ZfEvent; import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -21,7 +22,7 @@ AjaxResult selectDataList(ZfEquipment zfEquipment, Integer pageNum, Integer pageSize); List<ZfEquipment> selectByCondition(ZfEquipment zfEquipment); - + List<ZfEquipment> selectByIds(Long[] ids); AjaxResult addData(ZfEquipment zfEquipment); AjaxResult addData2(ZfEquipment zfEquipment); diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java index de1d08a..e02b9dd 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java @@ -20,6 +20,6 @@ AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize); List<ZfPet> selectByCondition(ZfPet zfPet); - + List<ZfPet> selectByIds(Long[] ids); AjaxResult mySave(ZfPet zfPet); } diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java index 6fd2c53..a684a63 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java @@ -11,6 +11,7 @@ import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.domain.ZInfoUser; +import com.ruoyi.domain.ZfEquipment; import com.ruoyi.domain.ZfEvent; import com.ruoyi.domain.ZfProperty; import com.ruoyi.mapper.ZfPropertyMapper; @@ -25,9 +26,7 @@ import javax.annotation.Resource; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; import static com.ruoyi.constant.MenuAuthority.PROPERTY_LIST; @@ -230,6 +229,16 @@ } @Override + public List<ZfProperty> selectByIds(Long[] ids) { + List<ZfProperty> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + + @Override public AjaxResult addData(ZfProperty zfProperty) { String familyIds = listFamilyIds(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java index e2e279b..928222c 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java @@ -10,11 +10,9 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.domain.ZInfoUser; -import com.ruoyi.domain.ZfClean; +import com.ruoyi.domain.*; import com.ruoyi.domain.ZfClean; -import com.ruoyi.domain.ZfProperty; import com.ruoyi.mapper.ZfCleanMapper; import com.ruoyi.service.ZInfoUserService; import com.ruoyi.service.ZfCleanService; @@ -26,6 +24,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -208,6 +208,16 @@ return markOwnData(familyIds, beanRecords); } + @Override + public List<ZfClean> selectByIds(Long[] ids) { + List<ZfClean> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + private static List<ZfClean> markOwnData(String familyIds, List<ZfClean> beanRecords) { return beanRecords.stream().peek(record -> { String recordFamilyId = record.getFamilyId(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java index 080b9f5..4ca7ad4 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java @@ -23,6 +23,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -205,6 +207,16 @@ return markOwnData(familyIds, beanRecords); } + @Override + public List<ZfCollection> selectByIds(Long[] ids) { + List<ZfCollection> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + private List<ZfCollection> markOwnData(String familyIds, List<ZfCollection> beanRecords) { return beanRecords.stream().peek(record -> { String recordFamilyId = record.getFamilyId(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java index 6677c56..d6a662c 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java @@ -24,6 +24,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -196,6 +198,16 @@ return markOwnData(familyIds, beanRecords); } + @Override + public List<ZfContact> selectByIds(Long[] ids) { + List<ZfContact> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + private static List<ZfContact> markOwnData(String familyIds, List<ZfContact> beanRecords) { return beanRecords.stream().peek(record -> { String recordFamilyId = record.getFamilyId(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java index 30e7509..41bf507 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java @@ -8,12 +8,15 @@ import com.ruoyi.common.utils.MapUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.domain.ZfDoctor; +import com.ruoyi.domain.ZfEquipment; import com.ruoyi.domain.ZfPet; import com.ruoyi.mapper.ZfDoctorMapper; import com.ruoyi.service.ZfDoctorService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -51,6 +54,16 @@ } @Override + public List<ZfDoctor> selectByIds(Long[] ids) { + List<ZfDoctor> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + + @Override public AjaxResult mySave(ZfDoctor zfDoctor) { //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹� LambdaQueryWrapper<ZfDoctor> lqw = uniqueCondition(zfDoctor); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java index fe58ebf..6992786 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java @@ -23,6 +23,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -205,6 +207,16 @@ return markOwnData(familyIds, beanRecords); } + @Override + public List<ZfEconomy> selectByIds(Long[] ids) { + List<ZfEconomy> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + private List<ZfEconomy> markOwnData(String familyIds, List<ZfEconomy> beanRecords) { return beanRecords.stream().peek(record -> { String recordFamilyId = record.getFamilyId(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java index d805402..8b1a5bf 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java @@ -22,6 +22,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -203,6 +205,15 @@ return markOwnData(familyIds, beanRecords); } + @Override + public List<ZfEquipment> selectByIds(Long[] ids) { + List<ZfEquipment> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; } + private static List<ZfEquipment> markOwnData(String familyIds, List<ZfEquipment> beanRecords) { return beanRecords.stream().peek(record -> { String recordFamilyId = record.getFamilyId(); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java index f78c260..e2dda4b 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java @@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.MapUtils; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.domain.ZfEquipment; import com.ruoyi.domain.ZfPet; import com.ruoyi.domain.ZfProperty; import com.ruoyi.mapper.ZfPetMapper; @@ -15,6 +16,8 @@ import org.apache.poi.util.StringUtil; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -50,6 +53,16 @@ } @Override + public List<ZfPet> selectByIds(Long[] ids) { + List<ZfPet> list = new ArrayList<>(); + if(ids.length!=0) + list = listByIds(Arrays.asList(ids)); + else + list = list(); + return list; + } + + @Override public AjaxResult mySave(ZfPet zfPet) { //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹� LambdaQueryWrapper<ZfPet> lqw = uniqueCondition(zfPet); -- Gitblit v1.9.1