Browse Source

[fix] 销售管理

修复客户资料其他地址信息原录入时间和修改时间导致的时间不对问题:去掉客户资料其他地址信息数据库表的原录入时间和修改时间字段,新增录入人、录入时间、修改人、修改时间字段;实体类去掉原字段、新增这四个字段;插入和修改接口新增这四个字段
dev
liuxiaoxu 3 months ago
parent
commit
ee60824d27
  1. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysShippingAddress.java
  2. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysShippingAddressServiceImpl.java
  3. 19
      ruoyi-admin/src/main/resources/mapper/system/SysShippingAddressMapper.xml
  4. 10
      ruoyi-admin/src/main/resources/templates/system/shippingaddress/shippingaddress.html

21
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysShippingAddress.java

@ -58,9 +58,8 @@ public class SysShippingAddress extends BaseEntity
@Excel(name = "传真")
private String customerFax;
private String firstAddTime;
private String updateInfoTime;
public void setDeliveryId(Long deliveryId)
{
this.deliveryId = deliveryId;
@ -161,21 +160,9 @@ public class SysShippingAddress extends BaseEntity
return customerFax;
}
public String getFirstAddTime() {
return firstAddTime;
}
public void setFirstAddTime(String firstAddTime) {
this.firstAddTime = firstAddTime;
}
public String getUpdateInfoTime() {
return updateInfoTime;
}
public void setUpdateInfoTime(String updateInfoTime) {
this.updateInfoTime = updateInfoTime;
}
@Override
public String toString() {
@ -191,8 +178,10 @@ public class SysShippingAddress extends BaseEntity
.append("plantArea", getPlantArea())
.append("postalCode", getPostalCode())
.append("customerFax", getCustomerFax())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysShippingAddressServiceImpl.java

@ -9,6 +9,7 @@ import com.ruoyi.system.service.ISysShippingAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
@ -58,7 +59,7 @@ public class SysShippingAddressServiceImpl implements ISysShippingAddressService
{
String loginName = ShiroUtils.getLoginName();
sysShippingAddress.setCreateBy(loginName);
sysShippingAddress.setCreateTime(DateUtils.getNowDate());
sysShippingAddress.setCreateTime(new Date());
int id = sysShippingAddressMapper.insertSysShippingAddress(sysShippingAddress);
sysShippingAddress.getDeliveryId();
return id;
@ -74,7 +75,7 @@ public class SysShippingAddressServiceImpl implements ISysShippingAddressService
public int updateSysShippingAddress(SysShippingAddress sysShippingAddress)
{
sysShippingAddress.setUpdateBy(ShiroUtils.getLoginName());
sysShippingAddress.setUpdateTime(DateUtils.getNowDate());
sysShippingAddress.setUpdateTime(new Date());
return sysShippingAddressMapper.updateSysShippingAddress(sysShippingAddress);
}

19
ruoyi-admin/src/main/resources/mapper/system/SysShippingAddressMapper.xml

@ -16,12 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="plantArea" column="plant_area" />
<result property="postalCode" column="postal_code" />
<result property="customerFax" column="customer_fax" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSysShippingAddressVo">
select delivery_id, enterprise_code, enterprise_name, customer_phone, customer_name, delivery_address, customer_name_two, detailed_description, plant_area, postal_code, customer_fax, first_add_time, update_info_time from sys_shipping_address
select delivery_id, enterprise_code, enterprise_name, customer_phone, customer_name, delivery_address, customer_name_two, detailed_description, plant_area, postal_code, customer_fax, create_by, create_time, update_by, update_time from sys_shipping_address
</sql>
<select id="selectSysShippingAddressList" parameterType="SysShippingAddress" resultMap="SysShippingAddressResult">
@ -56,7 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="plantArea != null">plant_area,</if>
<if test="postalCode != null">postal_code,</if>
<if test="customerFax != null">customer_fax,</if>
first_add_time,
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode != null">#{enterpriseCode},</if>
@ -69,7 +73,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="plantArea != null">#{plantArea},</if>
<if test="postalCode != null">#{postalCode},</if>
<if test="customerFax != null">#{customerFax},</if>
now(),
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@ -86,7 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="plantArea != null">plant_area = #{plantArea},</if>
<if test="postalCode != null">postal_code = #{postalCode},</if>
<if test="customerFax != null">customer_fax = #{customerFax},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where delivery_id = #{deliveryId}
</update>

10
ruoyi-admin/src/main/resources/templates/system/shippingaddress/shippingaddress.html

@ -81,12 +81,10 @@
{title: '厂区',field: 'plantArea'},
{title: '邮编',field: 'postalCode'},
{title: '传真',field: 'customerFax'},
{title: '录入时间',field: 'firstAddTime',
formatter: function (value, row, index) {if (value == null) {return " ";}else {return value;}}
},
{title: '上次修改时间',field: 'updateInfoTime',
formatter: function (value, row, index) {if (value == null) {return " ";} else {var vArr = value.split(','); return vArr[0];}}
},
{title: '录入时间',field: 'createTime'},
{title: '更新时间',field: 'updateTime'},
{title: '创建人',field: 'createBy'},
{title: '更新人',field: 'updateBy'},
{
title: '操作',
align: 'center',

Loading…
Cancel
Save