10 files modified
6 files added
| | |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.excel.InforExcel; |
| | | import org.springblade.modules.information.excel.InforImporter; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserImporter; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | |
| | | information.setDepartmentid(id); |
| | | } |
| | | String json=JSON.toJSONString(information); |
| | | com.util.OutJson.createJsonFile(json,"d:/anbao/information/","informationSave"); |
| | | //com.util.OutJson.createJsonFile(json,"d:/anbao/information/","informationSave"); |
| | | //arg.test01(arg.url + "/information/save", information); |
| | | return R.status(informationService.save(information)); |
| | | } |
| | |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 导入单位信息 |
| | | */ |
| | | @PostMapping("import-informaton") |
| | | @ApiOperationSupport(order = 12) |
| | | @ApiOperation(value = "导入单位", notes = "传入excel") |
| | | public R importUser(MultipartFile file, Integer isCovered,String deptid,String jurisdiction) { |
| | | InforImporter inforImporter = new InforImporter(informationService, false,deptid,jurisdiction); |
| | | ExcelUtil.save(file, inforImporter, InforExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // Information information = new Information(); |
| | | // information.setAddress("2"); |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.information.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class InforExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("统一社会信用代码") |
| | | private String creditcode; |
| | | |
| | | @ExcelProperty("企业名称") |
| | | private String enterprisename; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("法定代表人") |
| | | private String representative; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("成立日期") |
| | | private String establishtime; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("注册资本") |
| | | private String registeredcapital; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("实缴资本") |
| | | private String capital; |
| | | |
| | | @ExcelProperty("组织机构代码") |
| | | private String organizationcode; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("工商注册号") |
| | | private String registrationnumber; |
| | | |
| | | @ExcelProperty("纳税人识别号") |
| | | private String identificationnumber; |
| | | |
| | | @ExcelProperty("企业类型") |
| | | private String enterprises; |
| | | |
| | | @ExcelProperty("注册地址") |
| | | private String address; |
| | | |
| | | @ExcelProperty("经营范围") |
| | | private String business; |
| | | |
| | | @ExcelProperty("所属地区") |
| | | private String region; |
| | | |
| | | @ExcelProperty("登记机关") |
| | | private String registration; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("所属行业") |
| | | private String industry; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("类型") |
| | | private String stats; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.information.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @RequiredArgsConstructor |
| | | public class InforImporter implements ExcelImporter<InforExcel> { |
| | | |
| | | private final IInformationService service; |
| | | private final Boolean isCovered; |
| | | private final String deptid; |
| | | private final String jurisdiction; |
| | | |
| | | @Override |
| | | public void save(List<InforExcel> data) { |
| | | service.importInfor(data, isCovered,deptid,jurisdiction); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.excel.InforExcel; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @return |
| | | */ |
| | | IPage<InformationVO> securityPage(IPage<InformationVO> page, InformationVO information); |
| | | |
| | | /** |
| | | * 导入单位数据 |
| | | * |
| | | * @param data |
| | | * @param isCovered |
| | | * @return |
| | | */ |
| | | void importInfor(List<InforExcel> data, Boolean isCovered,String deptid,String jurisdiction); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.cache.ParamCache; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.cache.UserCache; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.excel.InforExcel; |
| | | import org.springblade.modules.information.mapper.InformationMapper; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSWORD; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | public IPage<InformationVO> securityPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.securityPage(page, information)); |
| | | } |
| | | |
| | | @Override |
| | | public void importInfor(List<InforExcel> data, Boolean isCovered,String deptid,String jurisdiction) { |
| | | data.forEach(InforExcel -> { |
| | | Information information = Objects.requireNonNull(BeanUtil.copy(InforExcel, Information.class)); |
| | | information.setDepartmentid(deptid); |
| | | information.setJurisdiction(jurisdiction); |
| | | this.save(information); |
| | | }); |
| | | } |
| | | } |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.member.entity.Member; |
| | | import org.springblade.modules.member.excel.memberExcel; |
| | | import org.springblade.modules.member.excel.memberImporter; |
| | | import org.springblade.modules.member.service.IMemberService; |
| | | import org.springblade.modules.member.vo.MemberVO; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | import org.springblade.modules.shareholder.excel.shareImporter; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导入管理人信息 |
| | | */ |
| | | @PostMapping("import-member") |
| | | @ApiOperationSupport(order = 12) |
| | | @ApiOperation(value = "导入投资人", notes = "传入excel") |
| | | public R importUser(MultipartFile file, Integer isCovered) { |
| | | memberImporter memberImporter = new memberImporter(memberService, false); |
| | | ExcelUtil.save(file, memberImporter, memberExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String cell; |
| | | /** |
| | | * 持股比例 |
| | | */ |
| | | @ApiModelProperty(value = "持股比例") |
| | | private String shareholdingratio; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date rtime; |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.member.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class memberExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("统一社会信用代码") |
| | | private String creditcode; |
| | | |
| | | @ExcelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("职务") |
| | | private String post; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("身份证") |
| | | private String cardid; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("联系电话") |
| | | private String cell; |
| | | |
| | | |
| | | @ExcelProperty("入职时间") |
| | | private String rtime; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.member.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.modules.member.service.IMemberService; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @RequiredArgsConstructor |
| | | public class memberImporter implements ExcelImporter<memberExcel> { |
| | | |
| | | private final IMemberService service; |
| | | private final Boolean isCovered; |
| | | |
| | | @Override |
| | | public void save(List<memberExcel> data) { |
| | | service.importmember(data, isCovered); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.member.entity.Member; |
| | | import org.springblade.modules.member.excel.memberExcel; |
| | | import org.springblade.modules.member.vo.MemberVO; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | IPage<MemberVO> selectMemberPage(IPage<MemberVO> page, MemberVO member); |
| | | IPage<MemberVO> selectMemberInfo(IPage<MemberVO> page,String creditcode); |
| | | void importmember(List<memberExcel> data, Boolean isCovered); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.member.entity.Member; |
| | | import org.springblade.modules.member.excel.memberExcel; |
| | | import org.springblade.modules.member.mapper.MemberMapper; |
| | | import org.springblade.modules.member.service.IMemberService; |
| | | import org.springblade.modules.member.vo.MemberVO; |
| | | import org.springblade.modules.shareholder.entity.Shareholder; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | return page.setRecords(baseMapper.selectMemberInfo(page,creditcode)); |
| | | } |
| | | |
| | | @Override |
| | | public void importmember(List<memberExcel> data, Boolean isCovered, String deptid, String jurisdiction) { |
| | | data.forEach(memberExcel -> { |
| | | Member member = Objects.requireNonNull(BeanUtil.copy(memberExcel, Member.class)); |
| | | this.save(member); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.information.excel.InforExcel; |
| | | import org.springblade.modules.information.excel.InforImporter; |
| | | import org.springblade.modules.shareholder.entity.Shareholder; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | import org.springblade.modules.shareholder.excel.shareImporter; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | import org.springblade.modules.shareholder.vo.ShareholderVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 导入投资人信息 |
| | | */ |
| | | @PostMapping("import-share") |
| | | @ApiOperationSupport(order = 12) |
| | | @ApiOperation(value = "导入投资人", notes = "传入excel") |
| | | public R importUser(MultipartFile file, Integer isCovered) { |
| | | shareImporter shareImporter = new shareImporter(shareholderService, false); |
| | | ExcelUtil.save(file, shareImporter, shareExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.shareholder.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class shareExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("统一社会信用代码") |
| | | private String creditcode; |
| | | |
| | | @ExcelProperty("股东") |
| | | private String shareholder; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("持股比例") |
| | | private String shareholdingratio; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("出资金额") |
| | | private String capital; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("出资时间") |
| | | private String capitaltime; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("身份证") |
| | | private String cardid; |
| | | |
| | | @ExcelProperty("联系电话") |
| | | private String cell; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.shareholder.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @RequiredArgsConstructor |
| | | public class shareImporter implements ExcelImporter<shareExcel> { |
| | | |
| | | private final IShareholderService service; |
| | | private final Boolean isCovered; |
| | | |
| | | @Override |
| | | public void save(List<shareExcel> data) { |
| | | service.importshare(data, isCovered); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.shareholder.service; |
| | | |
| | | package org.springblade.modules.shareholder.service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.shareholder.entity.Shareholder; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | import org.springblade.modules.shareholder.vo.ShareholderVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | IPage<ShareholderVO> selectShareholderPage(IPage<ShareholderVO> page, ShareholderVO shareholder); |
| | | IPage<ShareholderVO> selectShareholderInfo(IPage<ShareholderVO> page, String creditcode); |
| | | void importshare(List<shareExcel> data, Boolean isCovered); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.shareholder.entity.Shareholder; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | import org.springblade.modules.shareholder.mapper.ShareholderMapper; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | import org.springblade.modules.shareholder.vo.ShareholderVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | return page.setRecords(baseMapper.selectShareholderInfo(page,creditcode)); |
| | | } |
| | | |
| | | @Override |
| | | public void importshare(List<shareExcel> data, Boolean isCovered) { |
| | | data.forEach(shareExcel -> { |
| | | Shareholder shareholder = Objects.requireNonNull(BeanUtil.copy(shareExcel, Shareholder.class)); |
| | | this.save(shareholder); |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |