| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | @RestController |
| | | @RequestMapping("/system/supplier") |
| | | public class SupplierManageController { |
| | |
| | | public AjaxResult supplierListPage(Page page, SupplierManageDto supplierManageDto) { |
| | | return AjaxResult.success(supplierService.supplierListPage(page, supplierManageDto)); |
| | | } |
| | | |
| | | /** |
| | | * ä¾åºåå¯¼åº |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | | @GetMapping("/export") |
| | | public void supplierExport(HttpServletResponse response, SupplierManageDto supplierManageDto) { |
| | | supplierService.supplierExport(response, supplierManageDto); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SupplierManageDto extends SupplierManage { |
| | | |
| | | @ApiModelProperty(value = "ç»´æ¤äººååç§°") |
| | | private String maintainUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.excel; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class SupplierManageExcelDto { |
| | | |
| | | @Excel(name = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | @Excel(name = "纳ç¨äººè¯å«å·") |
| | | private String taxpayerIdentificationNum; |
| | | |
| | | @Excel(name = "å
¬å¸å°å") |
| | | private String companyAddress; |
| | | |
| | | @Excel(name = "å
¬å¸çµè¯") |
| | | private String companyPhone; |
| | | |
| | | @Excel(name = "弿·è¡") |
| | | private String bankAccountName; |
| | | |
| | | @Excel(name = "è´¦å·") |
| | | private String bankAccountNum; |
| | | |
| | | @Excel(name = "è系人") |
| | | private String contactUserName; |
| | | |
| | | @Excel(name = "èç³»çµè¯") |
| | | private String contactUserPhone; |
| | | |
| | | @Excel(name = "ç»´æ¤äººID") |
| | | private Integer maintainUserId; |
| | | |
| | | @Excel(name = "ç»´æ¤æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime maintainTime; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.excel.SupplierManageExcelDto; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface SupplierManageMapper extends BaseMapper<SupplierManage> { |
| | | |
| | | IPage<SupplierManage> supplierListPage(Page page, @Param("supplierManageDto") SupplierManageDto supplierManageDto); |
| | | |
| | | List<SupplierManageExcelDto> supplierExportList(@Param("supplierManageDto") SupplierManageDto supplierManageDto); |
| | | } |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer maintainUserId; |
| | | |
| | | @ApiModelProperty(value = "ç»´æ¤æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime maintainTime; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | public interface ISupplierService { |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | IPage<SupplierManage> supplierListPage(Page page, SupplierManageDto supplierManageDto); |
| | | |
| | | /** |
| | | * ä¾åºåå¯¼åº |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | | void supplierExport(HttpServletResponse response, SupplierManageDto supplierManageDto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.excel.SupplierManageExcelDto; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class SupplierServiceImpl extends ServiceImpl<SupplierManageMapper,SupplierManage> implements ISupplierService { |
| | |
| | | public IPage<SupplierManage> supplierListPage(Page page, SupplierManageDto supplierManageDto) { |
| | | return supplierMapper.supplierListPage(page,supplierManageDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¾åºåå¯¼åº |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | | @Override |
| | | public void supplierExport(HttpServletResponse response, SupplierManageDto supplierManageDto) { |
| | | List<SupplierManageExcelDto> supplierManageList = supplierMapper.supplierExportList(supplierManageDto); |
| | | ExcelUtil<SupplierManageExcelDto> util = new ExcelUtil<SupplierManageExcelDto>(SupplierManageExcelDto.class); |
| | | util.exportExcel(response, supplierManageList, "ä¾åºå导åº"); |
| | | } |
| | | } |
| | |
| | | {
|
| | | return success(deptService.selectDeptTreeList(dept));
|
| | | }
|
| | |
|
| | | /**
|
| | | * ä¸åé¡µç¨æ·æ¥è¯¢
|
| | | * @param user
|
| | | * @return
|
| | | */
|
| | | @GetMapping("/userListNoPage")
|
| | | public AjaxResult userListNoPage(SysUser user){
|
| | | List<SysUser> sysUserList = userService.userListNoPage(user);
|
| | | return AjaxResult.success(sysUserList);
|
| | | }
|
| | | }
|
| | |
| | | * @return ç»æ
|
| | | */
|
| | | public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
|
| | |
|
| | | /**
|
| | | * ä¸åé¡µç¨æ·æ¥è¯¢
|
| | | * @param user
|
| | | * @return
|
| | | */
|
| | | List<SysUser> userListNoPage(SysUser user);
|
| | | }
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | | import javax.validation.Validator;
|
| | |
| | | }
|
| | | return successMsg.toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * ä¸åé¡µç¨æ·æ¥è¯¢
|
| | | * @param user
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public List<SysUser> userListNoPage(SysUser user) {
|
| | | return userMapper.selectUserList(user);
|
| | | }
|
| | | }
|
| | |
| | | T1.create_user, |
| | | T1.update_time, |
| | | T1.update_user, |
| | | T1.tenant_id |
| | | T1.tenant_id, |
| | | T2.user_name AS maintainUserName |
| | | FROM supplier_manage T1 |
| | | LEFT JOIN sys_user T2 ON T1.maintain_user_id = T2.user_id |
| | | <where> |
| | | <if test="supplierManageDto.supplierName != null and supplierManageDto.supplierName != '' "> |
| | | AND supplier_name = #{supplierManageDto.supplierName} |
| | | AND T1.supplier_name LIKE CONCAT('%',#{supplierManageDto.supplierName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="supplierExportList" resultType="com.ruoyi.basic.excel.SupplierManageExcelDto"> |
| | | SELECT |
| | | T1.id, |
| | | T1.supplier_name, |
| | | T1.taxpayer_identification_num, |
| | | T1.company_address, |
| | | T1.company_phone, |
| | | T1.bank_account_name, |
| | | T1.bank_account_num, |
| | | T1.contact_user_name, |
| | | T1.contact_user_phone, |
| | | T1.maintain_user_id, |
| | | T1.maintain_time, |
| | | T1.create_time, |
| | | T1.create_user, |
| | | T1.update_time, |
| | | T1.update_user, |
| | | T1.tenant_id, |
| | | T2.user_name AS maintainUserName |
| | | FROM supplier_manage T1 |
| | | LEFT JOIN sys_user T2 ON T1.maintain_user_id = T2.user_id |
| | | <where> |
| | | <if test="supplierManageDto.supplierName != null and supplierManageDto.supplierName != '' "> |
| | | AND T1.supplier_name LIKE CONCAT('%',#{supplierManageDto.supplierName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |