Commit 4a51433a by yao.xiao

修改-经纪人商机详情查询增加申请专家状态

parent e3192913
......@@ -155,6 +155,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
@Autowired
private MktLeadsExpertRequestDALService mktLeadsExpertRequestDALService;
@Autowired
private MktLeadsExpertAssignDALService mktLeadsExpertAssignDALService;
@Autowired
private MailService mailService;
@Override
......@@ -726,6 +728,25 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
info.setTimeToClose(CommonUtil.dateParseString(mktLeadsAssigneds.getTimeToClose(),"yyyy-MM-dd"));
info.setOpportunityDate(CommonUtil.dateParseString(mktLeadsAssigneds.getCreatedAt(),"yyyy-MM-dd HH:mm:ss"));
info.setOpportunityCustomerTags(OpportunityCustomerTags(customerId));
//查询此商机是否有申请专家
info.setExpertType(0L);
MktLeadsExpertRequest mktLeadsExpertRequest = mktLeadsExpertRequestDALService.findByLeadsAssignedId(mktLeadsAssigneds.getId());
if (mktLeadsExpertRequest != null){
//有申请专家 查询是否指派专家
info.setExpertType(1L);
Long mktLeadsExpertRequestId = mktLeadsExpertRequest.getId();
MktLeadsExpertAssign mktLeadsExpertAssign = mktLeadsExpertAssignDALService.findByLeadsExpertRequestId(mktLeadsExpertRequestId);
if (mktLeadsAssigneds != null){
//以指派专家
info.setExpertType(2L);
Long expertPractitionerId = mktLeadsExpertAssign.getExpertPractitionerId();
AclPractitioner expertPractitioner = aclPractitionerDALService.findById(expertPractitionerId);
info.setExpertPractitionerId(expertPractitionerId);
info.setExpertPractitionerName(expertPractitioner.getName());
}
}
return info;
}
......
......@@ -20,6 +20,19 @@ public class OpportunityBasicInformationInfo {
private Long mdDropOptionId;
private String mdDropOptionName;
/**
* 0.可申请 1.申请中 2.已分配
*/
private Long expertType;//0.可申请 1.申请中 2.已分配
/**
* 专家经纪人id
*/
private Long expertPractitionerId;//专家经纪人id
/**
* 专家经纪人名字
*/
private String expertPractitionerName;//专家经纪人名字
/**
* 星座id
*/
private Integer zodiacTypeId;//星座id
......
......@@ -22,4 +22,6 @@ public interface MktLeadsExpertAssignMapper {
int updateBatchSelective(List<MktLeadsExpertAssign> list);
int batchInsert(@Param("list") List<MktLeadsExpertAssign> list);
MktLeadsExpertAssign selectByLeadsExpertRequestId(Long mktLeadsExpertRequestId);
}
\ No newline at end of file
......@@ -22,4 +22,6 @@ public interface MktLeadsExpertRequestMapper {
int updateBatchSelective(List<MktLeadsExpertRequest> list);
int batchInsert(@Param("list") List<MktLeadsExpertRequest> list);
MktLeadsExpertRequest selectByAassignedId(Long assignedId);
}
\ No newline at end of file
package com.yd.dal.service.marketing.Impl;
import com.yd.dal.entity.marketing.MktLeadsExpertAssign;
import com.yd.dal.mapper.marketing.MktLeadsExpertAssignMapper;
import com.yd.dal.service.marketing.MktLeadsExpertAssignDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service("mktLeadsExpertAssignDALService")
public class MktLeadsExpertAssignDALServiceImpl implements MktLeadsExpertAssignDALService {
@Resource
private MktLeadsExpertAssignMapper mktLeadsExpertAssignMapper;
@Override
public MktLeadsExpertAssign findByLeadsExpertRequestId(Long mktLeadsExpertRequestId) {
return mktLeadsExpertAssignMapper.selectByLeadsExpertRequestId(mktLeadsExpertRequestId);
}
}
......@@ -17,4 +17,9 @@ public class MktLeadsExpertRequestDALServiceImpl implements MktLeadsExpertReques
public int save(MktLeadsExpertRequest mktLeadsExpertRequest) {
return mktLeadsExpertRequestMapper.insert(mktLeadsExpertRequest);
}
@Override
public MktLeadsExpertRequest findByLeadsAssignedId(Long assignedId) {
return mktLeadsExpertRequestMapper.selectByAassignedId(assignedId);
}
}
package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsExpertAssign;
public interface MktLeadsExpertAssignDALService {
MktLeadsExpertAssign findByLeadsExpertRequestId(Long mktLeadsExpertRequestId);
}
......@@ -4,4 +4,6 @@ import com.yd.dal.entity.marketing.MktLeadsExpertRequest;
public interface MktLeadsExpertRequestDALService {
int save(MktLeadsExpertRequest mktLeadsExpertRequest);
MktLeadsExpertRequest findByLeadsAssignedId(Long assignedId);
}
......@@ -245,4 +245,11 @@
#{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT})
</foreach>
</insert>
<select id="selectByLeadsExpertRequestId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_mkt_leads_expert_assign
where leads_expert_request_id = #{mktLeadsExpertRequestId,jdbcType=BIGINT}
and is_active = 1
</select>
</mapper>
\ No newline at end of file
......@@ -220,4 +220,12 @@
)
</foreach>
</insert>
<select id="selectByAassignedId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_mkt_leads_expert_request
where leads_assigned_id = #{assignedId,jdbcType=BIGINT}
and is_active = 1
</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