Explorar o código

大数据变动没有失效 的字段数据, 修改为非有效就是失效 , 郁老师让修改

chenzhenguo %!s(int64=2) %!d(string=hai) anos
pai
achega
5da7d91425
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      sql-achievement/存储过程/测试环境/存储过程.sql

+ 2 - 2
sql-achievement/存储过程/测试环境/存储过程.sql

@@ -3196,7 +3196,7 @@ BEGIN
 	UPDATE shanglifeecif.customerno_salecom_relation si1 SET si1.label92 = (
 		SELECT '有'||t.terminatestate||'保单' FROM (
 			SELECT row_number()over(partition by p.customerno, p.salecom order by p.polapplydate desc) rn,p.customerno, p.salecom,p.terminatestate FROM dsj.policy_information p
-			WHERE p.appflag = '失效'
+			WHERE p.appflag <> '有效'
 		) t WHERE t.rn = 1 AND si1.scustid = t.customerno and si1.salecom = t.salecom
 	);
 
@@ -4127,7 +4127,7 @@ UPDATE shanglifeecif.Individual si1 SET si1.label79 = '女儿生日临近' WHERE
 	UPDATE shanglifeecif.Individual si1 SET si1.label92 = (
 	SELECT '有'||t.terminatestate||'保单' FROM (
 		SELECT row_number()over(partition by p.customerno order by p.polapplydate desc) rn,p.customerno,p.terminatestate FROM dsj.policy_information p
-		WHERE p.appflag = '失效'
+		WHERE p.appflag  <>  '有效'
 	) t WHERE t.rn = 1 AND si1.scustid = t.customerno
 );
 	--	终止客户	label93	客户的所有保单缴费期满且承保期限已满正常终止的客户	终止客户