Browse Source

[feat]

销售管理 客户资料 客户基本信息
修改客户基本信息实体类,添加rmb、美元标识字段和多选框接收列表属性;
修改mapper查询、插入、更新方法,新增rmb、美元标识字段;
修改service接口,新增时根据复选框传值设置币种标识;
dev
王晓迪 4 months ago
parent
commit
2bec1c0cf1
  1. 29
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  2. 18
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  3. 18
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

29
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java

@ -169,6 +169,35 @@ public class SysCustomer extends BaseEntity
@Excel(name = "客户标识 0表示潜在客户(仅报价) 1表示 客户(已下单)")
private String customerSign;
private List<String> currency;
private String rmbFlag;
private String usdFlag;
public List<String> getCurrency() {
return currency;
}
public void setCurrency(List<String> currency) {
this.currency = currency;
}
public String getRmbFlag() {
return rmbFlag;
}
public void setRmbFlag(String rmbFlag) {
this.rmbFlag = rmbFlag;
}
public String getUsdFlag() {
return usdFlag;
}
public void setUsdFlag(String usdFlag) {
this.usdFlag = usdFlag;
}
/** 流程实例ID */
private String instanceId;

18
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -161,6 +161,13 @@ public class SysCustomerServiceImpl implements ISysCustomerService
sysCustomer.setCreateBy(loginName);
sysCustomer.setCreateTime(DateUtils.getNowDate());
SysContacts sysContacts = new SysContacts();
List<String> currency = sysCustomer.getCurrency();
if(currency.contains("1")){
sysCustomer.setRmbFlag("1");
}
if(currency.contains("2")){
sysCustomer.setUsdFlag("1");
}
//添加联系人
// sysContacts.setCustomerName(sysCustomer.getCustomerContact());
// sysContacts.setCellPhone(sysCustomer.getContactNumber());
@ -208,6 +215,17 @@ public class SysCustomerServiceImpl implements ISysCustomerService
String loginName = ShiroUtils.getLoginName();
sysCustomerVo.setUpdateBy(loginName);
sysCustomerVo.setUpdateTime(DateUtils.getNowDate());
// List<String> currency = sysCustomerVo.getCurrency();
// if(currency.contains("1")){
// sysCustomerVo.setRmbFlag("1");
// }else {
// sysCustomerVo.setRmbFlag("0");
// }
// if(currency.contains("2")){
// sysCustomerVo.setUsdFlag("1");
// }else {
// sysCustomerVo.setUsdFlag("0");
// }
return sysCustomerMapper.updateSysCustomer(sysCustomerVo);
}

18
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -60,6 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="createTime" column="create_time" />
<result property="rmbFlag" column="rmb_flag" />
<result property="usdFlag" column="usd_flag" />
</resultMap>
<sql id="selectSysCustomerVo">
select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser ,
@ -69,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by,rmb_flag,usd_flag,
apply_user,apply_time , instance_id , instance_type from sys_customer
</sql>
@ -80,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
common_currency,confirm_tax,tax_rate,integrity_rating,rmb_registered_capital,registered_capital,payment_terms,customs_code,
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,rmb_flag,usd_flag,
identifying_people,first_add_time,update_info_time,audit_status,use_status, create_time from
sys_customer
<where>
@ -98,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.customer_fax,s.delivery_address_id,s.delivery_customer_person,s.delivery_customer_phone,s.delivery_address,
s.delivery_customer_postal,s.delivery_customer_fax,s.business_members,s.identifying_people,s.first_add_time,
s.update_info_time,s.audit_status,s.use_status,s.update_by,s.instance_id, s.instance_type,p.dict_value as instance_type_name,
s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user, s.apply_time ,s.create_time
s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user, s.apply_time ,s.create_time,s.rmb_flag,s.usd_flag
from sys_customer as s
left join(
select dict_value,dict_label from sys_dict_data where dict_type = 'processType'
@ -205,7 +207,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null">apply_time,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="createTime != null">create_time</if>
<if test="createTime != null">create_time,</if>
<if test="rmbFlag != null">rmb_flag,</if>
<if test="usdFlag != null">usd_flag</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if>
@ -257,7 +261,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null">#{applyTime},</if>
<if test="useStatus != null"> #{useStatus},</if>
<if test="auditStatus != null"> #{auditStatus},</if>
<if test="createTime != null"> #{createTime} </if>
<if test="createTime != null"> #{createTime},</if>
<if test="rmbFlag != null"> #{rmbFlag},</if>
<if test="usdFlag != null"> #{usdFlag} </if>
</trim>
</insert>
@ -315,6 +321,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="rmbFlag != null">rmb_flag = #{rmbFlag},</if>
<if test="usdFlag != null">usd_flag = #{usdFlag} </if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save