Commit 55ee9b4c by yao.xiao

增加-经纪人商机详情信息

parent 8e3a73d8
......@@ -51,7 +51,7 @@ public class MarketServiceImpl implements MarketService {
announcementList = mktAnnouncementDALService.findByIsActiveAndAnnouncementAtBefore(1,new Date());
}
if(!announcementList.isEmpty()){
List<MdDropOptions> options = mdDropOptionsDALService.findByDropMasterId(6L);
List<MdDropOptions> options = mdDropOptionsDALService.findByDropMasterCode("yd_mkt_announcement_type");
Map<Long,MdDropOptions> optionsMap = new HashMap<>();
options.forEach(i-> optionsMap.put(i.getId(),i));
List<AnnouncementInfo> announcementInfoList = new ArrayList<>();
......
......@@ -21,6 +21,7 @@ import com.yd.dal.entity.customer.*;
import com.yd.dal.entity.marketing.MktLeadsAssignedTrack;
import com.yd.dal.entity.marketing.MktLeadsAssigneds;
import com.yd.dal.entity.marketing.MktLeadsPool;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.entity.meta.MdMkCampaign;
import com.yd.dal.entity.meta.MdTag;
import com.yd.dal.entity.meta.ObjectCollectionTagged;
......@@ -106,7 +107,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private AclPractitionerPotentialAssignedTrackDALService aclPractitionerPotentialAssignedTrackDALService;
@Autowired
private MktLeadsPoolDALService mktLeadsPoolDALService;
@Autowired
private MdDropOptionsDALService mdDropOptionsDALService;
@Override
public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) {
PractitionerLoginResponseVO responseVO = new PractitionerLoginResponseVO();
......@@ -530,6 +532,16 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
info.setMobileNo(customer.getMobileNo());
info.setWeChat(customer.getWechatNo());
info.setOtherContacts(customer.getOtherContacts());
info.setZodiacTypeId(customer.getZodiacTypeId());
if (!CommonUtil.isNullOrZero(customer.getZodiacTypeId())){
MdDropOptions mdDropOption = mdDropOptionsDALService.findByDropOptionId(Long.valueOf(customer.getZodiacTypeId()));
info.setZodiacType(mdDropOption.getDropOptionName());
}
info.setBloodTypeId(customer.getBloodTypeId());
if (!CommonUtil.isNullOrZero(customer.getBloodTypeId())){
MdDropOptions mdDropOption = mdDropOptionsDALService.findByDropOptionId(Long.valueOf(customer.getBloodTypeId()));
info.setBloodType(mdDropOption.getDropOptionName());
}
String mktCampaign = customer.getMktCampaign();
if (!CommonUtil.isNullOrBlank(mktCampaign)){
String mktCampaignId = mktCampaign.split(",")[0];
......@@ -547,11 +559,19 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
opportunityDropOptionId = mktLeadsAssignedTracks.get(0).getMdDropOptionId();
}
info.setMdDropOptionId(opportunityDropOptionId);
if (!CommonUtil.isNullOrZero(opportunityDropOptionId)){
MdDropOptions mdDropOption = mdDropOptionsDALService.findByDropOptionId(opportunityDropOptionId);
info.setMdDropOptionName(mdDropOption.getDropOptionName());
}
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setCustomerId(customerId);
mktLeadsAssigneds.setAssignedPractitionerId(practitionerId);
List<MktLeadsAssigneds> mktLeadsAssignedsList =mktLeadsAssignedsDALService.findByMktLeadsAssigneds(mktLeadsAssigneds);
mktLeadsAssigneds = mktLeadsAssignedsList.get(0);
info.setFyc(mktLeadsAssigneds.getFyc());
info.setFyp(mktLeadsAssigneds.getFyp());
info.setPieces(mktLeadsAssigneds.getPieces());
info.setRemark(mktLeadsAssigneds.getRemark());
info.setOpportunityDate(CommonUtil.dateParseString(mktLeadsAssigneds.getCreatedAt(),"yyyy-MM-dd HH:mm:ss"));
info.setOpportunityCustomerTags(OpportunityCustomerTags(customerId));
return info;
......@@ -653,11 +673,17 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsAssignedTrack.setCustomerId(customerId);
PageHelper.orderBy("created_at DESC , updated_at DESC");
List<MktLeadsAssignedTrack> mktLeadsAssignedTracks = mktLeadsAssignedTrackDALService.findByMktLeadsAssignedTrack(mktLeadsAssignedTrack);
List<MdDropOptions> dropOptionsList = mdDropOptionsDALService.findByDropMasterCode("bizchance_promotion_action");
for (MktLeadsAssignedTrack track : mktLeadsAssignedTracks) {
OpportunityRecordInfo info = new OpportunityRecordInfo();
CommonUtil.simpleObjectCopy(track, info);
info.setOpportunityId(track.getCustomerId());
info.setNoticeDate(CommonUtil.dateParseString(track.getCreatedAt(), "yyyy-MM-dd"));
BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("id", track.getMdDropOptionId());
List<MdDropOptions> select = (List<MdDropOptions>)CollectionUtils.select(dropOptionsList, predicate);
if (!select.isEmpty()){
info.setMdDropOptionName(select.get(0).getDropOptionName());
}
infos.add(info);
}
return infos;
......
......@@ -2,6 +2,7 @@ package com.yd.api.practitioner.vo.opportunity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class OpportunityBasicInformationInfo {
......@@ -17,6 +18,34 @@ public class OpportunityBasicInformationInfo {
private String address;
private String opportunityDate;
private Long mdDropOptionId;
private String mdDropOptionName;
/**
* 星座id
*/
private Integer zodiacTypeId;//星座id
/**
* 星座名字
*/
private String zodiacType;//星座名字
/**
* 血型id
*/
private Integer bloodTypeId;//血型id
/**
* 血型名字
*/
private String bloodType;//血型名字
private BigDecimal fyp;
private BigDecimal fyc;
/**
* 件数
*/
private Integer pieces;//件数
private String remark;
/**
* 预计成交时间
*/
private String timeToClose;
private List<OpportunityCustomerTag> opportunityCustomerTags;
}
......@@ -11,4 +11,5 @@ public class OpportunityRecordInfo {
private Long practitionerId;
private Long opportunityId;
private Long mdDropOptionId;
private String mdDropOptionName;
}
......@@ -18,4 +18,6 @@ public interface MdDropOptionsMapper {
int updateByPrimaryKey(MdDropOptions record);
List<MdDropOptions> selectByObj(MdDropOptions info);
List<MdDropOptions> findByDropMasterCode(String dropMasterCode);
}
\ No newline at end of file
......@@ -6,4 +6,8 @@ import java.util.List;
public interface MdDropOptionsDALService {
List<MdDropOptions> findByDropMasterId(long dropMasterId);
MdDropOptions findByDropOptionId(Long dropOptionId);
List<MdDropOptions> findByDropMasterCode(String dropMasterCode);
}
......@@ -20,4 +20,14 @@ public class MdDropOptionsDALServiceImpl implements MdDropOptionsDALService {
info.setDropMasterId(dropMasterId);
return mdDropOptionsMapper.selectByObj(info);
}
@Override
public MdDropOptions findByDropOptionId(Long dropOptionId) {
return mdDropOptionsMapper.selectByPrimaryKey(dropOptionId);
}
@Override
public List<MdDropOptions> findByDropMasterCode(String dropMasterCode) {
return mdDropOptionsMapper.findByDropMasterCode(dropMasterCode);
}
}
......@@ -190,4 +190,10 @@
</if>
</where>
</select>
<select id="findByDropMasterCode" resultMap="BaseResultMap">
SELECT o.*
FROM ag_md_drop_options o
LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id
WHERE m.scenario_code LIKE #{dropMasterCode,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
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