客户信息 供应商信息 修改 提交 编码无重复校验修改 导出内容修改 页面显示内容修改

This commit is contained in:
liuhanqing
2025-10-17 14:23:04 +08:00
parent 37e5363253
commit 41d73152d6
8 changed files with 142 additions and 63 deletions

View File

@@ -23,7 +23,7 @@ public class BasCustomer extends BaseEntity
private String customerNo;
/** 客户基本分类 */
@Excel(name = "客户基本分类")
// @Excel(name = "客户基本分类")
private String customerGroupNo;
/** 客户名称 */
@@ -38,62 +38,86 @@ public class BasCustomer extends BaseEntity
@Excel(name = "是否可用",dictType = "is_available")
private String useable;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 业务部门 */
@Excel(name = "业务部门")
//@Excel(name = "业务部门")
private String businessDepartment;
/** 业务员 */
@Excel(name = "业务员")
//@Excel(name = "业务员")
private String salesman;
/** 助忆码 */
@Excel(name = "助忆码")
//@Excel(name = "助忆码")
private String mnemonicCode;
/** 客户类型 */
@Excel(name = "客户类型")
//@Excel(name = "客户类型")
private String type;
/** 纳税人登记号 */
@Excel(name = "纳税人登记号")
//@Excel(name = "纳税人登记号")
private String taxpayerRegistrationNumber;
/** 对应财务组织 */
@Excel(name = "对应财务组织")
//@Excel(name = "对应财务组织")
private String organization;
/** 上级客户 */
@Excel(name = "上级客户")
//@Excel(name = "上级客户")
private String supCustomer;
/** 散户 */
@Excel(name = "散户")
//@Excel(name = "散户")
private String retailInvestor;
/** 国家/地区 */
@Excel(name = "国家/地区")
//@Excel(name = "国家/地区")
private String country;
/** 时区 */
@Excel(name = "时区")
//@Excel(name = "时区")
private String timeZone;
/** 数据格式 */
@Excel(name = "数据格式")
//@Excel(name = "数据格式")
private String dataFormat;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
//@Excel(name = "联系人姓名")
private String contactName;
/** 发货国家 */
@Excel(name = "发货国家")
//@Excel(name = "发货国家")
private String shipment;
/** 税类 */
@Excel(name = "税类")
//@Excel(name = "税类")
private String taxCategory;
private String updateId;
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public String getUpdateId() {
return updateId;
}
public void setUpdateId(String updateId) {
this.updateId = updateId;
}
public void setId(String id)
{
this.id = id;

View File

@@ -1,5 +1,6 @@
package com.ruoyi.bas.BasCustomer.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
import com.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper;
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
@@ -53,6 +54,12 @@ public class BasCustomerServiceImpl implements IBasCustomerService
@Override
public int insertBasCustomer(BasCustomer basCustomer)
{
BasCustomer basCustomerParam = new BasCustomer();
basCustomerParam.setCustomerNo(basCustomer.getCustomerNo());
List<BasCustomer> basCustomers = basCustomerMapper.selectBasCustomerList(basCustomerParam);
if (CollUtil.isNotEmpty(basCustomers)){
throw new RuntimeException("客户编号已存在");
}
return basCustomerMapper.insertBasCustomer(basCustomer);
}
@@ -65,6 +72,13 @@ public class BasCustomerServiceImpl implements IBasCustomerService
@Override
public int updateBasCustomer(BasCustomer basCustomer)
{
BasCustomer basCustomerParam = new BasCustomer();
basCustomerParam.setCustomerNo(basCustomer.getCustomerNo());
basCustomerParam.setUpdateId(basCustomer.getId());
List<BasCustomer> basCustomers = basCustomerMapper.selectBasCustomerList(basCustomerParam);
if (CollUtil.isNotEmpty(basCustomers)){
throw new RuntimeException("客户编号已存在");
}
return basCustomerMapper.updateBasCustomer(basCustomer);
}

View File

@@ -23,7 +23,6 @@ public class BasSupplier extends BaseEntity
private String supplierNo;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierGroupNo;
/** 供应商名称 */
@@ -38,54 +37,79 @@ public class BasSupplier extends BaseEntity
@Excel(name = "是否可用",dictType = "is_available")
private String useable;
@Excel(name = "备注")
private String remark;
/** 地区分类 */
@Excel(name = "地区分类")
//@Excel(name = "地区分类")
private String supplierArae;
/** 纳税人登记号 */
@Excel(name = "纳税人登记号")
//@Excel(name = "纳税人登记号")
private String taxpayerRegistrationNumber;
/** 国家 */
@Excel(name = "国家")
//@Excel(name = "国家")
private String country;
/** 时区 */
@Excel(name = "时区")
//@Excel(name = "时区")
private String timeZone;
/** 数据格式 */
@Excel(name = "数据格式")
//@Excel(name = "数据格式")
private String dataFormat;
/** 收货国家 */
@Excel(name = "收货国家")
//@Excel(name = "收货国家")
private String receivingCountry;
/** 税类 */
@Excel(name = "税类")
//@Excel(name = "税类")
private String taxCategory;
/** 法人 */
@Excel(name = "法人")
//@Excel(name = "法人")
private String legalPerson;
/** 注册资金 */
@Excel(name = "注册资金")
//@Excel(name = "注册资金")
private String registeredCapital;
/** 企业地址 */
@Excel(name = "企业地址")
//@Excel(name = "企业地址")
private String address;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
//@Excel(name = "联系人姓名")
private String contactName;
/** 联系电话 */
@Excel(name = "联系电话")
//@Excel(name = "联系电话")
private String contactNumber;
private String updateId;
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public String getUpdateId() {
return updateId;
}
public void setUpdateId(String updateId) {
this.updateId = updateId;
}
public void setId(String id)
{
this.id = id;

View File

@@ -1,5 +1,6 @@
package com.ruoyi.bas.BasSupplier.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
import com.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper;
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
@@ -53,6 +54,12 @@ public class BasSupplierServiceImpl implements IBasSupplierService
@Override
public int insertBasSupplier(BasSupplier basSupplier)
{
BasSupplier basSupplierParam = new BasSupplier();
basSupplierParam.setSupplierNo(basSupplier.getSupplierNo());
List<BasSupplier> basSuppliers = basSupplierMapper.selectBasSupplierList(basSupplierParam);
if (CollUtil.isNotEmpty(basSuppliers)) {
throw new RuntimeException("供应商编码已存在");
}
return basSupplierMapper.insertBasSupplier(basSupplier);
}
@@ -65,6 +72,13 @@ public class BasSupplierServiceImpl implements IBasSupplierService
@Override
public int updateBasSupplier(BasSupplier basSupplier)
{
BasSupplier basSupplierParam = new BasSupplier();
basSupplierParam.setSupplierNo(basSupplier.getSupplierNo());
basSupplierParam.setUpdateId(basSupplier.getId());
List<BasSupplier> basSuppliers = basSupplierMapper.selectBasSupplierList(basSupplierParam);
if (CollUtil.isNotEmpty(basSuppliers)) {
throw new RuntimeException("供应商编码已存在");
}
return basSupplierMapper.updateBasSupplier(basSupplier);
}

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper">
<resultMap type="BasCustomer" id="BasCustomerResult">
<result property="id" column="id" />
<result property="customerNo" column="customer_no" />
@@ -34,8 +34,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasCustomerList" parameterType="BasCustomer" resultMap="BasCustomerResult">
<include refid="selectBasCustomerVo"/>
<where>
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
<where>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="customerGroupNo != null and customerGroupNo != ''"> and customer_group_no like concat('%', #{customerGroupNo}, '%')</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
@@ -54,9 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="shipment != null and shipment != ''"> and shipment like concat('%', #{shipment}, '%')</if>
<if test="taxCategory != null and taxCategory != ''"> and tax_category like concat('%', #{taxCategory}, '%')</if>
<if test="updateId != null and updateId != ''"> and id != #{updateId}</if>
</where>
</select>
<select id="selectBasCustomerById" parameterType="String" resultMap="BasCustomerResult">
<include refid="selectBasCustomerVo"/>
where id = #{id}
@@ -144,9 +145,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteBasCustomerByIds" parameterType="String">
delete from bas_customer where id in
delete from bas_customer where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper">
<resultMap type="BasSupplier" id="BasSupplierResult">
<result property="id" column="id" />
<result property="supplierNo" column="supplier_no" />
@@ -32,8 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasSupplierList" parameterType="BasSupplier" resultMap="BasSupplierResult">
<include refid="selectBasSupplierVo"/>
<where>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
<where>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="supplierGroupNo != null and supplierGroupNo != ''"> and supplier_group_no like concat('%', #{supplierGroupNo}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
@@ -50,9 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="contactNumber != null and contactNumber != ''"> and contact_number = like concat('%',#{contactNumber}, '%')</if>
<if test="updateId != null and updateId != ''"> and id != #{updateId} </if>
</where>
order by id desc
</select>
<select id="selectBasSupplierById" parameterType="String" resultMap="BasSupplierResult">
<include refid="selectBasSupplierVo"/>
where id = #{id}
@@ -134,9 +136,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteBasSupplierByIds" parameterType="String">
delete from bas_supplier where id in
delete from bas_supplier where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>