Commit d201f492 by yao.xiao

增加-团队长查询分数/预测销售额及保存目标区分团队,个人

parent 3e16d24c
...@@ -96,8 +96,8 @@ public class PractitionerController { ...@@ -96,8 +96,8 @@ public class PractitionerController {
/** /**
* 微信-上传多媒体文件 * 微信-上传多媒体文件
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/mediaGet") @RequestMapping("/mediaGet")
public Object mediaGet(@RequestBody MediaGetReqVO requestVO){ public Object mediaGet(@RequestBody MediaGetReqVO requestVO){
...@@ -110,8 +110,8 @@ public class PractitionerController { ...@@ -110,8 +110,8 @@ public class PractitionerController {
/*** /***
* 经纪人-经纪人查询自己的商机 * 经纪人-经纪人查询自己的商机
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/ownOpportunityQuery") @RequestMapping("/ownOpportunityQuery")
public Object ownOpportunityQuery(@RequestBody OwnOpportunityQueryRequestVO requestVO){ public Object ownOpportunityQuery(@RequestBody OwnOpportunityQueryRequestVO requestVO){
...@@ -137,8 +137,8 @@ public class PractitionerController { ...@@ -137,8 +137,8 @@ public class PractitionerController {
/*** /***
* 经纪人-经纪人查询自己的商机详情查询 * 经纪人-经纪人查询自己的商机详情查询
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/ownOpportunityDetailQuery") @RequestMapping("/ownOpportunityDetailQuery")
public Object ownOpportunityDetailQuery(@RequestBody OwnOpportunityDetailQueryRequestVO requestVO){ public Object ownOpportunityDetailQuery(@RequestBody OwnOpportunityDetailQueryRequestVO requestVO){
...@@ -192,8 +192,8 @@ public class PractitionerController { ...@@ -192,8 +192,8 @@ public class PractitionerController {
/** /**
* 经纪人-修改商机基本信息 * 经纪人-修改商机基本信息
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/ownOpportunityBasicInformationSave") @RequestMapping("/ownOpportunityBasicInformationSave")
public Object ownOpportunityBasicInformationSave(@RequestBody OwnOpportunityBasicInformationSaveRequestVO requestVO){ public Object ownOpportunityBasicInformationSave(@RequestBody OwnOpportunityBasicInformationSaveRequestVO requestVO){
...@@ -206,8 +206,8 @@ public class PractitionerController { ...@@ -206,8 +206,8 @@ public class PractitionerController {
/** /**
* 经纪人-保存商机跟进,修改商机基本信息 * 经纪人-保存商机跟进,修改商机基本信息
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/ownOpportunityRecordSave") @RequestMapping("/ownOpportunityRecordSave")
public Object ownOpportunityRecordSave(@RequestBody OwnOpportunityRecordSaveRequestVO requestVO){ public Object ownOpportunityRecordSave(@RequestBody OwnOpportunityRecordSaveRequestVO requestVO){
...@@ -220,8 +220,8 @@ public class PractitionerController { ...@@ -220,8 +220,8 @@ public class PractitionerController {
/** /**
* 经纪人-ydLife查询此经纪人总分数 按年月周日 分别统计 新增商机个数 达成率 * 经纪人-ydLife查询此经纪人总分数 按年月周日 分别统计 新增商机个数 达成率
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/opportunityStatistics") @RequestMapping("/opportunityStatistics")
public Object OpportunityStatistics(@RequestBody OpportunityStatisticsRequestVO requestVO){ public Object OpportunityStatistics(@RequestBody OpportunityStatisticsRequestVO requestVO){
...@@ -234,8 +234,8 @@ public class PractitionerController { ...@@ -234,8 +234,8 @@ public class PractitionerController {
/** /**
* 经纪人-保存销售目标 * 经纪人-保存销售目标
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/salesTargetSave") @RequestMapping("/salesTargetSave")
public Object salesTargetSave(@RequestBody SalesTargetSaveRequestVO requestVO){ public Object salesTargetSave(@RequestBody SalesTargetSaveRequestVO requestVO){
...@@ -248,8 +248,8 @@ public class PractitionerController { ...@@ -248,8 +248,8 @@ public class PractitionerController {
/** /**
* 经纪人-查询销售目标 * 经纪人-查询销售目标
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/salesTargetQuery") @RequestMapping("/salesTargetQuery")
public Object salesTargetQuery(@RequestBody SalesTargetQueryRequestVO requestVO){ public Object salesTargetQuery(@RequestBody SalesTargetQueryRequestVO requestVO){
...@@ -262,8 +262,8 @@ public class PractitionerController { ...@@ -262,8 +262,8 @@ public class PractitionerController {
/** /**
* 经纪人-保存月均目标 * 经纪人-保存月均目标
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/salesTargetMonthSave") @RequestMapping("/salesTargetMonthSave")
public Object salesTargetMonthSave(@RequestBody SalesTargetMonthSaveRequestVO requestVO){ public Object salesTargetMonthSave(@RequestBody SalesTargetMonthSaveRequestVO requestVO){
...@@ -276,8 +276,8 @@ public class PractitionerController { ...@@ -276,8 +276,8 @@ public class PractitionerController {
/** /**
* 团队长-查看组员得分均值 * 团队长-查看组员得分均值
* @param requestVO * @param requestVO 请求数据
* @return * @return 响应数据
*/ */
@RequestMapping("/teamActionsAverageQuery") @RequestMapping("/teamActionsAverageQuery")
public Object teamActionsAverageQuery(@RequestBody TeamActionsAverageQueryRequestVO requestVO){ public Object teamActionsAverageQuery(@RequestBody TeamActionsAverageQueryRequestVO requestVO){
......
...@@ -7,5 +7,9 @@ import java.util.List; ...@@ -7,5 +7,9 @@ import java.util.List;
@Data @Data
public class SalesTargetMonthSaveRequestVO { public class SalesTargetMonthSaveRequestVO {
private Long practitionerId; private Long practitionerId;
/**
* 目标类型:1:经纪人指标,2:团队指标
*/
private Integer goalsType;
private List<SalesTargetActions> salesTargetActionsList; private List<SalesTargetActions> salesTargetActionsList;
} }
...@@ -5,4 +5,5 @@ import lombok.Data; ...@@ -5,4 +5,5 @@ import lombok.Data;
@Data @Data
public class SalesTargetQueryRequestVO { public class SalesTargetQueryRequestVO {
private Long practitionerId; private Long practitionerId;
private Integer goalsType;
} }
...@@ -22,5 +22,9 @@ public class SalesTargetSaveRequestVO { ...@@ -22,5 +22,9 @@ public class SalesTargetSaveRequestVO {
* 均价 * 均价
*/ */
private Integer pieceAveragePremium; private Integer pieceAveragePremium;
/**
* 目标类型:1:经纪人指标,2:团队指标
*/
private Integer goalsType;
private List<SalesTargetMonth> salesTargetMonths; private List<SalesTargetMonth> salesTargetMonths;
} }
...@@ -6,8 +6,57 @@ import lombok.Data; ...@@ -6,8 +6,57 @@ import lombok.Data;
@Data @Data
public class TeamActionsAverageQueryResponseVO { public class TeamActionsAverageQueryResponseVO {
/**
* 天均分
*/
private Double scoreDayAverage; private Double scoreDayAverage;
/**
* 天均分
*/
private Double scoreWeekAverage; private Double scoreWeekAverage;
/**
* 月均分
*/
private Double scoreMonthAverage; private Double scoreMonthAverage;
/**
* 本周新增商机
*/
private Integer opportunitiesNum;
/**
* 月平均保费
*/
private Double premiumMonthAverage;
/**
* 月平均佣金
*/
private Double commissionMonthAverage;
/**
* 月平均件数
*/
private Double piecesMonthAverage;
/**
* 季度平均保费
*/
private Double premiumQuarterAverage;
/**
* 季度平均佣金
*/
private Double commissionQuarterAverage;
/**
* 季度平均件数
*/
private Double piecesQuarterAverage;
/**
* 年平均保费
*/
private Double premiumYearAverage;
/**
* 年平均佣金
*/
private Double commissionYearAverage;
/**
* 年平均件数
*/
private Double piecesYearAverage;
private CommonResult commonResult; private CommonResult commonResult;
} }
...@@ -4,7 +4,7 @@ import java.util.Date; ...@@ -4,7 +4,7 @@ import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
* 经纪人商机目标设定 * 经纪人(或团队长)商机目标设定
*/ */
@Data @Data
public class MktLeadsGoals { public class MktLeadsGoals {
...@@ -14,11 +14,26 @@ public class MktLeadsGoals { ...@@ -14,11 +14,26 @@ public class MktLeadsGoals {
private Long id; private Long id;
/** /**
* FK ag_acl_practitioner.id 经纪人 * 目标类型:1:经纪人指标,2:团队指标
*/
private Integer goalsType;
/**
* FK ag_acl_practitioner.id 经纪人(或团队长)
*/ */
private Long practitionerId; private Long practitionerId;
/** /**
* FK ag_acl_practitioner_subordinate_system.id 团队ID
*/
private Long subordinateSystemId;
/**
* FK ag_acl_practitioner_subordinate_system.name 团队Name
*/
private String subordinateSystemName;
/**
* 目标所属年度 * 目标所属年度
*/ */
private Integer currentYear; private Integer currentYear;
......
...@@ -4,7 +4,7 @@ import java.util.Date; ...@@ -4,7 +4,7 @@ import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
* 经纪人商机活动量分摊细化设置 * 经纪人(或团队长)商机活动量分摊细化设置
*/ */
@Data @Data
public class MktLeadsGoalsActions { public class MktLeadsGoalsActions {
...@@ -14,7 +14,12 @@ public class MktLeadsGoalsActions { ...@@ -14,7 +14,12 @@ public class MktLeadsGoalsActions {
private Long id; private Long id;
/** /**
* FK ag_acl_practitioner.id 经纪人 * 目标类型:1:经纪人指标,2:团队指标
*/
private Integer goalsType;
/**
* FK ag_acl_practitioner.id 经纪人(或团队长)
*/ */
private Long practitionerId; private Long practitionerId;
......
...@@ -17,4 +17,6 @@ public interface AclPractitionerSubordinateSystemMapper { ...@@ -17,4 +17,6 @@ public interface AclPractitionerSubordinateSystemMapper {
int updateByPrimaryKey(AclPractitionerSubordinateSystem record); int updateByPrimaryKey(AclPractitionerSubordinateSystem record);
PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId); PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId);
AclPractitionerSubordinateSystem findByPractitionerId(Long practitionerId);
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.yd.dal.mapper.marketing; ...@@ -3,6 +3,8 @@ package com.yd.dal.mapper.marketing;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.yd.dal.entity.marketing.MktLeadsAssignedTrack; import com.yd.dal.entity.marketing.MktLeadsAssignedTrack;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
public interface MktLeadsAssignedTrackMapper { public interface MktLeadsAssignedTrackMapper {
...@@ -22,5 +24,5 @@ public interface MktLeadsAssignedTrackMapper { ...@@ -22,5 +24,5 @@ public interface MktLeadsAssignedTrackMapper {
List<MktLeadsAssignedTrack> findByTrackTimeForNew(MktLeadsAssignedTrack mktLeadsAssignedTrack); List<MktLeadsAssignedTrack> findByTrackTimeForNew(MktLeadsAssignedTrack mktLeadsAssignedTrack);
List<Integer> totalStatisticsForTeam(List<Long> practitionerIds); HashMap<String, BigDecimal> totalStatisticsForTeam(List<Long> practitionerIds);
} }
\ No newline at end of file
package com.yd.dal.mapper.marketing; package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktLeadsAssigneds;import java.util.List; import com.yd.dal.entity.marketing.MktLeadsAssigneds;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
public interface MktLeadsAssignedsMapper { public interface MktLeadsAssignedsMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -18,4 +23,8 @@ public interface MktLeadsAssignedsMapper { ...@@ -18,4 +23,8 @@ public interface MktLeadsAssignedsMapper {
List<MktLeadsAssigneds> findByMktLeadsAssigneds(MktLeadsAssigneds mktLeadsAssigneds); List<MktLeadsAssigneds> findByMktLeadsAssigneds(MktLeadsAssigneds mktLeadsAssigneds);
List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId); List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId);
Integer countPractitionerIdsAndThisWeek(List<Long> practitionerIds);
HashMap<String, BigDecimal> performanceForecastForTeam(@Param("practitionerIds") List<Long> practitionerIds,@Param("refusedId") Long refusedId);
} }
\ No newline at end of file
package com.yd.dal.mapper.marketing; package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoalsActions; import com.yd.dal.entity.marketing.MktLeadsGoalsActions;import org.apache.ibatis.annotations.Param;import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface MktLeadsGoalsActionsMapper { public interface MktLeadsGoalsActionsMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -18,7 +15,7 @@ public interface MktLeadsGoalsActionsMapper { ...@@ -18,7 +15,7 @@ public interface MktLeadsGoalsActionsMapper {
int updateByPrimaryKey(MktLeadsGoalsActions record); int updateByPrimaryKey(MktLeadsGoalsActions record);
void updateIsActiveIsNull(@Param("practitionerId") Long practitionerId,@Param("year") Integer year); void updateIsActiveIsNull(@Param("practitionerId") Long practitionerId, @Param("year") Integer year, @Param("goalsType") Integer goalsType);
List<MktLeadsGoalsActions> findByMktLeadsGoalsActions(MktLeadsGoalsActions mktLeadsGoalsActions); List<MktLeadsGoalsActions> findByMktLeadsGoalsActions(MktLeadsGoalsActions mktLeadsGoalsActions);
} }
\ No newline at end of file
package com.yd.dal.mapper.marketing; package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoals;import org.apache.ibatis.annotations.Param; import com.yd.dal.entity.marketing.MktLeadsGoals;import org.apache.ibatis.annotations.Param;import java.util.List;
import java.util.List;
public interface MktLeadsGoalsMapper { public interface MktLeadsGoalsMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -17,7 +15,7 @@ public interface MktLeadsGoalsMapper { ...@@ -17,7 +15,7 @@ public interface MktLeadsGoalsMapper {
int updateByPrimaryKey(MktLeadsGoals record); int updateByPrimaryKey(MktLeadsGoals record);
void updateIsActiveIsNull(@Param("practitionerId") Long practitionerId, @Param("year") Integer year); void updateIsActiveIsNull(@Param("practitionerId") Long practitionerId, @Param("year") Integer year, @Param("goalsType") Integer goalsType);
List<MktLeadsGoals> selectByMktLeadsGoals(MktLeadsGoals mktLeadsGoals); List<MktLeadsGoals> selectByMktLeadsGoals(MktLeadsGoals mktLeadsGoals);
} }
\ No newline at end of file
package com.yd.dal.service.customer; package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclPractitionerSubordinateSystem;
import com.yd.dal.entity.customer.practitioner.PractitionerSubordinateInfo; import com.yd.dal.entity.customer.practitioner.PractitionerSubordinateInfo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service("aclPractitionerSubordinateSystemDALService") @Service("aclPractitionerSubordinateSystemDALService")
public interface AclPractitionerSubordinateSystemDALService { public interface AclPractitionerSubordinateSystemDALService {
PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId); PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId);
AclPractitionerSubordinateSystem findByPractitionerId(Long practitionerId);
} }
package com.yd.dal.service.customer.impl; package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclPractitionerSubordinateSystem;
import com.yd.dal.entity.customer.practitioner.PractitionerSubordinateInfo; import com.yd.dal.entity.customer.practitioner.PractitionerSubordinateInfo;
import com.yd.dal.mapper.customer.AclPractitionerSubordinateSystemMapper; import com.yd.dal.mapper.customer.AclPractitionerSubordinateSystemMapper;
import com.yd.dal.service.customer.AclPractitionerSubordinateSystemDALService; import com.yd.dal.service.customer.AclPractitionerSubordinateSystemDALService;
...@@ -24,4 +25,9 @@ public class AclPractitionerSubordinateSystemDALServiceImpl implements AclPracti ...@@ -24,4 +25,9 @@ public class AclPractitionerSubordinateSystemDALServiceImpl implements AclPracti
} }
return subordinateInfo; return subordinateInfo;
} }
@Override
public AclPractitionerSubordinateSystem findByPractitionerId(Long practitionerId) {
return aclPractitionerSubordinateSystemMapper.findByPractitionerId(practitionerId);
}
} }
...@@ -8,6 +8,8 @@ import com.yd.dal.service.marketing.MktLeadsAssignedTrackDALService; ...@@ -8,6 +8,8 @@ import com.yd.dal.service.marketing.MktLeadsAssignedTrackDALService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Service("mktLeadsAssignedTrackDALService") @Service("mktLeadsAssignedTrackDALService")
...@@ -39,7 +41,7 @@ public class MktLeadsAssignedTrackDALServiceImpl implements MktLeadsAssignedTrac ...@@ -39,7 +41,7 @@ public class MktLeadsAssignedTrackDALServiceImpl implements MktLeadsAssignedTrac
} }
@Override @Override
public List<Integer> totalStatisticsForTeam(List<Long> practitionerIds) { public HashMap<String, BigDecimal> totalStatisticsForTeam(List<Long> practitionerIds) {
return mktLeadsAssignedTrackMapper.totalStatisticsForTeam(practitionerIds); return mktLeadsAssignedTrackMapper.totalStatisticsForTeam(practitionerIds);
} }
} }
...@@ -6,6 +6,8 @@ import com.yd.dal.service.marketing.MktLeadsAssignedsDALService; ...@@ -6,6 +6,8 @@ import com.yd.dal.service.marketing.MktLeadsAssignedsDALService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Service("mktLeadsAssignedsDALService") @Service("mktLeadsAssignedsDALService")
...@@ -37,4 +39,14 @@ public class MktLeadsAssignedsDALServiceImpl implements MktLeadsAssignedsDALServ ...@@ -37,4 +39,14 @@ public class MktLeadsAssignedsDALServiceImpl implements MktLeadsAssignedsDALServ
public List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId) { public List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId) {
return mktLeadsAssignedsMapper.findByPractitionerIdAndThisWeek(practitionerId); return mktLeadsAssignedsMapper.findByPractitionerIdAndThisWeek(practitionerId);
} }
@Override
public Integer countPractitionerIdsAndThisWeek(List<Long> practitionerIds) {
return mktLeadsAssignedsMapper.countPractitionerIdsAndThisWeek(practitionerIds);
}
@Override
public HashMap<String, BigDecimal> performanceForecastForTeam(List<Long> practitionerIds,Long refusedId) {
return mktLeadsAssignedsMapper.performanceForecastForTeam(practitionerIds,refusedId);
}
} }
...@@ -20,8 +20,8 @@ public class MktLeadsGoalsActionsDALServiceImpl implements MktLeadsGoalsActionsD ...@@ -20,8 +20,8 @@ public class MktLeadsGoalsActionsDALServiceImpl implements MktLeadsGoalsActionsD
} }
@Override @Override
public void updateIsActiveIsNull(Long practitionerId, int year) { public void updateIsActiveIsNull(Long practitionerId, int year,Integer goalsType) {
mktLeadsGoalsActionsMapper.updateIsActiveIsNull(practitionerId, year); mktLeadsGoalsActionsMapper.updateIsActiveIsNull(practitionerId, year,goalsType);
} }
@Override @Override
......
...@@ -6,6 +6,8 @@ import com.yd.dal.service.marketing.MktLeadsGoalsDALService; ...@@ -6,6 +6,8 @@ import com.yd.dal.service.marketing.MktLeadsGoalsDALService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Service("mktLeadsGoalsDALService") @Service("mktLeadsGoalsDALService")
...@@ -20,12 +22,13 @@ public class MktLeadsGoalsDALServiceImpl implements MktLeadsGoalsDALService { ...@@ -20,12 +22,13 @@ public class MktLeadsGoalsDALServiceImpl implements MktLeadsGoalsDALService {
} }
@Override @Override
public void updateIsActiveIsNull(Long practitionerId, Integer year) { public void updateIsActiveIsNull(Long practitionerId, Integer year,Integer goalsType) {
mktLeadsGoalsMapper.updateIsActiveIsNull(practitionerId, year) ; mktLeadsGoalsMapper.updateIsActiveIsNull(practitionerId, year,goalsType) ;
} }
@Override @Override
public List<MktLeadsGoals> findByMktLeadsGoals(MktLeadsGoals mktLeadsGoals) { public List<MktLeadsGoals> findByMktLeadsGoals(MktLeadsGoals mktLeadsGoals) {
return mktLeadsGoalsMapper.selectByMktLeadsGoals(mktLeadsGoals); return mktLeadsGoalsMapper.selectByMktLeadsGoals(mktLeadsGoals);
} }
} }
...@@ -2,6 +2,8 @@ package com.yd.dal.service.marketing; ...@@ -2,6 +2,8 @@ package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsAssignedTrack; import com.yd.dal.entity.marketing.MktLeadsAssignedTrack;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
public interface MktLeadsAssignedTrackDALService { public interface MktLeadsAssignedTrackDALService {
...@@ -13,5 +15,10 @@ public interface MktLeadsAssignedTrackDALService { ...@@ -13,5 +15,10 @@ public interface MktLeadsAssignedTrackDALService {
List<MktLeadsAssignedTrack> findByTrackTimeForNew(MktLeadsAssignedTrack mktLeadsAssignedTrack); List<MktLeadsAssignedTrack> findByTrackTimeForNew(MktLeadsAssignedTrack mktLeadsAssignedTrack);
List<Integer> totalStatisticsForTeam(List<Long> practitionerIds); /**
* 计算经纪人得分统计
* @param practitionerIds 经纪人id的list
* @return 返回他们的分数统计 1.天得分 2.周得分 3.月得分
*/
HashMap<String, BigDecimal> totalStatisticsForTeam(List<Long> practitionerIds);
} }
...@@ -2,6 +2,8 @@ package com.yd.dal.service.marketing; ...@@ -2,6 +2,8 @@ package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsAssigneds; import com.yd.dal.entity.marketing.MktLeadsAssigneds;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
public interface MktLeadsAssignedsDALService { public interface MktLeadsAssignedsDALService {
...@@ -14,4 +16,15 @@ public interface MktLeadsAssignedsDALService { ...@@ -14,4 +16,15 @@ public interface MktLeadsAssignedsDALService {
void save(MktLeadsAssigneds assigneds); void save(MktLeadsAssigneds assigneds);
List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId); List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId);
/**
* 统计这些经纪人id本周一共新增多少商机
*/
Integer countPractitionerIdsAndThisWeek(List<Long> practitionerIds);
/**
* 计算年/季/月 首年保费(premium)/佣金(commission)/件数(pieces) 均取至指派表ag_mkt_leads_assigneds
* ag_mkt_leads_assigned_track跟进记录不可有"拒绝" md_drop_option_id = 102 (传入)
*/
HashMap<String, BigDecimal> performanceForecastForTeam(List<Long> practitionerIds,Long refusedId);
} }
...@@ -7,7 +7,7 @@ import java.util.List; ...@@ -7,7 +7,7 @@ import java.util.List;
public interface MktLeadsGoalsActionsDALService { public interface MktLeadsGoalsActionsDALService {
void save(MktLeadsGoalsActions mktLeadsGoalsActions); void save(MktLeadsGoalsActions mktLeadsGoalsActions);
void updateIsActiveIsNull(Long practitionerId, int year); void updateIsActiveIsNull(Long practitionerId, int year,Integer goalsType);
List<MktLeadsGoalsActions> findByMktLeadsGoalsActions(MktLeadsGoalsActions mktLeadsGoalsActions); List<MktLeadsGoalsActions> findByMktLeadsGoalsActions(MktLeadsGoalsActions mktLeadsGoalsActions);
} }
...@@ -2,12 +2,15 @@ package com.yd.dal.service.marketing; ...@@ -2,12 +2,15 @@ package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoals; import com.yd.dal.entity.marketing.MktLeadsGoals;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List; import java.util.List;
public interface MktLeadsGoalsDALService { public interface MktLeadsGoalsDALService {
void saveMktLeadsGoals(MktLeadsGoals mktLeadsGoals); void saveMktLeadsGoals(MktLeadsGoals mktLeadsGoals);
void updateIsActiveIsNull(Long practitionerId, Integer year); void updateIsActiveIsNull(Long practitionerId, Integer year,Integer goalsType);
List<MktLeadsGoals> findByMktLeadsGoals(MktLeadsGoals mktLeadsGoals); List<MktLeadsGoals> findByMktLeadsGoals(MktLeadsGoals mktLeadsGoals);
} }
...@@ -242,4 +242,10 @@ ...@@ -242,4 +242,10 @@
and s.id = #{subordinateId} and s.id = #{subordinateId}
</select> </select>
<select id="findByPractitionerId" resultMap="BaseResultMap">
select s.*
from ag_acl_practitioner_subordinate_system s
left join ag_acl_practitioner p on p.subordinate_system_id = s.id
where p.id = #{practitionerId,jdbcType=BIGINT}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -323,30 +323,13 @@ ...@@ -323,30 +323,13 @@
</if> </if>
</where> </where>
</select> </select>
<select id="totalStatisticsForTeam" resultType="integer"> <select id="totalStatisticsForTeam" resultType="hashmap">
SELECT sum(track_score) as scoreToday select sum(case when to_days(track_time) = to_days(now()) then track_score end) scoreToday,
FROM ag_mkt_leads_assigned_track sum(case when YEARWEEK(date_format(track_time,'%Y-%m-%d')) = YEARWEEK(now()) then track_score end) scoreWeek,
where is_active = 1 sum(case when date_format(track_time,'%Y-%m')=date_format(now(),'%Y-%m') then track_score end) scoreMonth
and to_days(track_time) = to_days(now()) from ag_mkt_leads_assigned_track
and practitioner_id in where is_active = 1
<foreach collection="list" item="practitionerId" index="index" open="(" close=")" separator=","> and practitioner_id in
#{practitionerId,jdbcType=BIGINT}
</foreach>
UNION all
SELECT sum(track_score) as scoreWeek
FROM ag_mkt_leads_assigned_track
where is_active = 1
and YEARWEEK(date_format(track_time,'%Y-%m-%d')) = YEARWEEK(now())
and practitioner_id in
<foreach collection="list" item="practitionerId" index="index" open="(" close=")" separator=",">
#{practitionerId,jdbcType=BIGINT}
</foreach>
UNION all
SELECT sum(track_score) as scoreMonth
FROM ag_mkt_leads_assigned_track
where is_active = 1
and date_format(track_time,'%Y-%m')=date_format(now(),'%Y-%m')
and practitioner_id in
<foreach collection="list" item="practitionerId" index="index" open="(" close=")" separator=","> <foreach collection="list" item="practitionerId" index="index" open="(" close=")" separator=",">
#{practitionerId,jdbcType=BIGINT} #{practitionerId,jdbcType=BIGINT}
</foreach> </foreach>
......
...@@ -243,4 +243,40 @@ ...@@ -243,4 +243,40 @@
assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT} assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
and YEARWEEK(date_format(created_at,'%Y-%m-%d')) = YEARWEEK(now()) and YEARWEEK(date_format(created_at,'%Y-%m-%d')) = YEARWEEK(now())
</select> </select>
<select id="countPractitionerIdsAndThisWeek" resultType="integer">
select
count(*)
from ag_mkt_leads_assigneds
where
assigned_practitioner_id in
<foreach collection="list" item="practitionerId" index="index" open="(" close=")" separator=",">
#{practitionerId,jdbcType=BIGINT}
</foreach>
and YEARWEEK(date_format(created_at,'%Y-%m-%d')) = YEARWEEK(now())
</select>
<select id="performanceForecastForTeam" resultType="hashmap">
select sum(case when date_format(time_to_close,'%Y-%m')=date_format(now(),'%Y-%m') then FYC end) totalFYCMonth,
sum(case when date_format(time_to_close,'%Y-%m')=date_format(now(),'%Y-%m') then FYP end) totalFYPMonth,
sum(case when date_format(time_to_close,'%Y-%m')=date_format(now(),'%Y-%m') then pieces end) totalPiecesMonth,
sum(case when QUARTER(time_to_close)=QUARTER(now()) then FYC end) totalFYCQuarter,
sum(case when QUARTER(time_to_close)=QUARTER(now()) then FYP end) totalFYPQuarter,
sum(case when QUARTER(time_to_close)=QUARTER(now()) then pieces end) totalPiecesQuarter,
sum(case when YEAR(time_to_close)=YEAR(NOW()) then FYC end) totalFYCYear,
sum(case when YEAR(time_to_close)=YEAR(NOW()) then FYP end) totalFYPYear,
sum(case when YEAR(time_to_close)=YEAR(NOW()) then pieces end) totalPiecesYear
from ag_mkt_leads_assigneds a
where a.is_active=1
and a.assigned_practitioner_id in
<foreach collection="practitionerIds" item="practitionerId" index="index" open="(" close=")" separator=",">
#{practitionerId,jdbcType=BIGINT}
</foreach>
and not EXISTS (select t.leads_assigned_id
from ag_mkt_leads_assigned_track t
where t.md_drop_option_id = #{refusedId,jdbcType=BIGINT}
and t.practitioner_id in
<foreach collection="practitionerIds" item="practitionerId" index="index" open="(" close=")" separator=",">
#{practitionerId,jdbcType=BIGINT}
</foreach>
and a.id = t.leads_assigned_id)
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<!--@mbg.generated--> <!--@mbg.generated-->
<!--@Table ag_mkt_leads_goals_actions--> <!--@Table ag_mkt_leads_goals_actions-->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="goals_type" jdbcType="INTEGER" property="goalsType" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" /> <result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" /> <result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" /> <result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
...@@ -20,9 +21,9 @@ ...@@ -20,9 +21,9 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
id, practitioner_id, current_year, statistic_time_unit, leads_action_id, leads_action_name, id, goals_type, practitioner_id, current_year, statistic_time_unit, leads_action_id,
action_standards, current_version, is_active, created_at, created_by, updated_at, leads_action_name, action_standards, current_version, is_active, created_at, created_by,
updated_by updated_at, updated_by
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated--> <!--@mbg.generated-->
...@@ -38,21 +39,24 @@ ...@@ -38,21 +39,24 @@
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_mkt_leads_goals_actions (practitioner_id, current_year, statistic_time_unit, insert into ag_mkt_leads_goals_actions (goals_type, practitioner_id, current_year,
leads_action_id, leads_action_name, action_standards, statistic_time_unit, leads_action_id, leads_action_name,
current_version, is_active, created_at, action_standards, current_version, is_active,
created_by, updated_at, updated_by created_at, created_by, updated_at,
) updated_by)
values (#{practitionerId,jdbcType=BIGINT}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER}, values (#{goalsType,jdbcType=INTEGER}, #{practitionerId,jdbcType=BIGINT}, #{currentYear,jdbcType=INTEGER},
#{leadsActionId,jdbcType=BIGINT}, #{leadsActionName,jdbcType=VARCHAR}, #{actionStandards,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER}, #{leadsActionId,jdbcType=BIGINT}, #{leadsActionName,jdbcType=VARCHAR},
#{currentVersion,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{actionStandards,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT} #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
) #{updatedBy,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_mkt_leads_goals_actions insert into ag_mkt_leads_goals_actions
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="goalsType != null">
goals_type,
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
practitioner_id, practitioner_id,
</if> </if>
...@@ -91,6 +95,9 @@ ...@@ -91,6 +95,9 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="goalsType != null">
#{goalsType,jdbcType=INTEGER},
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT}, #{practitionerId,jdbcType=BIGINT},
</if> </if>
...@@ -133,6 +140,9 @@ ...@@ -133,6 +140,9 @@
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_mkt_leads_goals_actions update ag_mkt_leads_goals_actions
<set> <set>
<if test="goalsType != null">
goals_type = #{goalsType,jdbcType=INTEGER},
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT}, practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if> </if>
...@@ -175,7 +185,8 @@ ...@@ -175,7 +185,8 @@
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions"> <update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions">
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_mkt_leads_goals_actions update ag_mkt_leads_goals_actions
set practitioner_id = #{practitionerId,jdbcType=BIGINT}, set goals_type = #{goalsType,jdbcType=INTEGER},
practitioner_id = #{practitionerId,jdbcType=BIGINT},
current_year = #{currentYear,jdbcType=INTEGER}, current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER}, statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
leads_action_id = #{leadsActionId,jdbcType=BIGINT}, leads_action_id = #{leadsActionId,jdbcType=BIGINT},
...@@ -196,6 +207,7 @@ ...@@ -196,6 +207,7 @@
where where
practitioner_id = #{practitionerId,jdbcType=BIGINT} practitioner_id = #{practitionerId,jdbcType=BIGINT}
and current_year = #{year,jdbcType=INTEGER} and current_year = #{year,jdbcType=INTEGER}
and goals_type = #{goalsType,jdbcType=INTEGER}
and is_active =1; and is_active =1;
</update> </update>
<select id="findByMktLeadsGoalsActions" resultMap="BaseResultMap"> <select id="findByMktLeadsGoalsActions" resultMap="BaseResultMap">
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
<!--@mbg.generated--> <!--@mbg.generated-->
<!--@Table ag_mkt_leads_goals--> <!--@Table ag_mkt_leads_goals-->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="goals_type" jdbcType="INTEGER" property="goalsType" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" /> <result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="subordinate_system_id" jdbcType="BIGINT" property="subordinateSystemId" />
<result column="subordinate_system_name" jdbcType="VARCHAR" property="subordinateSystemName" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" /> <result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" /> <result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
<result column="seq_time" jdbcType="INTEGER" property="seqTime" /> <result column="seq_time" jdbcType="INTEGER" property="seqTime" />
...@@ -22,9 +25,9 @@ ...@@ -22,9 +25,9 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
id, practitioner_id, current_year, statistic_time_unit, seq_time, premium, commission, id, goals_type, practitioner_id, subordinate_system_id, subordinate_system_name,
pieces, piece_average_premium, current_version, is_active, created_at, created_by, current_year, statistic_time_unit, seq_time, premium, commission, pieces, piece_average_premium,
updated_at, updated_by current_version, is_active, created_at, created_by, updated_at, updated_by
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated--> <!--@mbg.generated-->
...@@ -40,12 +43,14 @@ ...@@ -40,12 +43,14 @@
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_mkt_leads_goals (practitioner_id, current_year, statistic_time_unit, insert into ag_mkt_leads_goals (goals_type, practitioner_id, subordinate_system_id,
subordinate_system_name, current_year, statistic_time_unit,
seq_time, premium, commission, seq_time, premium, commission,
pieces, piece_average_premium, current_version, pieces, piece_average_premium, current_version,
is_active, created_at, created_by, is_active, created_at, created_by,
updated_at, updated_by) updated_at, updated_by)
values (#{practitionerId,jdbcType=BIGINT}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER}, values (#{goalsType,jdbcType=INTEGER}, #{practitionerId,jdbcType=BIGINT}, #{subordinateSystemId,jdbcType=BIGINT},
#{subordinateSystemName,jdbcType=VARCHAR}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{seqTime,jdbcType=INTEGER}, #{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER}, #{seqTime,jdbcType=INTEGER}, #{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER},
#{pieces,jdbcType=INTEGER}, #{pieceAveragePremium,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP}, #{pieces,jdbcType=INTEGER}, #{pieceAveragePremium,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
...@@ -55,9 +60,18 @@ ...@@ -55,9 +60,18 @@
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_mkt_leads_goals insert into ag_mkt_leads_goals
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="goalsType != null">
goals_type,
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
practitioner_id, practitioner_id,
</if> </if>
<if test="subordinateSystemId != null">
subordinate_system_id,
</if>
<if test="subordinateSystemName != null">
subordinate_system_name,
</if>
<if test="currentYear != null"> <if test="currentYear != null">
current_year, current_year,
</if> </if>
...@@ -99,9 +113,18 @@ ...@@ -99,9 +113,18 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="goalsType != null">
#{goalsType,jdbcType=INTEGER},
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT}, #{practitionerId,jdbcType=BIGINT},
</if> </if>
<if test="subordinateSystemId != null">
#{subordinateSystemId,jdbcType=BIGINT},
</if>
<if test="subordinateSystemName != null">
#{subordinateSystemName,jdbcType=VARCHAR},
</if>
<if test="currentYear != null"> <if test="currentYear != null">
#{currentYear,jdbcType=INTEGER}, #{currentYear,jdbcType=INTEGER},
</if> </if>
...@@ -147,9 +170,18 @@ ...@@ -147,9 +170,18 @@
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_mkt_leads_goals update ag_mkt_leads_goals
<set> <set>
<if test="goalsType != null">
goals_type = #{goalsType,jdbcType=INTEGER},
</if>
<if test="practitionerId != null"> <if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT}, practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if> </if>
<if test="subordinateSystemId != null">
subordinate_system_id = #{subordinateSystemId,jdbcType=BIGINT},
</if>
<if test="subordinateSystemName != null">
subordinate_system_name = #{subordinateSystemName,jdbcType=VARCHAR},
</if>
<if test="currentYear != null"> <if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER}, current_year = #{currentYear,jdbcType=INTEGER},
</if> </if>
...@@ -195,7 +227,10 @@ ...@@ -195,7 +227,10 @@
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals"> <update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals">
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_mkt_leads_goals update ag_mkt_leads_goals
set practitioner_id = #{practitionerId,jdbcType=BIGINT}, set goals_type = #{goalsType,jdbcType=INTEGER},
practitioner_id = #{practitionerId,jdbcType=BIGINT},
subordinate_system_id = #{subordinateSystemId,jdbcType=BIGINT},
subordinate_system_name = #{subordinateSystemName,jdbcType=VARCHAR},
current_year = #{currentYear,jdbcType=INTEGER}, current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER}, statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
seq_time = #{seqTime,jdbcType=INTEGER}, seq_time = #{seqTime,jdbcType=INTEGER},
...@@ -216,6 +251,7 @@ ...@@ -216,6 +251,7 @@
SET is_active = 0 SET is_active = 0
WHERE practitioner_id = #{practitionerId,jdbcType=BIGINT} WHERE practitioner_id = #{practitionerId,jdbcType=BIGINT}
AND current_year = #{year,jdbcType=INTEGER} AND current_year = #{year,jdbcType=INTEGER}
and goals_type = #{goalsType,jdbcType=INTEGER}
AND is_active = 1; AND is_active = 1;
</update> </update>
<select id="selectByMktLeadsGoals" resultMap="BaseResultMap"> <select id="selectByMktLeadsGoals" resultMap="BaseResultMap">
......
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