Commit 111d8f2c by Water Wang

resolve conflict

parents 7ee2b80b 491394c9
......@@ -221,7 +221,6 @@ public class PractitionerController {
}
/**
<<<<<<< HEAD
* 经纪人-ydLife查询此经纪人总分数 按年月周日 分别统计 新增商机个数 达成率
* @param requestVO 请求数据
* @return 响应数据
......@@ -234,6 +233,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 团队长--设置增员目标
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/potentialGoalsSetting")
public Object potentialGoalsSetting(@RequestBody PotentialGoalsSettingRequestVO requestVO){
JsonResult result = new JsonResult();
PotentialGoalsSettingResponseVO responseVO = practitionerService.potentialGoalsSetting(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 经纪人-保存销售目标
......@@ -248,6 +260,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 团队长--查询增员目标
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/potentialGoalsQuery")
public Object potentialGoalsQuery(@RequestBody PotentialGoalsQueryRequestVO requestVO){
JsonResult result = new JsonResult();
PotentialGoalsQueryResponseVO responseVO = practitionerService.potentialGoalsQuery(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 经纪人-查询销售目标
......@@ -262,6 +287,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 团队长--查询增员目标活动量
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/potentialGoalsActionsQuery")
public Object potentialGoalsActionsQuery(@RequestBody PotentialGoalsActionsQueryRequestVO requestVO){
JsonResult result = new JsonResult();
PotentialGoalsActionsQueryResponseVO responseVO = practitionerService.potentialGoalsActionsQuery(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 经纪人-保存月均目标
......@@ -276,6 +314,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 团队长--更新增员目标活动量
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/potentialGoalsActionsUpdate")
public Object potentialGoalsActionsUpdate(@RequestBody PotentialGoalsActionsUpdateRequestVO requestVO){
JsonResult result = new JsonResult();
PotentialGoalsActionsUpdateResponseVO responseVO = practitionerService.potentialGoalsActionsUpdate(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 团队长-查看组员得分均值
......@@ -290,6 +341,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 团队长--查看目前活动量
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/potentialActivityQuery")
public Object potentialActivityQuery(@RequestBody PotentialActivityQueryRequestVO requestVO){
JsonResult result = new JsonResult();
PotentialActivityQueryResponseVO responseVO = practitionerService.potentialActivityQuery(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 队员销售活动量列表
......
package com.yd.api.practitioner.service;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
......@@ -167,4 +169,37 @@ public interface PractitionerService {
* @return
*/
SubordinateSystemMemberQueryResponseVO subordinateSystemMemberQuery(SubordinateSystemMemberQueryRequestVO requestVO);
/**
* 保存增员目标
* @param requestVO 请求数据
* @return 响应数据
*/
PotentialGoalsSettingResponseVO potentialGoalsSetting(PotentialGoalsSettingRequestVO requestVO);
/**
* 查询增员目标
* @param requestVO 请求数据
* @return 响应数据
*/
PotentialGoalsQueryResponseVO potentialGoalsQuery(PotentialGoalsQueryRequestVO requestVO);
/**
* 查询增员目标活动量
* @param requestVO 请求数据
* @return 响应数据
*/
PotentialGoalsActionsQueryResponseVO potentialGoalsActionsQuery(PotentialGoalsActionsQueryRequestVO requestVO);
/**
* 团队长--更新增员目标活动量
* @param requestVO 请求数据
* @return 响应数据
*/
PotentialGoalsActionsUpdateResponseVO potentialGoalsActionsUpdate(PotentialGoalsActionsUpdateRequestVO requestVO);
/**
* 团队长--查看目前自己的活动量
* @param requestVO 请求数据
* @return 响应数据
*/
PotentialActivityQueryResponseVO potentialActivityQuery(PotentialActivityQueryRequestVO requestVO);
}
package com.yd.api.practitioner.vo.recruit;
public class PotentialActivityQueryRequestVO {
private Long practitionerId;
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
}
package com.yd.api.practitioner.vo.recruit;
import com.yd.api.result.CommonResult;
public class PotentialActivityQueryResponseVO {
private Integer activityForToday;
private Integer activityForWeek;
private Integer activityForMonth;
private Integer activityForQuarter;
private Integer recruitSucceed;
private CommonResult commonResult;
public Integer getActivityForToday() {
return activityForToday;
}
public void setActivityForToday(Integer activityForToday) {
this.activityForToday = activityForToday;
}
public Integer getActivityForWeek() {
return activityForWeek;
}
public void setActivityForWeek(Integer activityForWeek) {
this.activityForWeek = activityForWeek;
}
public Integer getActivityForMonth() {
return activityForMonth;
}
public void setActivityForMonth(Integer activityForMonth) {
this.activityForMonth = activityForMonth;
}
public Integer getActivityForQuarter() {
return activityForQuarter;
}
public void setActivityForQuarter(Integer activityForQuarter) {
this.activityForQuarter = activityForQuarter;
}
public Integer getRecruitSucceed() {
return recruitSucceed;
}
public void setRecruitSucceed(Integer recruitSucceed) {
this.recruitSucceed = recruitSucceed;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.api.practitioner.vo.recruit;
public class PotentialGoalsActionsInfo {
private Long id;
private Long practitionerId;
private Integer currentYear;
private Integer statisticTimeUnit;
private Long potentialActionId;
private String potentialActionName;
private Integer actionStandards;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public Integer getCurrentYear() {
return currentYear;
}
public void setCurrentYear(Integer currentYear) {
this.currentYear = currentYear;
}
public Integer getStatisticTimeUnit() {
return statisticTimeUnit;
}
public void setStatisticTimeUnit(Integer statisticTimeUnit) {
this.statisticTimeUnit = statisticTimeUnit;
}
public Long getPotentialActionId() {
return potentialActionId;
}
public void setPotentialActionId(Long potentialActionId) {
this.potentialActionId = potentialActionId;
}
public String getPotentialActionName() {
return potentialActionName;
}
public void setPotentialActionName(String potentialActionName) {
this.potentialActionName = potentialActionName;
}
public Integer getActionStandards() {
return actionStandards;
}
public void setActionStandards(Integer actionStandards) {
this.actionStandards = actionStandards;
}
}
package com.yd.api.practitioner.vo.recruit;
public class PotentialGoalsActionsQueryRequestVO {
private Long practitionerId;
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
}
package com.yd.api.practitioner.vo.recruit;
import com.yd.api.result.CommonResult;
import java.util.List;
public class PotentialGoalsActionsQueryResponseVO {
private List<PotentialGoalsActionsInfo> goalsActionsInfoList;
private CommonResult commonResult;
public List<PotentialGoalsActionsInfo> getGoalsActionsInfoList() {
return goalsActionsInfoList;
}
public void setGoalsActionsInfoList(List<PotentialGoalsActionsInfo> goalsActionsInfoList) {
this.goalsActionsInfoList = goalsActionsInfoList;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.api.practitioner.vo.recruit;
import java.util.List;
public class PotentialGoalsActionsUpdateRequestVO {
private Long practitionerId;
private List<PotentialGoalsActionsInfo> goalsActionsInfoList;
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public List<PotentialGoalsActionsInfo> getGoalsActionsInfoList() {
return goalsActionsInfoList;
}
public void setGoalsActionsInfoList(List<PotentialGoalsActionsInfo> goalsActionsInfoList) {
this.goalsActionsInfoList = goalsActionsInfoList;
}
}
package com.yd.api.practitioner.vo.recruit;
import com.yd.api.result.CommonResult;
public class PotentialGoalsActionsUpdateResponseVO {
private CommonResult commonResult;
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.api.practitioner.vo.recruit;
public class PotentialGoalsQueryRequestVO {
private Long practitionerId;
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
}
package com.yd.api.practitioner.vo.recruit;
import com.yd.api.practitioner.vo.recruit.RecruitGoalForMonth;
import com.yd.api.result.CommonResult;
import java.util.List;
public class PotentialGoalsQueryResponseVO {
private Integer numberRecruitsYear;
private Integer numberMDRTYear;
private List<RecruitGoalForMonth> recruitGoalForMonthList;
private CommonResult commonResult;
public Integer getNumberRecruitsYear() {
return numberRecruitsYear;
}
public void setNumberRecruitsYear(Integer numberRecruitsYear) {
this.numberRecruitsYear = numberRecruitsYear;
}
public Integer getNumberMDRTYear() {
return numberMDRTYear;
}
public void setNumberMDRTYear(Integer numberMDRTYear) {
this.numberMDRTYear = numberMDRTYear;
}
public List<RecruitGoalForMonth> getRecruitGoalForMonthList() {
return recruitGoalForMonthList;
}
public void setRecruitGoalForMonthList(List<RecruitGoalForMonth> recruitGoalForMonthList) {
this.recruitGoalForMonthList = recruitGoalForMonthList;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.api.practitioner.vo.recruit;
import java.util.List;
public class PotentialGoalsSettingRequestVO {
private Long practitionerId;
private Integer numberRecruitsYear;
private Integer numberMDRTYear;
private List<RecruitGoalForMonth> recruitGoalForMonthList;
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public Integer getNumberRecruitsYear() {
return numberRecruitsYear;
}
public void setNumberRecruitsYear(Integer numberRecruitsYear) {
this.numberRecruitsYear = numberRecruitsYear;
}
public Integer getNumberMDRTYear() {
return numberMDRTYear;
}
public void setNumberMDRTYear(Integer numberMDRTYear) {
this.numberMDRTYear = numberMDRTYear;
}
public List<RecruitGoalForMonth> getRecruitGoalForMonthList() {
return recruitGoalForMonthList;
}
public void setRecruitGoalForMonthList(List<RecruitGoalForMonth> recruitGoalForMonthList) {
this.recruitGoalForMonthList = recruitGoalForMonthList;
}
}
package com.yd.api.practitioner.vo.recruit;
import com.yd.api.result.CommonResult;
public class PotentialGoalsSettingResponseVO {
private CommonResult commonResult;
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
......@@ -20,6 +20,7 @@ public class PractitionerPotentialInfo {
private String trackStatus;
private Long trackId;
private String createdAt;
private String timeToOnboarding;
public Long getPotentialId() {
return potentialId;
......@@ -172,4 +173,12 @@ public class PractitionerPotentialInfo {
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getTimeToOnboarding() {
return timeToOnboarding;
}
public void setTimeToOnboarding(String timeToOnboarding) {
this.timeToOnboarding = timeToOnboarding;
}
}
package com.yd.api.practitioner.vo.recruit;
public class RecruitGoalForMonth {
private Integer month;
private Integer numberRecruits;
private Integer numberMDRT;
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getNumberRecruits() {
return numberRecruits;
}
public void setNumberRecruits(Integer numberRecruits) {
this.numberRecruits = numberRecruits;
}
public Integer getNumberMDRT() {
return numberMDRT;
}
public void setNumberMDRT(Integer numberMDRT) {
this.numberMDRT = numberMDRT;
}
}
......@@ -16,6 +16,7 @@ public class RecruitRequestVO {
private String remark;
private String ossPathResume;
private Long practitionerId;
private String timeToOnboarding;
public Long getPotentialId() {
return potentialId;
......@@ -136,4 +137,12 @@ public class RecruitRequestVO {
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public String getTimeToOnboarding() {
return timeToOnboarding;
}
public void setTimeToOnboarding(String timeToOnboarding) {
this.timeToOnboarding = timeToOnboarding;
}
}
......@@ -117,4 +117,5 @@ public class AclPractitionerPotential implements Serializable {
private Integer updaterType;
private Long customerId;
}
\ No newline at end of file
......@@ -64,6 +64,10 @@ public class AclPractitionerPotentialAssigneds implements Serializable {
* 创建者类型:1为user id(AGMS),2为本人practitioner id(银盾经纪)
*/
private Integer creatorType;
/**
* 备注
*/
private String remark;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ag_acl_practitioner_potential_goals
* @author
*/
@Data
public class AclPractitionerPotentialGoals implements Serializable {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_practitioner.id 经纪人
*/
private Long practitionerId;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* 1:年度,2:季度,3:月度
*/
private Integer statisticTimeUnit;
/**
* 1:年度,3:月度
*/
private Integer seqTime;
/**
* 招聘增员数
*/
private Integer numberRecruits;
/**
* 百万圆桌成员数
*/
private Integer numberMdrt;
/**
* 版本控制
*/
private Date currentVersion;
/**
* 0=No, 1=Yes
*/
private Integer isActive;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ag_acl_practitioner_potential_goals_actions
* @author
*/
@Data
public class AclPractitionerPotentialGoalsActions implements Serializable {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_practitioner.id 经纪人
*/
private Long practitionerId;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* 2:季度,3:月度,4:周
*/
private Integer statisticTimeUnit;
/**
* FK ag_md_drop_options.id 团队长发掘活动drop_master id = 16
*/
private Long potentialActionId;
/**
* FK ag_md_drop_options.drop_option_name 团队长发掘活动drop_master id = 16
*/
private String potentialActionName;
/**
* 报聘(a)= 年目标增员对象/12
报聘面谈 b = a
OPP创说会 c = b * 3
甄选面谈 d = c
增员面谈 e = d * 3
建立名单 f = e
*/
private Integer actionStandards;
/**
* 版本控制
*/
private Date currentVersion;
/**
* 0=No, 1=Yes
*/
private Integer isActive;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.entity.meta;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
......@@ -7,7 +8,7 @@ import lombok.Data;
* 经纪人商机增员目标分摊计算公式
*/
@Data
public class MdGoalsCalculateExpression {
public class MdGoalsCalculateExpression implements Serializable {
/**
* serial id
*/
......@@ -78,4 +79,6 @@ public class MdGoalsCalculateExpression {
private Date updatedAt;
private Long updatedBy;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -28,4 +28,6 @@ public interface AclPractitionerPotentialAssignedTrackMapper {
void updateAll(@Param("assignedTrackUpdateList")List<AclPractitionerPotentialAssignedTrack> assignedTrackUpdateList);
List<AclPractitionerPotentialAssignedTrack> findByPractitionerIdAndPotentialId(@Param("practitionerId")Long practitionerId, @Param("potentialId")Long potentialId);
List<AclPractitionerPotentialAssignedTrack> findScoreByPractitionerIdAndDate(@Param("practitionerId")Long practitionerId, @Param("time")String time);
}
\ No newline at end of file
......@@ -19,4 +19,10 @@ public interface AclPractitionerPotentialAssignedsMapper {
int updateByPrimaryKey(AclPractitionerPotentialAssigneds record);
void insertList(@Param("potentialAssignedsList") List<AclPractitionerPotentialAssigneds> potentialAssignedsList);
List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(@Param("potentialId")Long potentialId, @Param("practitionerId")Long practitionerId);
List<AclPractitionerPotentialAssigneds> findByPractitionerId(@Param("practitionerId")Long practitionerId);
List<AclPractitionerPotentialAssigneds> findByPractitionerIdAndPotentialIdList(@Param("practitionerId")Long practitionerId, @Param("potentialIdList")List<Long> potentialIdList);
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface AclPractitionerPotentialGoalsActionsMapper {
int deleteByPrimaryKey(Long id);
int insert(AclPractitionerPotentialGoalsActions record);
int insertSelective(AclPractitionerPotentialGoalsActions record);
AclPractitionerPotentialGoalsActions selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclPractitionerPotentialGoalsActions record);
int updateByPrimaryKey(AclPractitionerPotentialGoalsActions record);
List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActive(@Param("practitionerId")Long practitionerId, @Param("currentYear") Integer currentYear, @Param("isActive") Integer isActive);
void saveAll(@Param("potentialGoalsActionsList") List<AclPractitionerPotentialGoalsActions> potentialGoalsActionsList);
List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActiveAndTimeUnit(@Param("practitionerId")Long practitionerId, @Param("currentYear")Integer currentYear, @Param("isActive")Integer isActive, @Param("timeType")Integer timeType);
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoals;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface AclPractitionerPotentialGoalsMapper {
int deleteByPrimaryKey(Long id);
int insert(AclPractitionerPotentialGoals record);
int insertSelective(AclPractitionerPotentialGoals record);
AclPractitionerPotentialGoals selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclPractitionerPotentialGoals record);
int updateByPrimaryKey(AclPractitionerPotentialGoals record);
List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYear(@Param("practitionerId") Long practitionerId, @Param("currentYear") Integer currentYear);
void saveAll(@Param("potentialGoalsList")List<AclPractitionerPotentialGoals> potentialGoalsList);
List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYearAndTimeUnit(@Param("practitionerId")Long practitionerId, @Param("currentYear")Integer currentYear, @Param("timeTypeList")List<Integer> timeTypeList);
}
\ No newline at end of file
......@@ -26,4 +26,6 @@ public interface MdDropOptionsMapper {
List<MdDropOptions> findByMasterCodeAndOrderId(@Param("masterCode")String masterCode, @Param("orderId")int orderId);
MdDropOptions selectByMasterCodeAndOptionsCode(@Param("masterCode") String masterCode, @Param("optionsCode") String optionsCode);
List<MdDropOptions> findByMasterCodeAndOptionsCode(@Param("masterCode")String masterCode, @Param("optionsCode")String optionsCode);
}
\ No newline at end of file
package com.yd.dal.mapper.meta;
import com.yd.dal.entity.meta.MdGoalsCalculateExpression;import java.util.List;
import com.yd.dal.entity.meta.MdGoalsCalculateExpression;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface MdGoalsCalculateExpressionMapper {
int deleteByPrimaryKey(Long id);
......@@ -16,4 +18,6 @@ public interface MdGoalsCalculateExpressionMapper {
int updateByPrimaryKey(MdGoalsCalculateExpression record);
List<MdGoalsCalculateExpression> findByMasterId(Long masterId);
List<MdGoalsCalculateExpression> findByMasterCodeAndIsActive(@Param("masterCode") String masterCode, @Param("isActive") Integer isActive);
}
\ No newline at end of file
......@@ -20,4 +20,8 @@ public interface AclPractitionerPotentialAssignedTrackDALService {
void updateAll(List<AclPractitionerPotentialAssignedTrack> assignedTrackUpdateList);
List<AclPractitionerPotentialAssignedTrack> findByPractitionerIdAndPotentialId(Long practitionerId, Long potentialId);
List<AclPractitionerPotentialAssignedTrack> findScoreByPractitionerIdAndDate(Long practitionerId, String time);
void update(AclPractitionerPotentialAssignedTrack assignedTrack);
}
......@@ -9,4 +9,12 @@ import java.util.List;
public interface AclPractitionerPotentialAssignedsDALService {
void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList);
List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(Long potentialId, Long practitionerId);
void update(AclPractitionerPotentialAssigneds assigneds);
List<AclPractitionerPotentialAssigneds> findByPractitionerId(Long practitionerId);
List<AclPractitionerPotentialAssigneds> findByPractitionerIdAndPotentialIdList(Long practitionerId, List<Long> potentialIdList);
}
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("aclPractitionerPotentialGoalsActionsDALService")
public interface AclPractitionerPotentialGoalsActionsDALService {
List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActive(Long practitionerId, Integer currentYear, Integer isActive);
void updateAll(List<AclPractitionerPotentialGoalsActions> potentialGoalsActionsListUpdate);
void saveAll(List<AclPractitionerPotentialGoalsActions> potentialGoalsActionsList);
List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActiveAndTimeUnit(Long practitionerId, Integer currentYear, Integer isActive, Integer timeType);
}
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoals;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("aclPractitionerPotentialGoalsDALService")
public interface AclPractitionerPotentialGoalsDALService {
List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYear(Long practitionerId, Integer currentYear);
void updateList(List<AclPractitionerPotentialGoals> potentialGoalsUpdateList);
void saveAll(List<AclPractitionerPotentialGoals> potentialGoalsList);
List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYearAndTimeUnit(Long practitionerId, Integer currentYear, List<Integer> timeTypeList);
}
......@@ -45,4 +45,14 @@ public class AclPractitionerPotentialAssignedTrackDALServiceImpl implements AclP
public List<AclPractitionerPotentialAssignedTrack> findByPractitionerIdAndPotentialId(Long practitionerId, Long potentialId) {
return aclPractitionerPotentialAssignedTrackMapper.findByPractitionerIdAndPotentialId(practitionerId,potentialId);
}
@Override
public List<AclPractitionerPotentialAssignedTrack> findScoreByPractitionerIdAndDate(Long practitionerId, String time) {
return aclPractitionerPotentialAssignedTrackMapper.findScoreByPractitionerIdAndDate(practitionerId,time);
}
@Override
public void update(AclPractitionerPotentialAssignedTrack assignedTrack) {
aclPractitionerPotentialAssignedTrackMapper.updateByPrimaryKeySelective(assignedTrack);
}
}
......@@ -17,4 +17,24 @@ public class AclPractitionerPotentialAssignedsDALServiceImpl implements AclPract
public void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList) {
aclPractitionerPotentialAssignedsMapper.insertList(potentialAssignedsList);
}
@Override
public List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(Long potentialId, Long practitionerId) {
return aclPractitionerPotentialAssignedsMapper.findByPotentialIdAndPractitionerId(potentialId,practitionerId);
}
@Override
public void update(AclPractitionerPotentialAssigneds assigneds) {
aclPractitionerPotentialAssignedsMapper.updateByPrimaryKeySelective(assigneds);
}
@Override
public List<AclPractitionerPotentialAssigneds> findByPractitionerId(Long practitionerId) {
return aclPractitionerPotentialAssignedsMapper.findByPractitionerId(practitionerId);
}
@Override
public List<AclPractitionerPotentialAssigneds> findByPractitionerIdAndPotentialIdList(Long practitionerId, List<Long> potentialIdList) {
return aclPractitionerPotentialAssignedsMapper.findByPractitionerIdAndPotentialIdList(practitionerId,potentialIdList);
}
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions;
import com.yd.dal.mapper.customer.AclPractitionerPotentialGoalsActionsMapper;
import com.yd.dal.service.customer.AclPractitionerPotentialGoalsActionsDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("aclPractitionerPotentialGoalsActionsDALService")
public class AclPractitionerPotentialGoalsActionsDALServiceImpl implements AclPractitionerPotentialGoalsActionsDALService {
@Resource
private AclPractitionerPotentialGoalsActionsMapper aclPractitionerPotentialGoalsActionsMapper;
@Override
public List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActive(Long practitionerId, Integer currentYear, Integer isActive) {
return aclPractitionerPotentialGoalsActionsMapper.findByPractitionerIdAndCurrentYearAndIsActive(practitionerId,currentYear,isActive);
}
@Override
public void updateAll(List<AclPractitionerPotentialGoalsActions> potentialGoalsActionsListUpdate) {
for(AclPractitionerPotentialGoalsActions item : potentialGoalsActionsListUpdate){
aclPractitionerPotentialGoalsActionsMapper.updateByPrimaryKeySelective(item);
}
}
@Override
public void saveAll(List<AclPractitionerPotentialGoalsActions> potentialGoalsActionsList) {
aclPractitionerPotentialGoalsActionsMapper.saveAll(potentialGoalsActionsList);
}
@Override
public List<AclPractitionerPotentialGoalsActions> findByPractitionerIdAndCurrentYearAndIsActiveAndTimeUnit(Long practitionerId, Integer currentYear, Integer isActive, Integer timeType) {
return aclPractitionerPotentialGoalsActionsMapper.findByPractitionerIdAndCurrentYearAndIsActiveAndTimeUnit(practitionerId,currentYear,isActive,timeType);
}
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclPractitionerPotentialGoals;
import com.yd.dal.mapper.customer.AclPractitionerPotentialGoalsMapper;
import com.yd.dal.service.customer.AclPractitionerPotentialGoalsDALService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("aclPractitionerPotentialGoalsDALService")
public class AclPractitionerPotentialGoalsDALServiceImpl implements AclPractitionerPotentialGoalsDALService {
@Autowired
private AclPractitionerPotentialGoalsMapper aclPractitionerPotentialGoalsMapper;
@Override
public List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYear(Long practitionerId, Integer currentYear) {
return aclPractitionerPotentialGoalsMapper.findByPractitionerAndCurrentYear(practitionerId,currentYear);
}
@Override
public void updateList(List<AclPractitionerPotentialGoals> potentialGoalsUpdateList) {
for(AclPractitionerPotentialGoals item : potentialGoalsUpdateList){
aclPractitionerPotentialGoalsMapper.updateByPrimaryKeySelective(item);
}
}
@Override
public void saveAll(List<AclPractitionerPotentialGoals> potentialGoalsList) {
aclPractitionerPotentialGoalsMapper.saveAll(potentialGoalsList);
}
@Override
public List<AclPractitionerPotentialGoals> findByPractitionerAndCurrentYearAndTimeUnit(Long practitionerId, Integer currentYear, List<Integer> timeTypeList) {
return aclPractitionerPotentialGoalsMapper.findByPractitionerAndCurrentYearAndTimeUnit(practitionerId,currentYear,timeTypeList);
}
}
......@@ -16,4 +16,6 @@ public interface MdDropOptionsDALService {
List<MdDropOptions> findByMasterCodeAndOrderId(String masterCode, int orderId);
MdDropOptions selectByMasterCodeAndOptionsCode(String masterCode, String optionsCode);
List<MdDropOptions> findByMasterCodeAndOptionsCode(String team_building_track, String s);
}
package com.yd.dal.service.meta;
import com.yd.dal.entity.meta.MdGoalsCalculateExpression;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("mdGoalsCalculateExpressionDALService")
public interface MdGoalsCalculateExpressionDALService {
List<MdGoalsCalculateExpression> findByMasterCodeAndIsActive(String masterCode, Integer isActive);
}
......@@ -48,4 +48,8 @@ public class MdDropOptionsDALServiceImpl implements MdDropOptionsDALService {
public MdDropOptions selectByMasterCodeAndOptionsCode(String masterCode, String optionsCode) {
return mdDropOptionsMapper.selectByMasterCodeAndOptionsCode(masterCode, optionsCode);
}
@Override
public List<MdDropOptions> findByMasterCodeAndOptionsCode(String masterCode, String optionsCode) {
return mdDropOptionsMapper.findByMasterCodeAndOptionsCode(masterCode,optionsCode);
}
}
package com.yd.dal.service.meta.impl;
import com.yd.dal.entity.meta.MdGoalsCalculateExpression;
import com.yd.dal.mapper.meta.MdGoalsCalculateExpressionMapper;
import com.yd.dal.service.meta.MdGoalsCalculateExpressionDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("MdGoalsCalculateExpressionDALService")
public class MdGoalsCalculateExpressionDALServiceImpl implements MdGoalsCalculateExpressionDALService {
@Resource
private MdGoalsCalculateExpressionMapper mdGoalsCalculateExpressionMapper;
@Override
public List<MdGoalsCalculateExpression> findByMasterCodeAndIsActive(String masterCode, Integer isActive) {
return mdGoalsCalculateExpressionMapper.findByMasterCodeAndIsActive(masterCode,isActive);
}
}
......@@ -301,4 +301,28 @@
where id = #{item.id,jdbcType=BIGINT}
</foreach>
</update>
<select id="findScoreByPractitionerIdAndDate" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigned_track
where practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT} and track_score > 0
<choose>
<when test="time == 'today'">
and to_days(track_time) = to_days(now())
</when>
<when test="time == 'week'">
and yearweek(date_format(track_time,'%Y-%m-%d') = yearweek(NOW())
</when>
<when test="time == 'month'">
and date_format(track_time,'%Y%m') = date_format(curdate(),'%Y%m')
</when>
<when test="time == 'quarter'">
and QUARTER(track_time) = QUARTER(NOW()) AND year(track_time)=year(now())
</when>
<otherwise>
and YEAR(track_time) = YEAR(now())
</otherwise>
</choose>
</select>
</mapper>
\ No newline at end of file
......@@ -13,10 +13,11 @@
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="updater_type" jdbcType="INTEGER" property="updaterType" />
<result column="creator_type" jdbcType="INTEGER" property="creatorType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, assigned_practitioner_id, practitioner_potential_id, time_to_onboarding, is_active,
created_at, created_by, updated_at, updated_by, updater_type, creator_type
created_at, created_by, updated_at, updated_by, updater_type, creator_type,remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
......@@ -24,7 +25,29 @@
from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<select id="findByPotentialIdAndPractitionerId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigneds
where practitioner_potential_id = #{potentialId,jdbcType=BIGINT} and assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select id="findByPractitionerId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigneds
where assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select id="findByPractitionerIdAndPotentialIdList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigneds
where assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
and practitioner_potential_id in
<foreach collection="potentialIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT}
</delete>
......@@ -32,11 +55,11 @@
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by,
updater_type, creator_type)
updater_type, creator_type,remark)
values (#{assignedPractitionerId,jdbcType=BIGINT}, #{practitionerPotentialId,jdbcType=BIGINT},
#{timeToOnboarding,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER})
#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_assigneds
......@@ -71,6 +94,9 @@
<if test="creatorType != null">
creator_type,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assignedPractitionerId != null">
......@@ -103,6 +129,9 @@
<if test="creatorType != null">
#{creatorType,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds">
......@@ -138,6 +167,9 @@
<if test="creatorType != null">
creator_type = #{creatorType,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -152,14 +184,15 @@
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
updater_type = #{updaterType,jdbcType=INTEGER},
creator_type = #{creatorType,jdbcType=INTEGER}
creator_type = #{creatorType,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="insertList" parameterType="java.util.List" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by,
updater_type, creator_type)
updater_type, creator_type,remark)
values
<foreach collection="potentialAssignedsList" item="item" index="index" separator=",">
(
......@@ -172,7 +205,8 @@
#{item.updatedAt},
#{item.updatedBy},
#{item.updaterType},
#{item.creatorType}
#{item.creatorType},
#{item.remark}
)
</foreach>
</insert>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.customer.AclPractitionerPotentialGoalsActionsMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
<result column="potential_action_id" jdbcType="BIGINT" property="potentialActionId" />
<result column="potential_action_name" jdbcType="VARCHAR" property="potentialActionName" />
<result column="action_standards" jdbcType="INTEGER" property="actionStandards" />
<result column="current_version" jdbcType="TIMESTAMP" property="currentVersion" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
id, practitioner_id, current_year, statistic_time_unit, potential_action_id, potential_action_name,
action_standards, current_version, is_active, created_at, created_by, updated_at,
updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals_actions
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_practitioner_potential_goals_actions
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_goals_actions (practitioner_id, current_year, statistic_time_unit,
potential_action_id, potential_action_name,
action_standards, current_version, is_active,
created_at, created_by, updated_at,
updated_by)
values (#{practitionerId,jdbcType=BIGINT}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{potentialActionId,jdbcType=BIGINT}, #{potentialActionName,jdbcType=VARCHAR},
#{actionStandards,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_goals_actions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="currentYear != null">
current_year,
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit,
</if>
<if test="potentialActionId != null">
potential_action_id,
</if>
<if test="potentialActionName != null">
potential_action_name,
</if>
<if test="actionStandards != null">
action_standards,
</if>
<if test="currentVersion != null">
current_version,
</if>
<if test="isActive != null">
is_active,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT},
</if>
<if test="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
#{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="potentialActionId != null">
#{potentialActionId,jdbcType=BIGINT},
</if>
<if test="potentialActionName != null">
#{potentialActionName,jdbcType=VARCHAR},
</if>
<if test="actionStandards != null">
#{actionStandards,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
#{currentVersion,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions">
update ag_acl_practitioner_potential_goals_actions
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="potentialActionId != null">
potential_action_id = #{potentialActionId,jdbcType=BIGINT},
</if>
<if test="potentialActionName != null">
potential_action_name = #{potentialActionName,jdbcType=VARCHAR},
</if>
<if test="actionStandards != null">
action_standards = #{actionStandards,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
current_version = #{currentVersion,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoalsActions">
update ag_acl_practitioner_potential_goals_actions
set practitioner_id = #{practitionerId,jdbcType=BIGINT},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
potential_action_id = #{potentialActionId,jdbcType=BIGINT},
potential_action_name = #{potentialActionName,jdbcType=VARCHAR},
action_standards = #{actionStandards,jdbcType=INTEGER},
current_version = #{currentVersion,jdbcType=TIMESTAMP},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByPractitionerIdAndCurrentYearAndIsActive" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals_actions
where practitioner_id = #{practitionerId,jdbcType=BIGINT} and is_active = #{isActive,jdbcType=INTEGER} and current_year = #{currentYear,jdbcType=INTEGER}
</select>
<insert id="saveAll" parameterType="java.util.List" useGeneratedKeys="true" >
insert into ag_acl_practitioner_potential_goals_actions (practitioner_id, current_year, statistic_time_unit,
potential_action_id, potential_action_name,
action_standards, current_version, is_active,
created_at, created_by, updated_at,
updated_by)
values
<foreach collection="potentialGoalsActionsList" item="item" index="index" separator=",">
(
#{item.practitionerId},
#{item.currentYear},
#{item.statisticTimeUnit},
#{item.potentialActionId},
#{item.potentialActionName},
#{item.actionStandards},
#{item.currentVersion},
#{item.isActive},
#{item.createdAt},
#{item.createdBy},
#{item.updatedAt},
#{item.updatedBy}
)
</foreach>
</insert>
<select id="findByPractitionerIdAndCurrentYearAndIsActiveAndTimeUnit" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals_actions
where practitioner_id = #{practitionerId,jdbcType=BIGINT} and is_active = #{isActive,jdbcType=INTEGER} and current_year = #{currentYear,jdbcType=INTEGER} and statistic_time_unit = #{timeType,jdbcType=INTEGER}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.customer.AclPractitionerPotentialGoalsMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclPractitionerPotentialGoals">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
<result column="seq_time" jdbcType="INTEGER" property="seqTime" />
<result column="number_recruits" jdbcType="INTEGER" property="numberRecruits" />
<result column="number_mdrt" jdbcType="INTEGER" property="numberMdrt" />
<result column="current_version" jdbcType="TIMESTAMP" property="currentVersion" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
id, practitioner_id, current_year, statistic_time_unit, seq_time, number_recruits,
number_mdrt, current_version, is_active, created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_practitioner_potential_goals
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoals" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_goals (practitioner_id, current_year, statistic_time_unit,
seq_time, number_recruits, number_mdrt,
current_version, is_active, created_at,
created_by, updated_at, updated_by
)
values (#{practitionerId,jdbcType=BIGINT}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{seqTime,jdbcType=INTEGER}, #{numberRecruits,jdbcType=INTEGER}, #{numberMdrt,jdbcType=INTEGER},
#{currentVersion,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoals" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_goals
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="currentYear != null">
current_year,
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit,
</if>
<if test="seqTime != null">
seq_time,
</if>
<if test="numberRecruits != null">
number_recruits,
</if>
<if test="numberMdrt != null">
number_mdrt,
</if>
<if test="currentVersion != null">
current_version,
</if>
<if test="isActive != null">
is_active,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT},
</if>
<if test="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
#{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="seqTime != null">
#{seqTime,jdbcType=INTEGER},
</if>
<if test="numberRecruits != null">
#{numberRecruits,jdbcType=INTEGER},
</if>
<if test="numberMdrt != null">
#{numberMdrt,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
#{currentVersion,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoals">
update ag_acl_practitioner_potential_goals
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="seqTime != null">
seq_time = #{seqTime,jdbcType=INTEGER},
</if>
<if test="numberRecruits != null">
number_recruits = #{numberRecruits,jdbcType=INTEGER},
</if>
<if test="numberMdrt != null">
number_mdrt = #{numberMdrt,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
current_version = #{currentVersion,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialGoals">
update ag_acl_practitioner_potential_goals
set practitioner_id = #{practitionerId,jdbcType=BIGINT},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
seq_time = #{seqTime,jdbcType=INTEGER},
number_recruits = #{numberRecruits,jdbcType=INTEGER},
number_mdrt = #{numberMdrt,jdbcType=INTEGER},
current_version = #{currentVersion,jdbcType=TIMESTAMP},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByPractitionerAndCurrentYear" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals
where practitioner_id = #{practitionerId,jdbcType=BIGINT} and current_year = #{currentYear,jdbcType=INTEGER} and is_active = 1
</select>
<insert id="saveAll" parameterType="java.util.List" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_goals (practitioner_id, current_year, statistic_time_unit,
seq_time, number_recruits, number_mdrt,
current_version, is_active, created_at,
created_by, updated_at, updated_by
)
values
<foreach collection="potentialGoalsList" item="item" index="index" separator=",">
(
#{item.practitionerId},
#{item.currentYear},
#{item.statisticTimeUnit},
#{item.seqTime},
#{item.numberRecruits},
#{item.numberMdrt},
#{item.currentVersion},
#{item.isActive},
#{item.createdAt},
#{item.createdBy},
#{item.updatedAt},
#{item.updatedBy}
)
</foreach>
</insert>
<select id="findByPractitionerAndCurrentYearAndTimeUnit" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_goals
where practitioner_id = #{practitionerId,jdbcType=BIGINT} and current_year = #{currentYear,jdbcType=INTEGER} and is_active = 1 and statistic_time_unit in
<foreach collection="timeTypeList" item="timeType" open="(" separator="," close=")">
#{timeType}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -227,4 +227,19 @@
and o.is_active=1
and m.is_active=1
</select>
<select id="findByMasterCodeAndOptionsCode" resultType="com.yd.dal.entity.meta.MdDropOptions">
select
o.id id,
o.drop_master_id dropMasterId,
o.drop_option_name dropOptionName,
o.drop_option_code dropOptionCode,
o.drop_option_order dropOptionOrder,
o.drop_option_score dropOptionScore,
o.drop_option_remark dropOptionRemark,
o.is_active isActive,
o.created_at createdAt,
o.created_by createdBy
from ag_md_drop_master m left join ag_md_drop_options o on m.id = o.drop_master_id and o.is_active = 1 and o.drop_option_code = #{optionsCode,jdbcType=VARCHAR}
where m.scenario_code = #{masterCode,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
......@@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.meta.MdGoalsCalculateExpressionMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.meta.MdGoalsCalculateExpression">
<!--@mbg.generated-->
<!--@Table ag_md_goals_calculate_expression-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="drop_master_id" jdbcType="BIGINT" property="dropMasterId" />
......@@ -18,35 +16,30 @@
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, current_year, drop_master_id, drop_master_name, action_id, drop_option_name,
calculate_script_expression, is_active, created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_md_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_md_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.meta.MdGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_md_goals_calculate_expression (current_year, drop_master_id, drop_master_name,
action_id, drop_option_name, calculate_script_expression,
is_active, created_at, created_by,
updated_at, updated_by)
values (#{currentYear,jdbcType=INTEGER}, #{dropMasterId,jdbcType=BIGINT}, #{dropMasterName,jdbcType=VARCHAR},
#{actionId,jdbcType=BIGINT}, #{dropOptionName,jdbcType=VARCHAR}, #{calculateScriptExpression,jdbcType=LONGVARCHAR},
values (#{currentYear,jdbcType=INTEGER}, #{dropMasterId,jdbcType=BIGINT}, #{dropMasterName,jdbcType=VARCHAR},
#{actionId,jdbcType=BIGINT}, #{dropOptionName,jdbcType=VARCHAR}, #{calculateScriptExpression,jdbcType=LONGVARCHAR},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.meta.MdGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_md_goals_calculate_expression
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="currentYear != null">
......@@ -120,7 +113,6 @@
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.meta.MdGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_md_goals_calculate_expression
<set>
<if test="currentYear != null">
......@@ -160,7 +152,6 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.meta.MdGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_md_goals_calculate_expression
set current_year = #{currentYear,jdbcType=INTEGER},
drop_master_id = #{dropMasterId,jdbcType=BIGINT},
......@@ -186,4 +177,22 @@
and e.is_active = 1
order by o.drop_option_order;
</select>
<select id="findByMasterCodeAndIsActive" resultType="com.yd.dal.entity.meta.MdGoalsCalculateExpression">
select
e.id id,
e.current_year currentYear,
e.drop_master_id dropMasterId,
e.drop_master_name dropMasterName,
e.action_id actionId,
e.drop_option_name dropOptionName,
e.calculate_script_expression calculateScriptExpression,
e.is_active isActive,
e.created_at createdAt,
e.created_by createdBy,
e.updated_at updatedAt,
e.updated_by updatedBy
from ag_md_drop_master m left join ag_md_goals_calculate_expression e on m.id = e.drop_master_id and e.is_active = #{isActive,jdbcType=INTEGER}
where m.scenario_code = #{masterCode,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