diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSupplierController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSupplierController.java new file mode 100644 index 000000000..e7ff2236c --- /dev/null +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSupplierController.java @@ -0,0 +1,134 @@ + +/** + * @Project: emis + * @Title: EmisSupplierController.java + * @author linfso + * @date 2025-01-16 02:48:51 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

公司供应商表 控制器

+ */ + +package com.xdadan.erp.web.emis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.xdadan.erp.common.annotation.Log; +import com.xdadan.erp.common.core.controller.BaseController; +import com.xdadan.erp.common.core.domain.AjaxResult; +import com.xdadan.erp.common.core.page.TableDataInfo; +import com.xdadan.erp.common.enums.BusinessType; +import com.xdadan.erp.common.utils.StringUtils; +import com.xdadan.erp.common.utils.poi.ExcelUtil; + +import com.xdadan.erp.emis.domain.EmisSupplier; +import com.xdadan.erp.emis.service.IEmisSupplierService; + +/** + * 公司供应商表Controller + * + * @author linfso + * @date 2025-01-16 02:48:51 + */ +@RestController +@RequestMapping("/emis/emisSupplier") +public class EmisSupplierController extends BaseController +{ + @Autowired + private IEmisSupplierService emisSupplierService; + + /** + * 查询公司供应商表列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:list')") + @GetMapping("/list") + public TableDataInfo list(EmisSupplier emisSupplier) + { + startPage(); + List list = emisSupplierService.selectEmisSupplierList(emisSupplier); + return getDataTable(list); + } + + + /** + * 检查是否重复 + * + * @param emisSupplier + * @return 数量 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:list')") + @GetMapping("/checkUnique") + public AjaxResult checkUnique(EmisSupplier emisSupplier) + { + int cnt=emisSupplierService.checkUnique(emisSupplier); + return AjaxResult.success("检查成功",cnt); + } + + + /** + * 导出公司供应商表列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:export')") + @Log(title = "公司供应商表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmisSupplier emisSupplier) + { + List list = emisSupplierService.selectEmisSupplierList(emisSupplier); + ExcelUtil util = new ExcelUtil(EmisSupplier.class); + util.exportExcel(response, list, "公司供应商表数据"); + } + + /** + * 获取公司供应商表详细信息 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(emisSupplierService.selectEmisSupplierById(id)); + } + + /** + * 新增公司供应商表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:add')") + @Log(title = "公司供应商表", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmisSupplier emisSupplier) + { + return toAjax(emisSupplierService.insertEmisSupplier(emisSupplier)); + } + + /** + * 修改公司供应商表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:edit')") + @Log(title = "公司供应商表", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmisSupplier emisSupplier) + { + return toAjax(emisSupplierService.updateEmisSupplier(emisSupplier)); + } + + /** + * 删除公司供应商表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSupplier:remove')") + @Log(title = "公司供应商表", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emisSupplierService.deleteEmisSupplierByIds(ids)); + } +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSupplier.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSupplier.java new file mode 100644 index 000000000..8b872c666 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSupplier.java @@ -0,0 +1,79 @@ +/** + * @Project: emis + * @Title: EmisSupplier.java + * @author linfso + * @date 2025-01-16 02:48:51 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

公司供应商表 实体类

+ */ + +package com.xdadan.erp.emis.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.xdadan.erp.common.annotation.Excel; +import com.xdadan.erp.common.core.domain.BaseEntity; +import com.xdadan.erp.common.core.domain.TreeEntity; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + + +/** + * @ClassName EmisSupplier + * @Description 公司供应商表 + * @author linfso + * @date 2025-01-16 02:48:51 + */ + @Data +public class EmisSupplier extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /* id */ + private Long id; + /* 供应商编码 */ + private String code; + /* 供应商名称 */ + private String name; + /* 英文简称 */ + private String nameEn; + /* 结算类型 : 1-现金 2-月结 */ + private String settledType; + /* 运输方式 */ + private String transType; + /* 业务网点 */ + private String bizSite; + /* 业务网点名称,逗号隔开 */ + private String bizSiteName; + /* 公司名称 */ + private String companyName; + /* 公司类型 */ + private String companyType; + /* 营业执照号 */ + private String licenceNo; + /* 所在国 */ + private String country; + /* 所在省 */ + private String province; + /* 所在市 */ + private String city; + /* 所在区 */ + private String district; + /* 地址 */ + private String address; + /* 公司电话 */ + private String tel; + /* 电子邮件 */ + private String email; + /* 联系人 */ + private String contact; + /* 联系电话 */ + private String phone; + /* 状态 */ + private Integer status; + +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSupplierMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSupplierMapper.java new file mode 100644 index 000000000..e6d7ff162 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSupplierMapper.java @@ -0,0 +1,80 @@ +/** + * @Project: emis + * @Title: EmisSupplierMapper.java + * @author linfso + * @date 2025-01-16 02:48:51 + * @Copyright: ShangHai Doitinfo 2022 All rights reserved. + * @version v1.0 + * @Description:

公司供应商表 Mapper 接口

+ * Warning : This file is generate by ai tools,don't edit!!! + */ +package com.xdadan.erp.emis.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xdadan.erp.emis.domain.EmisSupplier; +/** + * @ClassName EmisSupplierMapper + * @Description

公司供应商表 Mapper 接口

+ * @author linfso + * @date 2025-01-16 02:48:51 + */ +public interface EmisSupplierMapper extends BaseMapper +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisSupplier selectEmisSupplierById(Long id); + + /** + * 查询列表 + * + * @param emisSupplier + * @return 集合 + */ + public List selectEmisSupplierList(EmisSupplier emisSupplier); + + + /** + * 检查是否重复 + * + * @param emisSupplier + * @return 数量 + */ + public int checkUnique(EmisSupplier emisSupplier); + + + /** + * 新增 + * + * @param emisSupplier + * @return + */ + public int insertEmisSupplier(EmisSupplier emisSupplier); + + /** + * 修改 + * + * @param emisSupplier + * @return + */ + public int updateEmisSupplier(EmisSupplier emisSupplier); + + /** + * 删除 + * + * @param id 主键 + * @return 结果 + */ + public int deleteEmisSupplierById(Long id); + + /** + * 批量删除 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmisSupplierByIds(Long[] ids); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSupplierService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSupplierService.java new file mode 100644 index 000000000..e71d36f2f --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSupplierService.java @@ -0,0 +1,78 @@ + /** + * @Project: emis + * @Title: EmisSupplierService.java + * @author linfso + * @date 2025-01-16 02:48:51 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

公司供应商表 服务类接口

+ */ +package com.xdadan.erp.emis.service; + +import java.util.List; +import com.xdadan.erp.emis.domain.EmisSupplier; + +/** + * @ClassName EmisSupplierService + * @Description 公司供应商表 + * @author linfso + * @date 2025-01-16 02:48:51 + */ +public interface IEmisSupplierService +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisSupplier selectEmisSupplierById(Long id); + + /** + * 查询公司供应商表列表 + * + * @param emisSupplier 公司供应商表 + * @return 公司供应商表集合 + */ + public List selectEmisSupplierList(EmisSupplier emisSupplier); + + + /** + * 检查是否重复 + * + * @param emisSupplier + * @return 数量 + */ + public int checkUnique(EmisSupplier emisSupplier); + + /** + * 新增公司供应商表 + * + * @param emisSupplier 公司供应商表 + * @return 结果 + */ + public int insertEmisSupplier(EmisSupplier emisSupplier); + + /** + * 修改公司供应商表 + * + * @param emisSupplier 公司供应商表 + * @return 结果 + */ + public int updateEmisSupplier(EmisSupplier emisSupplier); + + /** + * 批量删除公司供应商表 + * + * @param ids 需要删除的公司供应商表主键集合 + * @return 结果 + */ + public int deleteEmisSupplierByIds(Long[] ids); + + /** + * 删除公司供应商表信息 + * + * @param id 公司供应商表主键 + * @return 结果 + */ + public int deleteEmisSupplierById(Long id); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSupplierServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSupplierServiceImpl.java new file mode 100644 index 000000000..0200bbe12 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSupplierServiceImpl.java @@ -0,0 +1,117 @@ + /** + * @Project: emis + * @Title: EmisSupplierServiceImpl.java + * @author linfso + * @date 2025-01-16 02:48:51 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

公司供应商表 实体类

+ */ + +package com.xdadan.erp.emis.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xdadan.erp.emis.domain.EmisSupplier; +import com.xdadan.erp.emis.mapper.EmisSupplierMapper; +import com.xdadan.erp.emis.service.IEmisSupplierService; + +/** + * 公司供应商表Service业务层处理 + * + * @author linfso + * @date 2025-01-16 02:48:51 + */ +@Service +public class EmisSupplierServiceImpl implements IEmisSupplierService +{ + @Autowired + private EmisSupplierMapper emisSupplierMapper; + + /** + * 查询公司供应商表 + * + * @param id 公司供应商表主键 + * @return 公司供应商表 + */ + @Override + public EmisSupplier selectEmisSupplierById(Long id) + { + return emisSupplierMapper.selectEmisSupplierById(id); + } + + + /** + * 查询公司供应商表列表 + * + * @param emisSupplier 公司供应商表 + * @return 公司供应商表 + */ + @Override + public List selectEmisSupplierList(EmisSupplier emisSupplier) + { + return emisSupplierMapper.selectEmisSupplierList(emisSupplier); + } + + /** + * 检查是否重复 + * + * @param emisSupplier + * @return 数量 + */ + @Override + public int checkUnique(EmisSupplier emisSupplier) + { + return emisSupplierMapper.checkUnique(emisSupplier); + } + + /** + * 新增公司供应商表 + * + * @param emisSupplier 公司供应商表 + * @return 结果 + */ + @Override + public int insertEmisSupplier(EmisSupplier emisSupplier) + { + return emisSupplierMapper.insertEmisSupplier(emisSupplier); + } + + /** + * 修改公司供应商表 + * + * @param emisSupplier 公司供应商表 + * @return 结果 + */ + @Override + public int updateEmisSupplier(EmisSupplier emisSupplier) + { + return emisSupplierMapper.updateEmisSupplier(emisSupplier); + } + + /** + * 批量删除公司供应商表 + * + * @param ids 需要删除的公司供应商表主键 + * @return 结果 + */ + @Override + public int deleteEmisSupplierByIds(Long[] ids) + { + return emisSupplierMapper.deleteEmisSupplierByIds(ids); + } + + /** + * 删除公司供应商表信息 + * + * @param id 公司供应商表主键 + * @return 结果 + */ + @Override + public int deleteEmisSupplierById(Long id) + { + return emisSupplierMapper.deleteEmisSupplierById(id); + } + +} diff --git a/emis-biz/src/main/resources/mapper/EmisSupplierMapper.xml b/emis-biz/src/main/resources/mapper/EmisSupplierMapper.xml new file mode 100644 index 000000000..067e98472 --- /dev/null +++ b/emis-biz/src/main/resources/mapper/EmisSupplierMapper.xml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, code, name, name_en, settled_type, trans_type, biz_site, biz_site_name, company_name, company_type, licence_no, country, province, city, district, address, tel, email, contact, phone, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_supplier + + + + + + + + + + insert into emis_supplier + + id, + code, + name, + name_en, + settled_type, + trans_type, + biz_site, + biz_site_name, + company_name, + company_type, + licence_no, + country, + province, + city, + district, + address, + tel, + email, + contact, + phone, + status, + remark, + del_flag, + create_by, + create_time, + update_by, + update_time, + create_site, + update_site, + + + #{id}, + #{code}, + #{name}, + #{nameEn}, + #{settledType}, + #{transType}, + #{bizSite}, + #{bizSiteName}, + #{companyName}, + #{companyType}, + #{licenceNo}, + #{country}, + #{province}, + #{city}, + #{district}, + #{address}, + #{tel}, + #{email}, + #{contact}, + #{phone}, + #{status}, + #{remark}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{createSite}, + #{updateSite}, + + + + + update emis_supplier + + code = #{code}, + name = #{name}, + name_en = #{nameEn}, + settled_type = #{settledType}, + trans_type = #{transType}, + biz_site = #{bizSite}, + biz_site_name = #{bizSiteName}, + company_name = #{companyName}, + company_type = #{companyType}, + licence_no = #{licenceNo}, + country = #{country}, + province = #{province}, + city = #{city}, + district = #{district}, + address = #{address}, + tel = #{tel}, + email = #{email}, + contact = #{contact}, + phone = #{phone}, + status = #{status}, + remark = #{remark}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_site = #{createSite}, + update_site = #{updateSite}, + + where id = #{id} + + + + delete from emis_supplier where id = #{id} + + + + delete from emis_supplier where id in + + #{id} + + + \ No newline at end of file