Browse Source

[feat]销售管理:

客户资料
新增录入时间字段createTime
修改前端录入时间回显问题
新增前端列表数据的展示根据创建时间进行降序排序
dev
liuxiaoxu 5 months ago
parent
commit
38a18c99f7
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  3. 11
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  4. 2
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html

2
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -178,7 +178,7 @@ public class SysCustomerController extends BaseController
sysCustomerOper.setOper("新建"); sysCustomerOper.setOper("新建");
sysCustomerOper.setOperPeople(operPeople); sysCustomerOper.setOperPeople(operPeople);
sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus()); sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus());
sysCustomerOper.setCreateTime(DateUtils.getNowDate()); sysCustomerOper.setCreateTime(new Date());
//根据是否有流程实例,判断是否新增成功 //根据是否有流程实例,判断是否新增成功
ProcessInstance processInstance = sysCustomerService.submitApply(sysCustomer); ProcessInstance processInstance = sysCustomerService.submitApply(sysCustomer);
if(processInstance != null){ if(processInstance != null){

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

@ -730,6 +730,7 @@ public class SysCustomer extends BaseEntity
.append("useStatus",getUseStatus()) .append("useStatus",getUseStatus())
.append("customerId",getCustomerId()) .append("customerId",getCustomerId())
.append("customerName",getCustomerName()) .append("customerName",getCustomerName())
.append("createTime", getCreateTime())
.toString(); .toString();
} }
} }

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

@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyTitle" column="apply_title" /> <result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" /> <result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" /> <result property="applyTime" column="apply_time" />
<result property="createTime" column="create_time" />
</resultMap> </resultMap>
<sql id="selectSysCustomerVo"> <sql id="selectSysCustomerVo">
select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser , select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser ,
@ -68,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax, customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone, 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,
identifying_people,first_add_time,update_info_time,audit_status,use_status,update_by, identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by,
apply_user,apply_time from sys_customer apply_user,apply_time from sys_customer
</sql> </sql>
@ -80,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax, customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone, 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,
identifying_people,first_add_time,update_info_time,audit_status,use_status from identifying_people,first_add_time,update_info_time,audit_status,use_status, create_time from
sys_customer sys_customer
<where> <where>
and use_status = '1' and use_status = '1' and use_status = '1' and use_status = '1'
@ -95,7 +96,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.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.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.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.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user, s.apply_time ,s.create_time
from sys_customer as s from sys_customer as s
left join( left join(
select dict_value,dict_label from sys_dict_data where dict_type = 'processType' select dict_value,dict_label from sys_dict_data where dict_type = 'processType'
@ -114,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if> <if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if>
</where> </where>
order by s.first_add_time desc order by s.create_time desc
</select> </select>
<select id="selectSysCustomerWithComplaintNotice" resultMap="SysCustomerResult"> <select id="selectSysCustomerWithComplaintNotice" resultMap="SysCustomerResult">
@ -201,6 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null">apply_time,</if> <if test="applyTime != null">apply_time,</if>
<if test="useStatus != null">use_status,</if> <if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if> <if test="auditStatus != null">audit_status,</if>
<if test="createTime != null">create_time</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if> <if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if>
@ -252,6 +254,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null">#{applyTime},</if> <if test="applyTime != null">#{applyTime},</if>
<if test="useStatus != null"> #{useStatus},</if> <if test="useStatus != null"> #{useStatus},</if>
<if test="auditStatus != null"> #{auditStatus},</if> <if test="auditStatus != null"> #{auditStatus},</if>
<if test="createTime != null"> #{createTime} </if>
</trim> </trim>
</insert> </insert>

2
ruoyi-admin/src/main/resources/templates/system/customer/customer.html

@ -501,7 +501,7 @@
{title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false}, {title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false},
{title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false}, {title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false},
{title: '客户标识',field:'customerSign'}, {title: '客户标识',field:'customerSign'},
{title: '录入时间',field: 'firstAddTime', {title: '录入时间',field: 'createTime',
formatter: function (value, row, index) { formatter: function (value, row, index) {
if (value == null) {return " ";} else { return value;} if (value == null) {return " ";} else { return value;}
} }

Loading…
Cancel
Save