添加一个根据人员id查公司业绩的方法

This commit is contained in:
fl 2025-04-28 10:57:18 +08:00
parent 93706bda63
commit 650598762e
6 changed files with 63 additions and 0 deletions

View File

@ -135,4 +135,23 @@ public class TbCompanyPerfController extends BaseController {
log.info("导出失败{}",e.getMessage());
}
}
/**
* 通过人员去查公司业绩管理列表
* @param
* @return
*/
@ApiOperation(value = "通过人员去查公司业绩管理列表")
@GetMapping("/getTbCompanyPerfListByPersonId")
public List<TbCompanyPerfVo> getTbCompanyPerfListByPersonId(TbCompanyPerfVo tbCompanyPerfVo) {
try {
return tbCompanyPerfService.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
}catch (Exception e){
log.info("公司业绩管理列表失败{}",e.getMessage());
return null;
}
}
}

View File

@ -112,4 +112,14 @@ public class TbCompanyPerfVo {
* 附件集合
*/
private List<TbFileSourceVo> tbFileSourceVoList;
/**
* 人员id
*/
private String personId;
/**
* 人员名称
*/
private String personName;
}

View File

@ -16,4 +16,6 @@ public interface TbCompanyPerfMapper {
void updateTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
void delTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
List<TbCompanyPerfVo> getTbCompanyPerfListByPersonId(TbCompanyPerfVo tbCompanyPerfVo);
}

View File

@ -39,4 +39,11 @@ public interface TbCompanyPerfService {
* @return
*/
void delTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) throws Exception;
/**
* 通过人员去查公司业绩管理列表
* @param
* @return
*/
List<TbCompanyPerfVo> getTbCompanyPerfListByPersonId(TbCompanyPerfVo tbCompanyPerfVo);
}

View File

@ -156,6 +156,12 @@ public class TbCompanyPerfServiceImpl implements TbCompanyPerfService {
}
}
@Override
public List<TbCompanyPerfVo> getTbCompanyPerfListByPersonId(TbCompanyPerfVo tbCompanyPerfVo) {
//获取公司业绩列表
return tbCompanyPerfMapper.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
}
/**
* 删除关键人服务器图片
* @param tbCompanyPerfRelList

View File

@ -79,4 +79,23 @@
owner_unit,owner_phone,create_time,create_user,update_time
from tb_company_perf where pro_name =#{proName} and del_flag = 0
</select>
<select id="getTbCompanyPerfListByPersonId" resultType="com.bonus.tool.dto.TbCompanyPerfVo">
select
tkp.user_name as personName,
tcp.pro_name,
tcp.start_time,
tcp.end_time,
tcp.voltage
FROM
tb_key_people tkp
LEFT JOIN tb_company_perf_rel tcpr ON tcpr.key_user = tkp.id
LEFT JOIN tb_company_perf tcp ON tcp.id = tcpr.perf_id and tcp.del_flag = 0
WHERE tkp.del_flag = 0
<if test="personId != '' and personId != null">and tkp.id = #{personId}</if>
<if test="proName != '' and proName != null">and tcp.pro_name = #{proName}</if>
<if test="voltage != '' and voltage != null">and tcp.voltage = #{voltage}</if>
<if test="startTime != null and test=endTime != null">
and tcp.start_time BETWEEN STR_TO_DATE(#{startTime}, '%Y-%m-%d') AND STR_TO_DATE(#{endTime}, '%Y-%m-%d')
</if>
</select>
</mapper>