Commit cb936495 by jianan

线上线下FYC和活动时间

parent 671f64e0
...@@ -323,7 +323,8 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -323,7 +323,8 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
for (PersonalPEPScore online: saleAndRecuit ) { for (PersonalPEPScore online: saleAndRecuit ) {
for (PersonalOffLineFYC offline: personalOffLineFYCList) { for (PersonalOffLineFYC offline: personalOffLineFYCList) {
if (online.getMobileNo().equals(offline.getMobileNo())) { if (online.getMobileNo().equals(offline.getMobileNo())) {
online.getFYC().add(offline.getFYC()); BigDecimal totalFYC = online.getFYC().add(offline.getFYC());
online.setFYC(totalFYC);
break; break;
} }
} }
......
...@@ -144,6 +144,8 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService { ...@@ -144,6 +144,8 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService {
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN) @TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<PersonalOffLineFYC> offLineFYC(List<String> mobileNoList) { public List<PersonalOffLineFYC> offLineFYC(List<String> mobileNoList) {
List<PersonalOffLineFYC> personalOffLineFYCList = agmsDashboardMapper.personalOffLineFYC(mobileNoList); List<PersonalOffLineFYC> personalOffLineFYCList = agmsDashboardMapper.personalOffLineFYC(mobileNoList);
System.out.println("看看线下FYC");
System.out.println(personalOffLineFYCList);
return personalOffLineFYCList; return personalOffLineFYCList;
} }
} }
...@@ -285,14 +285,15 @@ where ps.practitioner_type_id = 28 ...@@ -285,14 +285,15 @@ where ps.practitioner_type_id = 28
<select id="personalOffLineFYC" resultType="com.yd.dal.entity.practitioner.PersonalOffLineFYC"> <select id="personalOffLineFYC" resultType="com.yd.dal.entity.practitioner.PersonalOffLineFYC">
SELECT DISTINCT SELECT DISTINCT
sales.SAL_MST_MOBILE mobileNo, sales.SAL_MST_MOBILE mobileNo,
sum(case when date_format(policy.INS_MST_SEND_DATE,'%Y-%m')=date_format(now(),'%Y-%m') then COALESCE(policy.INS001_FYCTOTAL,0) else 0 end) FYC ifnull(sum(policy.INS001_FYCTOTAL),0) FYC
FROM sal001 sales LEFT JOIN ins003 p_sales on sales.SAL_MST_ID = p_sales.FK_SAL_MST_ID FROM sal001 sales LEFT JOIN ins003 p_sales on sales.SAL_MST_ID = p_sales.FK_SAL_MST_ID
LEFT JOIN ins001 policy on policy.INS_MST_ID = p_sales.FK_INS_MST_ID LEFT JOIN ins001 policy on policy.INS_MST_ID = p_sales.FK_INS_MST_ID
WHERE policy.INS_MST_REPEAL != 1 WHERE policy.INS_MST_REPEAL != 1
AND sales.SAL_MST_MOBILE in AND DATE_FORMAT(policy.INS_MST_ACCEPT_DATE, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
<foreach collection="list" item="mobileNo" index="index" open="(" close=")" separator=","> AND sales.SAL_MST_MOBILE in
#{mobileNo,jdbcType=VARCHAR} <foreach collection="list" item="mobileNo" index="index" open="(" close=")" separator=",">
</foreach> #{mobileNo,jdbcType=VARCHAR}
</foreach>
group by sales.SAL_MST_MOBILE group by sales.SAL_MST_MOBILE
</select> </select>
......
...@@ -82,12 +82,13 @@ ...@@ -82,12 +82,13 @@
<select id="checkTimePeriodConflict" resultType="int"> <select id="checkTimePeriodConflict" resultType="int">
SELECT count(1) SELECT count(1)
FROM ag_mkt_schedule_task_tracking FROM ag_mkt_schedule_task_tracking
WHERE practitioner_id = #{practitionerId,jdbcType=BIGINT} WHERE
NOT ((task_time_end &lt; STR_TO_DATE(#{taskTimeFrom,jdbcType=VARCHAR}, '%H:%i:%s'))
OR
(task_time_from &gt; STR_TO_DATE(#{taskTimeEnd,jdbcType=VARCHAR}, '%H:%i:%s'))
)
AND to_days(track_time) = to_days(now()) AND to_days(track_time) = to_days(now())
AND AND practitioner_id = #{practitionerId,jdbcType=BIGINT}
(task_time_from &gt; STR_TO_DATE(#{taskTimeFrom,jdbcType=VARCHAR}, '%H:%i:%s') AND task_time_from &lt; STR_TO_DATE(#{taskTimeEnd,jdbcType=VARCHAR}, '%H:%i:%s'))
OR (task_time_from &lt; STR_TO_DATE(#{taskTimeFrom,jdbcType=VARCHAR}, '%H:%i:%s') AND task_time_end &gt; STR_TO_DATE(#{taskTimeEnd,jdbcType=VARCHAR}, '%H:%i:%s'))
OR (task_time_end &gt; STR_TO_DATE(#{taskTimeFrom,jdbcType=VARCHAR}, '%H:%i:%s') AND task_time_end &lt; STR_TO_DATE(#{taskTimeEnd,jdbcType=VARCHAR}, '%H:%i:%s'))
</select> </select>
<resultMap id="PersonalPEPScore" type="com.yd.dal.entity.practitioner.PersonalPEPScore"> <resultMap id="PersonalPEPScore" type="com.yd.dal.entity.practitioner.PersonalPEPScore">
......
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