客户维护增加过保时间

This commit is contained in:
sk1551 2021-03-04 16:34:40 +08:00
parent 56f9776253
commit 5d0d6e01f8
4 changed files with 41 additions and 3 deletions

View File

@ -143,6 +143,8 @@
:formatter="userFormat"
/>
<el-table-column label="录入时间" align="center" prop="createTime" />
<el-table-column label="过保时间" align="center" prop="gbtime" />
<el-table-column label="转换跟进" align="center" prop="zhgj" />
<el-table-column
label="操作"
align="center"
@ -380,6 +382,7 @@ export default {
state: undefined,
xfxm: undefined,
xfjz: undefined,
gbtime: undefined,
},
//
form: {},
@ -509,6 +512,7 @@ export default {
xfjz: undefined,
createTime: undefined,
createTime: undefined,
gbtime: undefined,
};
this.diglogForm.province = "";
this.diglogForm.city = "";

View File

@ -1,5 +1,7 @@
package com.ruoyi.project.benyi.controller;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -74,8 +76,18 @@ public class ByCustomerController extends BaseController {
@Log(title = "本一-客户关系管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
// 这里没写完 须将SimpleDateFormat转换为Date类型
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DATE, 15);
df.format(calendar.getTime());
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byCustomer.setCreateTime(new Date());
byCustomer.setCreateTime(date);
byCustomer.setGbtime(date);
// 判断电话号码是否存在
ByCustomer byCustomer1 = new ByCustomer();
byCustomer1.setLxdh(byCustomer.getLxdh());

View File

@ -131,12 +131,19 @@ public class ByCustomer extends BaseEntity {
private String xfxm;
/**
* 创建时间
* 创建时间gbtime
*/
@Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/**
* 过保时间
*/
@Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date gbtime;
/**
* 消费价值
*/
@ -327,6 +334,7 @@ public class ByCustomer extends BaseEntity {
.append("xfxm", getXfxm())
.append("xfjz", getXfjz())
.append("createTime", getCreateTime())
.append("gbtime", getGbtime())
.toString();
}
@ -338,4 +346,12 @@ public class ByCustomer extends BaseEntity {
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getGbtime() {
return gbtime;
}
public void setGbtime(Date gbtime) {
this.gbtime = gbtime;
}
}

View File

@ -26,10 +26,11 @@
<result property="xfxm" column="xfxm"/>
<result property="xfjz" column="xfjz"/>
<result property="createTime" column="create_time"/>
<result property="gbtime" column="gbtime"/>
</resultMap>
<sql id="selectByCustomerVo">
select id, name, sflx, lxdh, wx, dy, qt, schoolname, rs, sheng, shengid, shi, shiid, khly, create_userid, bz, zhgj, state, xfxm, xfjz, create_time from by_customer
select id, name, sflx, lxdh, wx, dy, qt, schoolname, rs, sheng, shengid, shi, shiid, khly, create_userid, bz, zhgj, state, xfxm, xfjz, gbtime, create_time from by_customer
</sql>
<select id="selectByCustomerList" parameterType="ByCustomer" resultMap="ByCustomerResult">
@ -54,6 +55,8 @@
<if test="state != null and state != ''">and state = #{state}</if>
<if test="xfxm != null and xfxm != ''">and xfxm = #{xfxm}</if>
<if test="xfjz != null and xfjz != ''">and xfjz = #{xfjz}</if>
<if test="gbtime != null and gbtime != ''">and gbtime = #{gbtime}</if>
<if test="createTime != null ">and create_time = #{createTime}</if>
</where>
</select>
@ -86,6 +89,7 @@
<if test="xfxm != null and xfxm != ''">xfxm,</if>
<if test="xfjz != null and xfjz != ''">xfjz,</if>
<if test="createTime != null ">create_time,</if>
<if test="gbtime != null ">gbtime,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null ">#{id},</if>
@ -109,6 +113,7 @@
<if test="xfxm != null and xfxm != ''">#{xfxm},</if>
<if test="xfjz != null and xfjz != ''">#{xfjz},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="gbtime != null ">#{gbtime},</if>
</trim>
</insert>
@ -135,6 +140,7 @@
<if test="xfxm != null and xfxm != ''">xfxm = #{xfxm},</if>
<if test="xfjz != null and xfjz != ''">xfjz = #{xfjz},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="gbtime != null ">gbtime = #{gbtime},</if>
</trim>
where id = #{id}
</update>