Commit bc177ace by yao.xiao

增加-保存经纪人录入商机年度目标月目标

parent fdfc3604
......@@ -9,6 +9,8 @@ import com.yd.api.practitioner.vo.opportunity.*;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.recruit.*;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO;
import com.yd.api.practitioner.vo.setting.*;
import com.yd.api.result.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -221,6 +223,14 @@ public class PractitionerController {
}
/**
* 保存商机目标
* 保存销售目标
*/
@RequestMapping("/salesTargetSave")
public Object salesTargetSave(@RequestBody SalesTargetSaveRequestVO requestVO){
JsonResult result = new JsonResult();
SalesTargetSaveResponseVO responseVO = practitionerService.salesTargetSave(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
}
......@@ -8,6 +8,8 @@ import com.yd.api.practitioner.vo.opportunity.*;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.recruit.*;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO;
import com.yd.api.practitioner.vo.setting.*;
import org.springframework.stereotype.Service;
......@@ -116,4 +118,11 @@ public interface PractitionerService {
* @return
*/
OpportunityStatisticsResponseVO opportunityStatistics(OpportunityStatisticsRequestVO requestVO);
/**
* 保存销售目标
* @param requestVO
* @return
*/
SalesTargetSaveResponseVO salesTargetSave(SalesTargetSaveRequestVO requestVO);
}
......@@ -15,22 +15,19 @@ import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.rank.PractitionerInfoForAchievement;
import com.yd.api.practitioner.vo.recruit.*;
import com.yd.api.practitioner.vo.salestarget.SalesTargetMonth;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO;
import com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO;
import com.yd.api.practitioner.vo.setting.*;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.*;
import com.yd.dal.entity.marketing.MktLeadsAssignedTrack;
import com.yd.dal.entity.marketing.MktLeadsAssigneds;
import com.yd.dal.entity.marketing.MktLeadsPool;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.entity.meta.MdMkCampaign;
import com.yd.dal.entity.meta.MdTag;
import com.yd.dal.entity.meta.ObjectCollectionTagged;
import com.yd.dal.entity.marketing.*;
import com.yd.dal.entity.meta.*;
import com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo;
import com.yd.dal.entity.order.PoOrder;
import com.yd.dal.entity.survey.SurveyCustomerAnswers;
import com.yd.dal.service.customer.*;
import com.yd.dal.service.marketing.MktLeadsAssignedTrackDALService;
import com.yd.dal.service.marketing.MktLeadsAssignedsDALService;
import com.yd.dal.service.marketing.*;
import com.yd.dal.service.meta.*;
import com.yd.dal.service.order.PoOrderDALService;
import com.yd.dal.service.survey.SurveyCustomerAnswersDALService;
......@@ -117,6 +114,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private AclPractitionerPotentialAssignedsDALService aclPractitionerPotentialAssignedsDALService;
@Autowired
private SystemConfigService systemConfigService;
@Autowired
private MktLeadsGoalsDALService mktLeadsGoalsDALService;
@Autowired
private MdDropMasterDALService mdDropMasterDALService;
@Override
public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) {
......@@ -311,6 +312,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
@Override
@SuppressWarnings("unchecked")
public SettingQueryResponseVO settingQuery(SettingQueryRequestVO requestVO) {
SettingQueryResponseVO responseVO = new SettingQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId();//入参经纪人id
......@@ -692,6 +694,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
* @param requestVO
* @return
*/
@SuppressWarnings("unchecked")
private List<OpportunitySurveyAnswers> findSurveyAnswers(OwnOpportunityDetailQueryRequestVO requestVO) {
Long customerId = requestVO.getOpportunityId();
Long orderId = requestVO.getOrderId();
......@@ -722,6 +725,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return req;
}
@SuppressWarnings("unchecked")
private List<OpportunityRecordInfo> getOpportunityRecords(OwnOpportunityDetailQueryRequestVO requestVO) {
Long practitionerId = requestVO.getPractitionerId();
Long customerId = requestVO.getOpportunityId();
......@@ -1326,6 +1330,89 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return resp;
}
@Override
public SalesTargetSaveResponseVO salesTargetSave(SalesTargetSaveRequestVO requestVO) {
SalesTargetSaveResponseVO responseVO = new SalesTargetSaveResponseVO();
//经纪人id
Long practitionerId = requestVO.getPractitionerId();
//当前年份
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
//保存年目标
Date date = new Date();
saveYearGoal(requestVO,practitionerId,date,year);
//保存月目标
List<SalesTargetMonth> salesTargetMonths = requestVO.getSalesTargetMonths();
for(SalesTargetMonth info: salesTargetMonths){
saveMonthGoal(info,practitionerId,date,year);
}
//保存经纪人商机活动量均分
MdDropMaster mdDropMaster = mdDropMasterDALService.findByScenarioCode("bizchance_promotion_action");
Long masterId = mdDropMaster.getId();
//查询出所有计算公式
BeanUtils.copyProperties(requestVO,responseVO);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
}
/**
* 保存月度商机目标
* @param info
* @param practitionerId 经纪人id
* @param date 版本号
* @param year 当前年份
*/
private void saveMonthGoal(SalesTargetMonth info, Long practitionerId, Date date,int year) {
MktLeadsGoals mktLeadsGoals = new MktLeadsGoals();
mktLeadsGoals.setPractitionerId(practitionerId.toString());
mktLeadsGoals.setPremium(info.getPremium());
mktLeadsGoals.setCommission(info.getCommission());
mktLeadsGoals.setPieces(info.getPieces());
mktLeadsGoals.setPieceAveragePremium(info.getPieceAveragePremium());
mktLeadsGoals.setCurrentYear(year);
mktLeadsGoals.setStatisticTimeUnit(3);
mktLeadsGoals.setSeqTime(info.getMonthNum());
mktLeadsGoals.setCurrentVersion(date);
mktLeadsGoals.setCreatedAt(new Date());
mktLeadsGoals.setCreatedBy(practitionerId);
mktLeadsGoals.setUpdatedAt(new Date());
mktLeadsGoals.setUpdatedBy(practitionerId);
mktLeadsGoals.setIsActive(1);
mktLeadsGoalsDALService.saveMktLeadsGoals(mktLeadsGoals);
}
/**
* 保存商机年目标
* @param requestVO
* @param practitionerId 经纪人id
* @param date 版本号
* @param year 当前年份
*/
private void saveYearGoal(SalesTargetSaveRequestVO requestVO,Long practitionerId,Date date,int year) {
Integer premium = requestVO.getPremium();
Integer commission = requestVO.getCommission();
Integer pieces = requestVO.getPieces();
Integer pieceAveragePremium = requestVO.getPieceAveragePremium();
MktLeadsGoals mktLeadsGoals = new MktLeadsGoals();
mktLeadsGoals.setPractitionerId(practitionerId.toString());
mktLeadsGoals.setPremium(premium);
mktLeadsGoals.setCommission(commission);
mktLeadsGoals.setPieces(pieces);
mktLeadsGoals.setPieceAveragePremium(pieceAveragePremium);
mktLeadsGoals.setCurrentYear(year);
mktLeadsGoals.setStatisticTimeUnit(1);
mktLeadsGoals.setCurrentVersion(date);
mktLeadsGoals.setCreatedAt(new Date());
mktLeadsGoals.setCreatedBy(practitionerId);
mktLeadsGoals.setUpdatedAt(new Date());
mktLeadsGoals.setUpdatedBy(practitionerId);
mktLeadsGoals.setIsActive(1);
mktLeadsGoalsDALService.saveMktLeadsGoals(mktLeadsGoals);
}
private CommonResult check(OwnOpportunityRecordSaveRequestVO requestVO) {
String noticeDate = requestVO.getNoticeDate();
if (CommonUtil.isNullOrBlank(noticeDate)){
......
package com.yd.api.practitioner.vo.salestarget;
import lombok.Data;
@Data
public class SalesTargetActions {
private Integer statisticTimeUnit;
private Integer leadsActionId;
private Integer leadsActionName;
private Integer actionStandards;
}
package com.yd.api.practitioner.vo.salestarget;
import lombok.Data;
@Data
public class SalesTargetMonth {
private Integer premium;
private Integer commission;
private Integer pieces;
private Integer pieceAveragePremium;
private Integer monthNum;
}
package com.yd.api.practitioner.vo.salestarget;
import lombok.Data;
import java.util.List;
@Data
public class SalesTargetSaveRequestVO {
private Long practitionerId;
private Integer premium;
private Integer commission;
private Integer pieces;
private Integer pieceAveragePremium;
private List<SalesTargetMonth> salesTargetMonths;
}
package com.yd.api.practitioner.vo.salestarget;
import com.yd.api.result.CommonResult;
import lombok.Data;
import java.util.List;
@Data
public class SalesTargetSaveResponseVO {
private Long practitionerId;
private Integer premium;
private Integer commission;
private Integer pieces;
private Integer pieceAveragePremium;
private List<SalesTargetMonth> salesTargetMonths;
private List<SalesTargetActions> salesTargetActions;
private CommonResult commonResult;
}
package com.yd.dal.entity.marketing;
import java.util.Date;
import lombok.Data;
/**
* 经纪人商机增员目标分摊计算公式
*/
@Data
public class MktGoalsCalculateExpression {
/**
* serial id
*/
private Long id;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* FK ag_md_drop_master.id 商机销售行动drop_master id = 14 or 经纪人增员活动16
*/
private Integer dropMasterId;
/**
* FK ag_md_drop_options.id 商机销售行动drop_master id = 14 or 16
*/
private Integer actionId;
/**
* javascript计算公式,参数:成交件数,
成交件数a
建议书数量b = a * 3
见面沟通次数c = a * 3
电话/微信沟通次数d = a * 9
安排见面次数f = a * 27
获取商机次数g = a * 27
报聘(a)= 年目标增员对象/12
报聘面谈 b = a
OPP创说会 c = a * 3
甄选面谈 d = a * 3
增员面谈 e = a * 9
建立名单 f = a * 9
*/
private String calculateScriptExpression;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
}
\ No newline at end of file
......@@ -29,6 +29,11 @@ public class MktLeadsGoals {
private Integer statisticTimeUnit;
/**
* 1:年度,3:月度
*/
private Integer seqTime;
/**
* 保费
*/
private Integer premium;
......@@ -54,6 +59,11 @@ public class MktLeadsGoals {
private Date currentVersion;
/**
* 0=No, 1=Yes
*/
private Integer isActive;
/**
* 创建时间
*/
private Date createdAt;
......
package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktGoalsCalculateExpression;
public interface MktGoalsCalculateExpressionMapper {
int deleteByPrimaryKey(Long id);
int insert(MktGoalsCalculateExpression record);
int insertSelective(MktGoalsCalculateExpression record);
MktGoalsCalculateExpression selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(MktGoalsCalculateExpression record);
int updateByPrimaryKey(MktGoalsCalculateExpression record);
}
\ No newline at end of file
......@@ -14,4 +14,6 @@ public interface MdDropMasterMapper {
int updateByPrimaryKeySelective(MdDropMaster record);
int updateByPrimaryKey(MdDropMaster record);
MdDropMaster findByScenarioCode(String scenarioCode);
}
\ No newline at end of file
package com.yd.dal.service.marketing.Impl;
import com.yd.dal.entity.marketing.MktLeadsGoals;
import com.yd.dal.mapper.marketing.MktLeadsGoalsMapper;
import com.yd.dal.service.marketing.MktLeadsGoalsDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service("mktLeadsGoalsDALService")
public class MktLeadsGoalsDALServiceImpl implements MktLeadsGoalsDALService {
@Resource
private MktLeadsGoalsMapper mktLeadsGoalsMapper;
@Override
public void saveMktLeadsGoals(MktLeadsGoals mktLeadsGoals) {
mktLeadsGoalsMapper.insertSelective(mktLeadsGoals);
}
}
package com.yd.dal.service.meta.impl;
package com.yd.dal.service.marketing.Impl;
import com.yd.dal.entity.marketing.MktLeadsPool;
import com.yd.dal.mapper.marketing.MktLeadsAssignedsMapper;
import com.yd.dal.mapper.marketing.MktLeadsPoolMapper;
import com.yd.dal.service.meta.MktLeadsPoolDALService;
import com.yd.dal.service.marketing.MktLeadsPoolDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......
package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoals;
public interface MktLeadsGoalsDALService {
void saveMktLeadsGoals(MktLeadsGoals mktLeadsGoals);
}
package com.yd.dal.service.meta;
package com.yd.dal.service.marketing;
import com.yd.dal.entity.marketing.MktLeadsPool;
......
package com.yd.dal.service.meta;
import com.yd.dal.entity.meta.MdDropMaster;
public interface MdDropMasterDALService {
MdDropMaster findByScenarioCode(String scenarioCode);
}
package com.yd.dal.service.meta;
import org.springframework.stereotype.Service;
import com.yd.dal.entity.meta.MdDropOptions;
import java.util.List;
@Service("mdDropOptionsDALService")
public interface MdDropOptionsDALService {
List<MdDropOptions> findByDropMasterId(long dropMasterId);
......
package com.yd.dal.service.meta.impl;
import com.yd.dal.entity.meta.MdDropMaster;
import com.yd.dal.mapper.meta.MdDropMasterMapper;
import com.yd.dal.service.meta.MdDropMasterDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service("mdDropMasterDALService")
public class MdDropMasterDALServiceImpl implements MdDropMasterDALService {
@Resource
private MdDropMasterMapper mdDropMasterMapper;
@Override
public MdDropMaster findByScenarioCode(String scenarioCode) {
return mdDropMasterMapper.findByScenarioCode(scenarioCode);
}
}
<?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.marketing.MktGoalsCalculateExpressionMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
<!--@Table ag_mkt_goals_calculate_expression-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="drop_master id" jdbcType="INTEGER" property="dropMasterId" />
<result column="action_id" jdbcType="INTEGER" property="actionId" />
<result column="calculate_script_expression" jdbcType="LONGVARCHAR" property="calculateScriptExpression" />
<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">
<!--@mbg.generated-->
id, current_year, `drop_master id`, action_id, calculate_script_expression, 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_mkt_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_mkt_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_goals_calculate_expression (current_year, `drop_master id`, action_id,
calculate_script_expression, created_at,
created_by, updated_at, updated_by
)
values (#{currentYear,jdbcType=INTEGER}, #{dropMasterId,jdbcType=INTEGER}, #{actionId,jdbcType=INTEGER},
#{calculateScriptExpression,jdbcType=LONGVARCHAR}, #{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.marketing.MktGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_goals_calculate_expression
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="currentYear != null">
current_year,
</if>
<if test="dropMasterId != null">
`drop_master id`,
</if>
<if test="actionId != null">
action_id,
</if>
<if test="calculateScriptExpression != null">
calculate_script_expression,
</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="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="dropMasterId != null">
#{dropMasterId,jdbcType=INTEGER},
</if>
<if test="actionId != null">
#{actionId,jdbcType=INTEGER},
</if>
<if test="calculateScriptExpression != null">
#{calculateScriptExpression,jdbcType=LONGVARCHAR},
</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.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_mkt_goals_calculate_expression
<set>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="dropMasterId != null">
`drop_master id` = #{dropMasterId,jdbcType=INTEGER},
</if>
<if test="actionId != null">
action_id = #{actionId,jdbcType=INTEGER},
</if>
<if test="calculateScriptExpression != null">
calculate_script_expression = #{calculateScriptExpression,jdbcType=LONGVARCHAR},
</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.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_mkt_goals_calculate_expression
set current_year = #{currentYear,jdbcType=INTEGER},
`drop_master id` = #{dropMasterId,jdbcType=INTEGER},
action_id = #{actionId,jdbcType=INTEGER},
calculate_script_expression = #{calculateScriptExpression,jdbcType=LONGVARCHAR},
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>
</mapper>
\ No newline at end of file
......@@ -8,11 +8,13 @@
<result column="practitioner_id" jdbcType="VARCHAR" 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="premium" jdbcType="INTEGER" property="premium" />
<result column="commission" jdbcType="INTEGER" property="commission" />
<result column="pieces" jdbcType="INTEGER" property="pieces" />
<result column="piece_average_premium" jdbcType="INTEGER" property="pieceAveragePremium" />
<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" />
......@@ -20,8 +22,9 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, practitioner_id, current_year, statistic_time_unit, premium, commission, pieces,
piece_average_premium, current_version, created_at, created_by, updated_at, updated_by
id, practitioner_id, current_year, statistic_time_unit, seq_time, premium, commission,
pieces, piece_average_premium, current_version, is_active, created_at, created_by,
updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
......@@ -38,15 +41,15 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_leads_goals (practitioner_id, current_year, statistic_time_unit,
premium, commission, pieces,
piece_average_premium, current_version,
created_at, created_by, updated_at,
updated_by)
seq_time, premium, commission,
pieces, piece_average_premium, current_version,
is_active, created_at, created_by,
updated_at, updated_by)
values (#{practitionerId,jdbcType=VARCHAR}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER}, #{pieces,jdbcType=INTEGER},
#{pieceAveragePremium,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
#{seqTime,jdbcType=INTEGER}, #{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER},
#{pieces,jdbcType=INTEGER}, #{pieceAveragePremium,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.marketing.MktLeadsGoals" useGeneratedKeys="true">
<!--@mbg.generated-->
......@@ -61,6 +64,9 @@
<if test="statisticTimeUnit != null">
statistic_time_unit,
</if>
<if test="seqTime != null">
seq_time,
</if>
<if test="premium != null">
premium,
</if>
......@@ -76,6 +82,9 @@
<if test="currentVersion != null">
current_version,
</if>
<if test="isActive != null">
is_active,
</if>
<if test="createdAt != null">
created_at,
</if>
......@@ -99,6 +108,9 @@
<if test="statisticTimeUnit != null">
#{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="seqTime != null">
#{seqTime,jdbcType=INTEGER},
</if>
<if test="premium != null">
#{premium,jdbcType=INTEGER},
</if>
......@@ -114,6 +126,9 @@
<if test="currentVersion != null">
#{currentVersion,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
......@@ -141,6 +156,9 @@
<if test="statisticTimeUnit != null">
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="seqTime != null">
seq_time = #{seqTime,jdbcType=INTEGER},
</if>
<if test="premium != null">
premium = #{premium,jdbcType=INTEGER},
</if>
......@@ -156,6 +174,9 @@
<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>
......@@ -177,11 +198,13 @@
set practitioner_id = #{practitionerId,jdbcType=VARCHAR},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
seq_time = #{seqTime,jdbcType=INTEGER},
premium = #{premium,jdbcType=INTEGER},
commission = #{commission,jdbcType=INTEGER},
pieces = #{pieces,jdbcType=INTEGER},
piece_average_premium = #{pieceAveragePremium,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},
......
......@@ -131,4 +131,10 @@
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByScenarioCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_md_drop_master
where scenario_code like #{scenarioCode,jdbcType=BIGINT}
</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