md
This commit is contained in:
parent
a69fc7bc4f
commit
c44987dc8a
@ -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: <p> 公司供应商表 控制器 </p>
|
||||
*/
|
||||
|
||||
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<EmisSupplier> 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<EmisSupplier> list = emisSupplierService.selectEmisSupplierList(emisSupplier);
|
||||
ExcelUtil<EmisSupplier> util = new ExcelUtil<EmisSupplier>(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));
|
||||
}
|
||||
}
|
||||
@ -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: <p> 公司供应商表 实体类 </p>
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
@ -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: <p> 公司供应商表 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
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 <p> 公司供应商表 Mapper 接口 </p>
|
||||
* @author linfso
|
||||
* @date 2025-01-16 02:48:51
|
||||
*/
|
||||
public interface EmisSupplierMapper extends BaseMapper<EmisSupplier>
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisSupplier selectEmisSupplierById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisSupplier
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisSupplier> 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);
|
||||
}
|
||||
@ -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: <p> 公司供应商表 服务类接口 </p>
|
||||
*/
|
||||
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<EmisSupplier> 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);
|
||||
}
|
||||
@ -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: <p> 公司供应商表 实体类 </p>
|
||||
*/
|
||||
|
||||
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<EmisSupplier> 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);
|
||||
}
|
||||
|
||||
}
|
||||
224
emis-biz/src/main/resources/mapper/EmisSupplierMapper.xml
Normal file
224
emis-biz/src/main/resources/mapper/EmisSupplierMapper.xml
Normal file
@ -0,0 +1,224 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisSupplierMapper">
|
||||
|
||||
<resultMap type="EmisSupplier" id="EmisSupplierResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="nameEn" column="name_en" />
|
||||
<result property="settledType" column="settled_type" />
|
||||
<result property="transType" column="trans_type" />
|
||||
<result property="bizSite" column="biz_site" />
|
||||
<result property="bizSiteName" column="biz_site_name" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="companyType" column="company_type" />
|
||||
<result property="licenceNo" column="licence_no" />
|
||||
<result property="country" column="country" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="district" column="district" />
|
||||
<result property="address" column="address" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="email" column="email" />
|
||||
<result property="contact" column="contact" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisSupplierVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisSupplierList" parameterType="EmisSupplier" resultMap="EmisSupplierResult">
|
||||
<include refid="selectEmisSupplierVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="nameEn != null and nameEn != ''"> and name_en like concat('%', #{nameEn}, '%')</if>
|
||||
<if test="settledType != null and settledType != ''"> and settled_type like concat('%', #{settledType}, '%')</if>
|
||||
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
|
||||
<if test="bizSite != null and bizSite != ''"> and biz_site like concat('%', #{bizSite}, '%')</if>
|
||||
<if test="bizSiteName != null and bizSiteName != ''"> and biz_site_name like concat('%', #{bizSiteName}, '%')</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="companyType != null and companyType != ''"> and company_type like concat('%', #{companyType}, '%')</if>
|
||||
<if test="licenceNo != null and licenceNo != ''"> and licence_no like concat('%', #{licenceNo}, '%')</if>
|
||||
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||||
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
|
||||
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||||
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||||
<if test="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</if>
|
||||
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
|
||||
<if test="contact != null and contact != ''"> and contact like concat('%', #{contact}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisSupplier" resultType="int">
|
||||
select count(1) from emis_supplier
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and code = #{code}
|
||||
and name = #{name}
|
||||
and name_en = #{nameEn}
|
||||
and settled_type = #{settledType}
|
||||
and trans_type = #{transType}
|
||||
and biz_site = #{bizSite}
|
||||
and biz_site_name = #{bizSiteName}
|
||||
and company_name = #{companyName}
|
||||
and company_type = #{companyType}
|
||||
and licence_no = #{licenceNo}
|
||||
and country = #{country}
|
||||
and province = #{province}
|
||||
and city = #{city}
|
||||
and district = #{district}
|
||||
and address = #{address}
|
||||
and tel = #{tel}
|
||||
and email = #{email}
|
||||
and contact = #{contact}
|
||||
and phone = #{phone}
|
||||
and status = #{status}
|
||||
and remark = #{remark}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisSupplierById" parameterType="Long" resultMap="EmisSupplierResult">
|
||||
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 a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisSupplier" parameterType="EmisSupplier" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_supplier
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="nameEn != null and nameEn != ''">name_en,</if>
|
||||
<if test="settledType != null and settledType != ''">settled_type,</if>
|
||||
<if test="transType != null and transType != ''">trans_type,</if>
|
||||
<if test="bizSite != null and bizSite != ''">biz_site,</if>
|
||||
<if test="bizSiteName != null and bizSiteName != ''">biz_site_name,</if>
|
||||
<if test="companyName != null and companyName != ''">company_name,</if>
|
||||
<if test="companyType != null and companyType != ''">company_type,</if>
|
||||
<if test="licenceNo != null and licenceNo != ''">licence_no,</if>
|
||||
<if test="country != null and country != ''">country,</if>
|
||||
<if test="province != null and province != ''">province,</if>
|
||||
<if test="city != null and city != ''">city,</if>
|
||||
<if test="district != null and district != ''">district,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="tel != null and tel != ''">tel,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="contact != null and contact != ''">contact,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="nameEn != null and nameEn != ''">#{nameEn},</if>
|
||||
<if test="settledType != null and settledType != ''">#{settledType},</if>
|
||||
<if test="transType != null and transType != ''">#{transType},</if>
|
||||
<if test="bizSite != null and bizSite != ''">#{bizSite},</if>
|
||||
<if test="bizSiteName != null and bizSiteName != ''">#{bizSiteName},</if>
|
||||
<if test="companyName != null and companyName != ''">#{companyName},</if>
|
||||
<if test="companyType != null and companyType != ''">#{companyType},</if>
|
||||
<if test="licenceNo != null and licenceNo != ''">#{licenceNo},</if>
|
||||
<if test="country != null and country != ''">#{country},</if>
|
||||
<if test="province != null and province != ''">#{province},</if>
|
||||
<if test="city != null and city != ''">#{city},</if>
|
||||
<if test="district != null and district != ''">#{district},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="tel != null and tel != ''">#{tel},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="contact != null and contact != ''">#{contact},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisSupplier" parameterType="EmisSupplier">
|
||||
update emis_supplier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
||||
<if test="settledType != null and settledType != ''">settled_type = #{settledType},</if>
|
||||
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
|
||||
<if test="bizSite != null and bizSite != ''">biz_site = #{bizSite},</if>
|
||||
<if test="bizSiteName != null and bizSiteName != ''">biz_site_name = #{bizSiteName},</if>
|
||||
<if test="companyName != null and companyName != ''">company_name = #{companyName},</if>
|
||||
<if test="companyType != null and companyType != ''">company_type = #{companyType},</if>
|
||||
<if test="licenceNo != null and licenceNo != ''">licence_no = #{licenceNo},</if>
|
||||
<if test="country != null and country != ''">country = #{country},</if>
|
||||
<if test="province != null and province != ''">province = #{province},</if>
|
||||
<if test="city != null and city != ''">city = #{city},</if>
|
||||
<if test="district != null and district != ''">district = #{district},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="tel != null and tel != ''">tel = #{tel},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="contact != null and contact != ''">contact = #{contact},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisSupplierById" parameterType="Long">
|
||||
delete from emis_supplier where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisSupplierByIds" parameterType="String">
|
||||
delete from emis_supplier where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user