Commit cae32cdd by jianan

客户告知书4

parent cc8065f3
...@@ -3612,16 +3612,24 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3612,16 +3612,24 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
CommonResultIDResponseVO resp = new CommonResultIDResponseVO(); CommonResultIDResponseVO resp = new CommonResultIDResponseVO();
try { try {
// 先判断传入的客户姓名和客户电话与传入的customerId是否一致 // 先判断传入的客户姓名和客户电话与传入的customerId是否一致
AclCustomer aclCustomer = aclCustomerDALService.findById(requestVO.getCustomerId()); AclCustomer oldCustomer = aclCustomerDALService.findById(requestVO.getCustomerId());
String customerName = requestVO.getCustomerName(); String newName = requestVO.getCustomerName();
String customerMobile = requestVO.getCustomerMobile(); String newMobile = requestVO.getCustomerMobile();
if (!customerMobile.equals(aclCustomer.getMobileNo())) { if (!newMobile.equals(oldCustomer.getMobileNo())) {// 如果电话不一样,就更新商机的电话
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setCustomerMobile(newMobile);
mktLeadsAssignedsMapper.updateByPrimaryKeySelective(mktLeadsAssigneds);
}
if (!newName.equals(oldCustomer.getName())) {// 如果名字不一样,就更新商机的名字
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setCustomerName(newName);
mktLeadsAssignedsMapper.updateByPrimaryKeySelective(mktLeadsAssigneds);
} }
// 数据库实体 // 数据库实体
AclCustomer newerCustomer = aclCustomerDALService.findByMobileNo(newMobile);
AgPoInformed informed = new AgPoInformed(); AgPoInformed informed = new AgPoInformed();
BeanUtils.copyProperties(requestVO, informed); BeanUtils.copyProperties(requestVO, informed);
informed.setCustomerId(aclCustomer.getId()); informed.setCustomerId(newerCustomer.getId());
informed.setStatus("0"); informed.setStatus("0");
informed.setIsActive(1); informed.setIsActive(1);
...@@ -3637,7 +3645,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3637,7 +3645,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
// 商机更新一条告知书待签署的记录 // 商机更新一条告知书待签署的记录
MktLeadsAssignedTrack track = new MktLeadsAssignedTrack(); MktLeadsAssignedTrack track = new MktLeadsAssignedTrack();
track.setCustomerId(requestVO.getLeadsAssignedId()); track.setCustomerId(requestVO.getLeadsAssignedId());// 商机的id还是得用旧的customerId
track.setTrackTime(curDate); track.setTrackTime(curDate);
track.setCreatedBy(loginId); track.setCreatedBy(loginId);
track.setCreatedAt(new Date()); track.setCreatedAt(new Date());
...@@ -3645,20 +3653,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3645,20 +3653,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
track.setUpdatedBy(loginId); track.setUpdatedBy(loginId);
track.setUpdatorType(1); track.setUpdatorType(1);
track.setUpdatedAt(new Date()); track.setUpdatedAt(new Date());
MdDropOptions dropOption = systemConfigService.getDropOption("action_code", "customerNotice_0"); MdDropOptions dropOption = systemConfigService.getDropOption("bizchance_promotion_action", "customerNotice_0");
track.setMdDropOptionId(dropOption.getId()); track.setMdDropOptionId(dropOption.getId());
track.setTrackScore(dropOption.getDropOptionScore()); track.setTrackScore(dropOption.getDropOptionScore());
//保存 //保存
mktLeadsAssignedTrackDALService.saveTrack(track); mktLeadsAssignedTrackDALService.saveTrack(track);
// 如果名字不一样,就更新商机的名字
// if () {
// AclCustomer customer = aclCustomerDALService.findById(requestVO.getCustomerId());
// }
// MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
// mktLeadsAssigneds
// mktLeadsAssignedsMapper.updateByPrimaryKeySelective();
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
resp.setId(informed.getId()); resp.setId(informed.getId());
} catch (Exception e) { } catch (Exception e) {
...@@ -3742,17 +3742,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3742,17 +3742,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
informed.setStatus("1"); informed.setStatus("1");
informedMapper.updateByPrimaryKeySelective(informed); informedMapper.updateByPrimaryKeySelective(informed);
// 商机更新一条告知书签署的记录 // 商机更新一条告知书签署的记录
MktLeadsAssignedTrack track = new MktLeadsAssignedTrack(); MktLeadsAssignedTrack track = new MktLeadsAssignedTrack();
track.setCustomerId(informed.getLeadsId()); track.setInformedId(id);
track.setCustomerId(informed.getCustomerId());
track.setTrackTime(curDate); track.setTrackTime(curDate);
track.setCreatedBy(informed.getLeadsId()); track.setCreatedBy(-1L);
track.setCreatedAt(curDate); track.setCreatedAt(curDate);
track.setCreatorType(1); track.setCreatorType(1);
track.setUpdatedBy(informed.getLeadsId()); track.setUpdatedBy(-1L);
track.setUpdatorType(1); track.setUpdatorType(1);
track.setUpdatedAt(new Date()); track.setUpdatedAt(new Date());
MdDropOptions dropOption = systemConfigService.getDropOption("action_code", "customerNotice_1"); MdDropOptions dropOption = systemConfigService.getDropOption("bizchance_promotion_action", "customerNotice_1");
track.setMdDropOptionId(dropOption.getId()); track.setMdDropOptionId(dropOption.getId());
track.setTrackScore(dropOption.getDropOptionScore()); track.setTrackScore(dropOption.getDropOptionScore());
//保存 //保存
...@@ -3794,6 +3795,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3794,6 +3795,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
informed.setInformedOssPath(ossPath); informed.setInformedOssPath(ossPath);
informedMapper.updateByPrimaryKeySelective(informed); informedMapper.updateByPrimaryKeySelective(informed);
MktLeadsAssignedTrack track = new MktLeadsAssignedTrack();
track.setInformedId(id);
mktLeadsAssignedTrackDALService.saveTrack(track);
}catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -9,4 +9,11 @@ public class QueryInformedSheetListRequestVO { ...@@ -9,4 +9,11 @@ public class QueryInformedSheetListRequestVO {
private String customerMobile; private String customerMobile;
private String policyNo; private String policyNo;
private String signDate; private String signDate;
/**
* 系统标志,区分公司营业部和体系,1,分公司,2营业部,3,S1分部,4,S2体系,5,S3纵队
*/
private String systemFlag;
private Long s3Id;
private Long s2Id;
private Long s1Id;
} }
package com.yd.dal.entity.marketing; package com.yd.dal.entity.marketing;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data;
/** /**
* ag_mkt_leads_assigned_track * ag_mkt_leads_assigned_track
...@@ -96,6 +97,14 @@ public class MktLeadsAssignedTrack implements Serializable { ...@@ -96,6 +97,14 @@ public class MktLeadsAssignedTrack implements Serializable {
* 关联ag_mkt_schedule_task_tracking.id 日程表 * 关联ag_mkt_schedule_task_tracking.id 日程表
*/ */
private Long scheduleTaskTrackingId; private Long scheduleTaskTrackingId;
/**
* 告知书记录Id
*/
private Long informedId;
/**
* 告知书url
*/
private String informedOssPath;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
package com.yd.dal.entity.marketing; package com.yd.dal.entity.marketing;
import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.Data;
/** /**
* 商机线索指派表 * 商机线索指派表
...@@ -24,6 +25,14 @@ public class MktLeadsAssigneds { ...@@ -24,6 +25,14 @@ public class MktLeadsAssigneds {
* 经纪人商机对应的客户id * 经纪人商机对应的客户id
*/ */
private Long customerId; private Long customerId;
/**
* 客户姓名
*/
private String customerName;
/**
* 客户电话
*/
private String customerMobile;
/** /**
* 首年保费 * 首年保费
......
...@@ -33,4 +33,6 @@ public interface MktLeadsAssignedTrackMapper { ...@@ -33,4 +33,6 @@ public interface MktLeadsAssignedTrackMapper {
List<SalesScoreDetail> getSalesScoreDetailByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("time") String time); List<SalesScoreDetail> getSalesScoreDetailByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("time") String time);
void deleteScheduleTrackById(Long scheduleTrackId); void deleteScheduleTrackById(Long scheduleTrackId);
int updateInformedOssPathByInformedId(@Param("informedOssPath") String InformedOssPath, @Param("informedId") Long informedId);
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<result column="track_score" jdbcType="INTEGER" property="trackScore" /> <result column="track_score" jdbcType="INTEGER" property="trackScore" />
<result column="leads_assigned_id" jdbcType="BIGINT" property="leadsAssignedId" /> <result column="leads_assigned_id" jdbcType="BIGINT" property="leadsAssignedId" />
<result column="track_time" jdbcType="TIMESTAMP" property="trackTime" /> <result column="track_time" jdbcType="TIMESTAMP" property="trackTime" />
<result column="informed_oss_path" jdbcType="VARCHAR" property="informedOssPath" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type, id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type,
...@@ -104,6 +105,9 @@ ...@@ -104,6 +105,9 @@
<if test="scheduleTaskTrackingId != null"> <if test="scheduleTaskTrackingId != null">
schedule_task_tracking_id, schedule_task_tracking_id,
</if> </if>
<if test="informedId != null">
informed_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null"> <if test="orderId != null">
...@@ -157,6 +161,9 @@ ...@@ -157,6 +161,9 @@
<if test="scheduleTaskTrackingId != null"> <if test="scheduleTaskTrackingId != null">
#{scheduleTaskTrackingId,jdbcType=BIGINT}, #{scheduleTaskTrackingId,jdbcType=BIGINT},
</if> </if>
<if test="informedId != null">
#{informedId,jdbcType=BIGINT},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.marketing.MktLeadsAssignedTrack"> <update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.marketing.MktLeadsAssignedTrack">
...@@ -383,4 +390,9 @@ ...@@ -383,4 +390,9 @@
delete from ag_mkt_leads_assigned_track delete from ag_mkt_leads_assigned_track
where schedule_task_tracking_id = #{scheduleTrackId,jdbcType=BIGINT} where schedule_task_tracking_id = #{scheduleTrackId,jdbcType=BIGINT}
</delete> </delete>
<update id="updateInformedOssPathByInformedId">
update ag_mkt_leads_assigned_track
set informed_oss_path = #{informedOssPath,jdbcType=VARCHAR}
where informed_id = #{informedId,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<result column="time_to_close" jdbcType="TIMESTAMP" property="timeToClose" /> <result column="time_to_close" jdbcType="TIMESTAMP" property="timeToClose" />
<result column="pieces" jdbcType="INTEGER" property="pieces" /> <result column="pieces" jdbcType="INTEGER" property="pieces" />
<result column="remark" jdbcType="LONGVARCHAR" property="remark" /> <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
<result column="customer_name" jdbcType="VARCHAR" property="customerName" />
<result column="customer_mobile" jdbcType="VARCHAR" property="customerMobile" />
<result column="is_active" jdbcType="INTEGER" property="isActive" /> <result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" /> <result column="created_by" jdbcType="BIGINT" property="createdBy" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment