|
@@ -54,9 +54,9 @@ public interface ManagementDetailMapper {
|
|
|
* 从 河北_CEM移网质量投诉明细 mobile_complaint_day 中同步数据
|
|
|
*/
|
|
|
@Insert("insert into tsl_data.management_detail (origin, stat_day_id, acct_date, sheet_no," +
|
|
|
- " compl_area_local, compl_city_local) " +
|
|
|
+ " compl_area_local, compl_city_local, busi_no) " +
|
|
|
"select 'mobile_complaint_day' as origin, concat(month_id, day_id) as stat_day_id," +
|
|
|
- " acct_date, sheet_no, compl_area_local, gis_city as compl_city_local " +
|
|
|
+ " acct_date, sheet_no, compl_area_local, gis_city as compl_city_local, busi_no " +
|
|
|
" from tsl_data.mobile_complaint_day mcd \r\n" +
|
|
|
" where month_id = substring(#{day} from 1 for 6) and day_id = substring(#{day} from 7 for 2) ")
|
|
|
int insertFromMobileComplaint(@Param("day") String day);
|
|
@@ -65,10 +65,10 @@ public interface ManagementDetailMapper {
|
|
|
* 从 河北客户体验管理智能定责投诉明细月累计接口日 complaint_details_fix_ywd_day 同步数据
|
|
|
*/
|
|
|
@Insert("insert into tsl_data.management_detail (origin, stat_day_id, acct_date, sheet_no," +
|
|
|
- " compl_area_local, compl_city_local) " +
|
|
|
+ " compl_area_local, compl_city_local, busi_no) " +
|
|
|
"select 'complaint_details_fix_ywd_day' as origin, concat(month_id, day_id) as stat_day_id," +
|
|
|
- " concat(month_id1, day_id1) as acct_date, sheet_no, compl_area_local, compl_city_local " +
|
|
|
- " from tsl_data.complaint_details_fix_ywd_day cdfyd \r\n" +
|
|
|
+ " concat(month_id1, day_id1) as acct_date, sheet_no, compl_area_local, compl_city_local, busi_no "
|
|
|
+ + " from tsl_data.complaint_details_fix_ywd_day cdfyd \r\n" +
|
|
|
" where duty_reason_id_day = '业务使用>>基础业务使用>>移网主被叫>>手机无法主被叫'\r\n" +
|
|
|
" and month_id = substring(#{day} from 1 for 6) and day_id = substring(#{day} from 7 for 2) ")
|
|
|
int insertFromComplaintDetailsFixYwd(@Param("day") String day);
|
|
@@ -79,14 +79,14 @@ public interface ManagementDetailMapper {
|
|
|
@Select("select count(1) from tsl_data.management_detail where stat_day_id = #{day} ")
|
|
|
int selectCountofStatDay(@Param("day") String day);
|
|
|
|
|
|
- @Delete("delete from tsl_data.management_detail where tat_day_id = #{day}")
|
|
|
+ @Delete("delete from tsl_data.management_detail where stat_day_id = #{day}")
|
|
|
int deleteForStatDay(@Param("day") String day);
|
|
|
|
|
|
- @Select("with t1 as (select compl_area_local, sheet_no from tsl_data.management_detail md \n" + //
|
|
|
+ @Select("with t1 as (select compl_area_local, busi_no from tsl_data.management_detail md \n" + //
|
|
|
" where stat_day_id = #{day}), \n" + //
|
|
|
" t2 as (select distinct * from t1), \n" + //
|
|
|
- " t3 as (select compl_area_local, count(1) as total_num from t1 group by compl_area_local), \n" + //
|
|
|
- " t4 as (select compl_area_local, count(1) as distinct_num from t2 group by compl_area_local), \n"
|
|
|
+ " t3 as (select compl_area_local, count(1) as total_num from t1 group by compl_area_local), \n"
|
|
|
+ + " t4 as (select compl_area_local, count(1) as distinct_num from t2 group by compl_area_local), \n"
|
|
|
+ " t5 as (select t3.compl_area_local, t3.total_num, t3.total_num - t4.distinct_num::float8 as repeat_num, \n"
|
|
|
+ " (t3.total_num - t4.distinct_num) / t3.total_num::float8 as repeat_ratio from T3, t4 \n" + //
|
|
|
" where t3.compl_area_local = t4.compl_area_local) \n" + //
|