DELETE FROM pawmrpcs.data_check_rule_set WHERE RULE_CODE IN(
'LCZX.A.004.015',
'LCZX.A.016.031',
'LCZX.A.023.015',
'LCZX.A.030.028',
'LCZX.A.033.007',
'LCZX.A.035.055',
'LCZX.A.045.004',
'LCZX.A.054.018',
'LCZX.A.055.015',
'LCZX.A.056.014',
'LCZX.A.056.015',
'LCZX.A.056.016',
'LCZX.A.056.018',
'LCZX.A.056.019',
'LCZX.A.056.020',
'LCZX.A.056.021',
'LCZX.A.059.029',
'LCZX.A.030.029',
'LCZX_BANK.A.030.029',
'LCZX_BANK.A.002.035',
'LCZX_BANK.A.004.015',
'LCZX_BANK.A.016.031',
'LCZX_BANK.A.022.018',
'LCZX_BANK.A.023.015',
'LCZX_BANK.A.030.028',
'LCZX_BANK.A.045.004',
'LCZX_BANK.A.054.018',
'LCZX_BANK.A.055.015',
'LCZX_BANK.A.056.014',
'LCZX_BANK.A.056.015',
'LCZX_BANK.A.056.016',
'LCZX_BANK.A.056.018',
'LCZX_BANK.A.056.019',
'LCZX_BANK.A.056.020',
'LCZX_BANK.A.056.021',
'LCZX_BANK.A.059.029'
);
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.004.015', 't_r_lczx_zcxx_zcjy', '{行内资产/负债编码}长度不建议超过18位', '{行内资产/负债编码}长度不建议超过18位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n T.N_ID AS N_ID_LIST,\r\n \'REP_BANK_ASSET_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_ZCXX_ZCJY T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND LENGTH(T.REP_BANK_ASSET_CODE) > 18');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.016.031', 't_r_lczx_zcys_09', '{期限}最长5位整数型', '{期限}最长5位整数型', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'TERM\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\n FROM t_r_lczx_zcys_09 T\r\n WHERE T.FILE_DATE = \'@FILE_DATE\'\r\n AND (LENGTH (ABS(CONVERT(ABS(T.TERM) USING GBK)))>5 OR (ABS(T.TERM) REGEXP \'[^0-9]\' = 1))\r\n GROUP BY T.FUND_CATEGORY, T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.023.015', 't_r_lczx_zcys_15', '{所属国家或地区}值域范围内单选', '所属国家或地区(另类资产)不在值域范围内', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'AREA\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_ZCYS_15 T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND GET_DICT(\'LCZX_COUNTRY_AREA\',T.AREA) = 0\r\nand AREA is not null\r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.030.028', 't_r_lczx_zcys_13', '资产大类为‘贵金属/商品’时,{资产/负债类别}值必须在值域内\r\n', '资产大类为‘贵金属/商品’时,{资产/负债类别}值必须在值域内\r\n', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_ZCYS_13 T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND REP_ASSET_TYPE IS NOT NULL\r\nAND T.REP_ASSET_TYPE NOT IN (1601,1602,1699) \r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.033.007', 't_r_lczx_filing_register', '{行内标识码}不得含有汉字', '{行内标识码}不得含有汉字', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n GROUP_CONCAT( DISTINCT T.N_ID ) AS N_ID_LIST,\n \'PRO_CODE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_FILING_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LENGTH( T.PRO_CODE ) != char_length( T.PRO_CODE ) \nGROUP BY\n T.FUND_CATEGORY,\n T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.035.055', 'RH_PIB', '{1-基本信息}.{产品代码}编码规则:从左至右,第10-14位为顺序码,采用阿拉伯数字编码,表示SPV的顺序号,同一发起法人金融机构、同一SPV细分类、同一年度内,多个不同SPV顺序编号从00001—99999顺序连续编码,不能重号或空号。', '{1-基本信息}.{产品代码}编码规则:从左至右,第10-14位为顺序码,采用阿拉伯数字编码,表示SPV的顺序号,同一发起法人金融机构、同一SPV细分类、同一年度内,多个不同SPV顺序编号从00001—99999顺序连续编码,不能重号或空号。', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT N_ID) AS N_ID_LIST, \'CPDM\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n FXJGDM AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\r\nFROM ( select cpdm,GROUP_CONCAT(N_ID) AS N_ID, MAX(FXJGDM) AS FXJGDM from\r\n(SELECT SUBSTRING(CPDM,10,5) as cpdm,GROUP_CONCAT(N_ID) AS N_ID, MAX(FXJGDM) AS FXJGDM\r\n FROM t_r_rh_pib T\r\n where FILE_DATE=\'@FILE_DATE\'\r\n GROUP BY SUBSTRING(CPDM,1,14)) a\r\n where a.N_ID regexp \',\'=1\r\n group by a.FXJGDM\r\n union all\r\n SELECT SUBSTRING(CPDM,10,5),GROUP_CONCAT(N_ID) AS N_ID,FXJGDM AS FXJGDM\r\n FROM t_r_rh_pib T\r\n WHERE FILE_DATE=\'@FILE_DATE\'\r\n and (SUBSTRING(CPDM,10,5) REGEXP \'[^0-9]\'= 1 OR length(SUBSTRING(CPDM,10,5))<>5)\r\n GROUP BY FXJGDM) T1\r\nGROUP BY FXJGDM;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.045.004', 't_r_lczx_zcys_all', '{行内资产/负债编码}最长40个字符,不建议超过18位', '{行内资产/负债编码}最长40个字符,不建议超过18位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2022-03-15 17:39:08', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcys_all T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\' AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END\r\nAND length(REP_FINPROD_ID) > 40\r\nand length(REP_FINPROD_ID)= char_length(REP_FINPROD_ID)\r\nGROUP BY T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.054.018', 't_r_lczx_zcys_all', '{资产代码}定长8位字符', '{资产代码}定长8位字符', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'ASSET_ID_05\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n null AS LEFT_CALCULATION_VALUE,\r\n null AS RIGHT_CALCULATION_VALUE,\r\n null AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (T.DEPT_NO=\'@DEPT_NO\' OR \'@DEPT_NO\'=\'\')\r\nand T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_05\')\r\nand length(ASSET_ID_05) <> 8\r\nand length(ASSET_ID_05)=char_length(ASSET_ID_05)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.055.015', 't_r_lczx_zcys_all', '{所属国家或地区}值域范围内单选', '{所属国家或地区}值域范围内单选', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'AREA_15\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (T.DEPT_NO=\'@DEPT_NO\' OR \'@DEPT_NO\'=\'\')\r\nand T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_15\')\r\nand (GET_DICT(\'LCZX_COUNTRY_AREA\',AREA_15)=0 OR length(AREA_15)<>3)\r\nand AREA_15 is not null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.014', 't_r_lczx_zcys_all', '{基金代码}为必填项,若无,则填写“无”', '{基金代码}为必填项,若无,则填写“无”', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_FINPROD_ID_16 IS NULL\r\nGROUP BY\r\n T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.015', 't_r_lczx_zcys_all', '{基金代码}最长20位字符型', '基金代码过长', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND LENGTH(CONVERT(REP_FINPROD_ID_16 USING GBK)) >20\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.016', 't_r_lczx_zcys_all', '{基金名称}为必填项', '{基金名称}为必填项', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_NAME_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_FINPROD_NAME_16 is null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.018', 't_r_lczx_zcys_all', '{是否由金融资产投资公司发行}选择性必填,当资产类别为“权益类基金”,固收类基金,“混合类基金”,期货类及其他衍生品基金,“其他私募证券投资基金”,上市公司定增基金,并购基金,房地产基金,基础设施基金,其他私募股权投资基金,创业投资基金,红酒艺术品等商品基金,“私募证券类FOF基金”,私募股权投资类FOF基金,创业投资类FOF基金,其他私募投资类FOF基金,其他私募基金时,必填。当资产类别为债券基金,“货币市场基金”,“股票基金”,“基金中基金”,混合基金,其他公募基金时,不可填。', '{是否由金融资产投资公司发行}选择性必填,当资产类别为“权益类基金”,固收类基金,“混合类基金”,期货类及其他衍生品基金,“其他私募证券投资基金”,上市公司定增基金,并购基金,房地产基金,基础设施基金,其他私募股权投资基金,创业投资基金,红酒艺术品等商品基金,“私募证券类FOF基金”,私募股权投资类FOF基金,创业投资类FOF基金,其他私募投资类FOF基金,其他私募基金时,必填。当资产类别为债券基金,“货币市场基金”,“股票基金”,“基金中基金”,混合基金,其他公募基金时,不可填。', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE,IS_FINCO_ISSUE_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND ((T.REP_ASSET_TYPE IN ( \'2601\' ,\'2602\' ,\'2604\' ,\'2605\' ,\'2606\' ,\'2607\' ,\'2610\' ,\'2611\' ,\'2612\' ,\'2617\' ,\'2613\' \r\n,\'2614\' ,\'2616\' ,\'2618\' ,\'2619\' ,\'2620\' ,\'2699\' ) and IS_FINCO_ISSUE_16 is null)\r\nor ((T.REP_ASSET_TYPE in( \'1106\',\'2401\',\'1303\',\'2403\',\'2402\',\'2499\')) and IS_FINCO_ISSUE_16 is not null))\r\nGROUP BY T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.019', 't_r_lczx_zcys_all', '{是否由金融资产投资公司发行}值域范围内单选', '{是否由金融资产投资公司发行}值域范围内单选', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'IS_FINCO_ISSUE_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND (IS_FINCO_ISSUE_16 not in (\'01\',\'02\') or length(IS_FINCO_ISSUE_16)<>2)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.020', 't_r_lczx_zcys_all', '{行业}为必填项', '{行业}为必填项', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_INDUSTRY_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_INDUSTRY_16 is null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.056.021', 't_r_lczx_zcys_all', '{行业}值域范围内单选', '{行业}值域范围内单选', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_INDUSTRY_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND (GET_DICT(\'LCZX_REP_CORP_INDUSTRY\',REP_INDUSTRY_16) =0 OR length(REP_INDUSTRY_16)<>3)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.059.029', 't_r_lczx_zcys_all', '当{资产/负债类别}不为(1502,1505,1507,1508,1509)之一的,{QDII股票/基金类资产}类别下的全部字段必须为空', '当{资产/负债类别}不为(1502,1505,1507,1508,1509)之一的,{QDII股票/基金类资产}类别下的全部字段必须为空', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE,AREA_11,STOCK_CODE_11,ISSUER_11,INDUSTRY_11,STOCK_NAME_11\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_ZCYS_ALL T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END\r\nAND T.REP_ASSET_TYPE NOT IN (1502,1505,1507,1508,1509)\r\nAND (AREA_11 IS NOT NULL OR STOCK_CODE_11 IS NOT NULL OR ISSUER_11 IS NOT NULL OR INDUSTRY_11 IS NOT NULL OR STOCK_NAME_11 IS NOT NULL)\r\nGROUP BY T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.035', 't_r_lczx_prod_duration_register_bank', '{折算人民币初始净值}在整个存续登记期间应固定不变', '{折算人民币初始净值}在整个存续登记期间应固定不变', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT( DISTINCT A.N_ID ) AS N_ID_LIST,\r\n \'REPFINPRODREGID,REPINITNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n A.FILE_DATE,\r\n A.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM \r\n(SELECT REPFINPRODREGID,REPINITNETVALCNY,N_ID,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register_bank) A\r\nLEFT JOIN t_r_lczx_prod_duration_register_bank_result B\r\nON A.REPFINPRODREGID=B.REPFINPRODREGID\r\nAND A.REPINITNETVALCNY=B.REPINITNETVALCNY\r\nWHERE A.FILE_DATE=\'@FILE_DATE\'\r\nAND (B.REPINITNETVALCNY IS NULL and B.REPFINPRODREGID IS NULL)\r\nand A.REPFINPRODREGID in (select REPFINPRODREGID from t_r_lczx_prod_duration_register_bank_result )\r\nGROUP BY A.FUND_CATEGORY,\r\n A.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.004.015', 't_r_lczx_zcxx_zcjy_bank', '{行内资产/负债编码}长度不建议超过18位', '{行内资产/负债编码}长度不建议超过18位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n T.N_ID AS N_ID_LIST,\r\n \'REP_BANK_ASSET_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcxx_zcjy_bank T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND LENGTH(T.REP_BANK_ASSET_CODE) > 18');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.016.031', 't_r_lczx_zcys_09_bank', '{期限}最长5位整数型', '{期限}最长5位整数型', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'TERM\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\n FROM t_r_lczx_zcys_09_bank T\r\n WHERE T.FILE_DATE = \'@FILE_DATE\'\r\n AND (LENGTH (ABS(CONVERT(ABS(T.TERM) USING GBK)))>5 OR (ABS(T.TERM) REGEXP \'[^0-9]\' = 1))\r\n GROUP BY T.FUND_CATEGORY, T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.022.018', 't_r_lczx_zcys_05_bank', '{资产代码}定长8位字符', '资产代码要素格式不对。正确的格式:8位英文或数字', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'ASSET_ID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcys_05_bank T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND LENGTH(ASSET_ID) <> 8\r\nand LENGTH(ASSET_ID)=char_LENGTH(ASSET_ID)\r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.023.015', 't_r_lczx_zcys_15_bank', '{所属国家或地区}值域范围内单选', '所属国家或地区(另类资产)不在值域范围内', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'AREA\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcys_15_bank T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND GET_DICT(\'LCZX_COUNTRY_AREA\',T.AREA) = 0\r\nand AREA is not null\r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.030.028', 't_r_lczx_zcys_13_bank', '资产大类为‘贵金属/商品’时,{资产/负债类别}值必须在值域内\r\n', '资产大类为‘贵金属/商品’时,{资产/负债类别}值必须在值域内\r\n', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_ZCYS_13_BANK T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND REP_ASSET_TYPE IS NOT NULL\r\nAND T.REP_ASSET_TYPE NOT IN (1601,1602,1699) \r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.045.004', 't_r_lczx_zcys_all_bank', '{行内资产/负债编码}最长40个字符,不建议超过18位', '{行内资产/负债编码}最长40个字符,不建议超过18位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2022-03-15 17:00:33', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcys_all_bank T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\' AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END\r\nAND length(REP_FINPROD_ID) > 40\r\nand length(REP_FINPROD_ID)= char_length(REP_FINPROD_ID)\r\nGROUP BY T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.054.018', 't_r_lczx_zcys_all_bank', '{资产代码}定长8位字符', '{资产代码}定长8位字符', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'ASSET_ID_05\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n null AS LEFT_CALCULATION_VALUE,\r\n null AS RIGHT_CALCULATION_VALUE,\r\n null AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (T.DEPT_NO=\'@DEPT_NO\' OR \'@DEPT_NO\'=\'\')\r\nand T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_05\')\r\nand length(ASSET_ID_05) <> 8\r\nand length(ASSET_ID_05)=char_length(ASSET_ID_05)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.055.015', 't_r_lczx_zcys_all_bank', '{所属国家或地区}值域范围内单选', '{所属国家或地区}值域范围内单选', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'AREA_15\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (T.DEPT_NO=\'@DEPT_NO\' OR \'@DEPT_NO\'=\'\')\r\nand T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_15\')\r\nand (GET_DICT(\'LCZX_COUNTRY_AREA\',AREA_15)=0 OR length(AREA_15)<>3)\r\nand AREA_15 is not null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.014', 't_r_lczx_zcys_all_bank', '{基金代码}为必填项,若无,则填写“无”', '{基金代码}为必填项,若无,则填写“无”', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_FINPROD_ID_16 IS NULL\r\nGROUP BY\r\n T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.015', 't_r_lczx_zcys_all_bank', '{基金代码}最长20位字符型', '{基金代码}最长20位字符型', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_ID_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'Z70033\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n T_R_LCZX_ZCYS_ALL_BANK T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND LENGTH(CONVERT(REP_FINPROD_ID_16 USING GBK)) >20\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.016', 't_r_lczx_zcys_all_bank', '{基金名称}为必填项', '{基金名称}为必填项', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_FINPROD_NAME_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_FINPROD_NAME_16 is null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.018', 't_r_lczx_zcys_all_bank', '{是否由金融资产投资公司发行}选择性必填,当资产类别为“权益类基金”,固收类基金,“混合类基金”,期货类及其他衍生品基金,“其他私募证券投资基金”,上市公司定增基金,并购基金,房地产基金,基础设施基金,其他私募股权投资基金,创业投资基金,红酒艺术品等商品基金,“私募证券类FOF基金”,私募股权投资类FOF基金,创业投资类FOF基金,其他私募投资类FOF基金,其他私募基金时,必填。当资产类别为债券基金,“货币市场基金”,“股票基金”,“基金中基金”,混合基金,其他公募基金时,不可填。', '{是否由金融资产投资公司发行}选择性必填,当资产类别为“权益类基金”,固收类基金,“混合类基金”,期货类及其他衍生品基金,“其他私募证券投资基金”,上市公司定增基金,并购基金,房地产基金,基础设施基金,其他私募股权投资基金,创业投资基金,红酒艺术品等商品基金,“私募证券类FOF基金”,私募股权投资类FOF基金,创业投资类FOF基金,其他私募投资类FOF基金,其他私募基金时,必填。当资产类别为债券基金,“货币市场基金”,“股票基金”,“基金中基金”,混合基金,其他公募基金时,不可填。', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE,IS_FINCO_ISSUE_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND ((T.REP_ASSET_TYPE IN ( \'2601\' ,\'2602\' ,\'2604\' ,\'2605\' ,\'2606\' ,\'2607\' ,\'2610\' ,\'2611\' ,\'2612\' ,\'2617\' ,\'2613\' \r\n,\'2614\' ,\'2616\' ,\'2618\' ,\'2619\' ,\'2620\' ,\'2699\' ) and IS_FINCO_ISSUE_16 is null)\r\nor ((T.REP_ASSET_TYPE in( \'1106\',\'2401\',\'1303\',\'2403\',\'2402\',\'2499\')) and IS_FINCO_ISSUE_16 is not null))\r\nGROUP BY T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.019', 't_r_lczx_zcys_all_bank', '{是否由金融资产投资公司发行}值域范围内单选', '{是否由金融资产投资公司发行}值域范围内单选', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'IS_FINCO_ISSUE_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND (IS_FINCO_ISSUE_16 not in (\'01\',\'02\') or length(IS_FINCO_ISSUE_16)<>2)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.020', 't_r_lczx_zcys_all_bank', '{行业}为必填项', '{行业}为必填项', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_INDUSTRY_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND REP_INDUSTRY_16 is null\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.056.021', 't_r_lczx_zcys_all_bank', '{行业}值域范围内单选', '{行业}值域范围内单选', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_INDUSTRY_16\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM\r\n t_r_lczx_zcys_all_bank T\r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\nAND (CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END)\r\nAND T.REP_ASSET_TYPE IN (\r\n SELECT\r\n ITEM_KEY\r\n FROM\r\n T_P_LCZX_ZCYS_REPORT\r\n WHERE\r\n ITEM_GROUP = \'T_R_LCZX_ZCYS_16\'\r\n)\r\nAND (GET_DICT(\'LCZX_REP_CORP_INDUSTRY\',REP_INDUSTRY_16) =0 OR length(REP_INDUSTRY_16)<>3)\r\nGROUP BY\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.059.029', 't_r_lczx_zcys_all_bank', '当{资产/负债类别}不为(1502,1505,1507,1508,1509)之一的,{QDII股票/基金类资产}类别下的全部字段必须为空', '当{资产/负债类别}不为(1502,1505,1507,1508,1509)之一的,{QDII股票/基金类资产}类别下的全部字段必须为空', 'sql', '1', '', NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n GROUP_CONCAT(DISTINCT T.N_ID) AS N_ID_LIST,\r\n \'REP_ASSET_TYPE,AREA_11,STOCK_CODE_11,ISSUER_11,INDUSTRY_11,STOCK_NAME_11\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, \'C10307\' AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM t_r_lczx_zcys_all_bank T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END\r\nAND T.REP_ASSET_TYPE NOT IN (1502,1505,1507,1508,1509)\r\nAND (AREA_11 IS NOT NULL OR STOCK_CODE_11 IS NOT NULL OR ISSUER_11 IS NOT NULL OR INDUSTRY_11 IS NOT NULL OR STOCK_NAME_11 IS NOT NULL)\r\nGROUP BY T.FILE_DATE;');
DELETE FROM pawmrpcs.data_check_rule_set WHERE RULE_CODE IN(
'LCZX.A.002.001',
'LCZX.A.002.002',
'LCZX.A.002.003',
'LCZX.A.002.004',
'LCZX.A.002.005',
'LCZX.A.002.006',
'LCZX.A.002.007',
'LCZX.A.002.008',
'LCZX.A.002.009',
'LCZX.A.002.010',
'LCZX.A.002.011',
'LCZX.A.002.012',
'LCZX.A.002.014',
'LCZX.A.002.016',
'LCZX.A.002.017',
'LCZX.A.002.018',
'LCZX.A.002.019',
'LCZX.A.002.021',
'LCZX.A.002.022',
'LCZX.A.002.024',
'LCZX.A.002.025',
'LCZX.A.002.028',
'LCZX.A.002.029',
'LCZX.A.002.031',
'LCZX.A.002.032',
'LCZX.A.002.033',
'LCZX.A.002.034',
'LCZX.A.002.035',
'LCZX.A.002.037',
'LCZX.A.002.038',
'LCZX.A.002.039',
'LCZX.A.002.041',
'LCZX.A.002.042',
'LCZX.A.002.043',
'LCZX.A.002.045',
'LCZX.A.002.046',
'LCZX.A.002.047',
'LCZX.A.002.054',
'LCZX.A.002.058',
'LCZX.A.002.059',
'LCZX.A.002.060',
'LCZX.A.002.061',
'LCZX.A.002.062',
'LCZX.A.002.063',
'LCZX.A.002.064',
'LCZX.A.002.065',
'LCZX.A.002.067',
'LCZX.A.002.068',
'LCZX.A.002.071',
'LCZX.A.002.072',
'LCZX.A.002.074',
'LCZX.A.002.075',
'LCZX.A.002.077',
'LCZX.A.002.078',
'LCZX.A.002.080',
'LCZX.A.002.081',
'LCZX.A.002.084',
'LCZX.A.002.085',
'LCZX.A.002.088',
'LCZX.A.002.090',
'LCZX.A.002.092',
'LCZX.A.002.095',
'LCZX.A.002.097',
'LCZX.A.002.098',
'LCZX.A.002.101',
'LCZX.A.002.103',
'LCZX.A.032.001',
'LCZX.A.032.002',
'LCZX.A.032.003',
'LCZX.A.032.004',
'LCZX.A.032.005',
'LCZX.A.032.006',
'LCZX.A.032.007',
'LCZX.A.032.008',
'LCZX.A.032.009',
'LCZX.A.032.011',
'LCZX.A.032.013',
'LCZX.A.032.014',
'LCZX.A.032.016',
'LCZX.A.032.018',
'LCZX.A.032.019',
'LCZX.A.032.021',
'LCZX.A.032.022',
'LCZX.A.032.023',
'LCZX.A.032.024',
'LCZX.A.032.026',
'LCZX.A.032.027',
'LCZX.A.032.030',
'LCZX.A.032.031',
'LCZX.A.032.033',
'LCZX.A.032.034',
'LCZX.A.032.035',
'LCZX.A.032.036',
'LCZX.A.032.037',
'LCZX.A.032.040',
'LCZX.A.032.041',
'LCZX.A.032.042',
'LCZX_BANK.A.032.042',
'LCZX_BANK.A.002.001',
'LCZX_BANK.A.002.002',
'LCZX_BANK.A.002.003',
'LCZX_BANK.A.002.004',
'LCZX_BANK.A.002.005',
'LCZX_BANK.A.002.006',
'LCZX_BANK.A.002.007',
'LCZX_BANK.A.002.008',
'LCZX_BANK.A.002.009',
'LCZX_BANK.A.002.010',
'LCZX_BANK.A.002.011',
'LCZX_BANK.A.002.012',
'LCZX_BANK.A.002.014',
'LCZX_BANK.A.002.016',
'LCZX_BANK.A.002.017',
'LCZX_BANK.A.002.018',
'LCZX_BANK.A.002.019',
'LCZX_BANK.A.002.021',
'LCZX_BANK.A.002.022',
'LCZX_BANK.A.002.024',
'LCZX_BANK.A.002.025',
'LCZX_BANK.A.002.028',
'LCZX_BANK.A.002.031',
'LCZX_BANK.A.002.032',
'LCZX_BANK.A.002.033',
'LCZX_BANK.A.002.034',
'LCZX_BANK.A.002.035',
'LCZX_BANK.A.002.037',
'LCZX_BANK.A.002.038',
'LCZX_BANK.A.002.039',
'LCZX_BANK.A.002.041',
'LCZX_BANK.A.002.042',
'LCZX_BANK.A.002.043',
'LCZX_BANK.A.002.045',
'LCZX_BANK.A.002.046',
'LCZX_BANK.A.002.047',
'LCZX_BANK.A.002.054',
'LCZX_BANK.A.002.058',
'LCZX_BANK.A.002.059',
'LCZX_BANK.A.002.060',
'LCZX_BANK.A.002.061',
'LCZX_BANK.A.002.062',
'LCZX_BANK.A.002.063',
'LCZX_BANK.A.002.064',
'LCZX_BANK.A.002.065',
'LCZX_BANK.A.002.067',
'LCZX_BANK.A.002.068',
'LCZX_BANK.A.002.071',
'LCZX_BANK.A.002.072',
'LCZX_BANK.A.002.074',
'LCZX_BANK.A.002.075',
'LCZX_BANK.A.002.077',
'LCZX_BANK.A.002.078',
'LCZX_BANK.A.002.080',
'LCZX_BANK.A.002.081',
'LCZX_BANK.A.002.084',
'LCZX_BANK.A.002.085',
'LCZX_BANK.A.002.088',
'LCZX_BANK.A.002.090',
'LCZX_BANK.A.002.092',
'LCZX_BANK.A.002.095',
'LCZX_BANK.A.002.097',
'LCZX_BANK.A.002.098',
'LCZX_BANK.A.002.101',
'LCZX_BANK.A.002.103',
'LCZX_BANK.A.032.001',
'LCZX_BANK.A.032.002',
'LCZX_BANK.A.032.003',
'LCZX_BANK.A.032.004',
'LCZX_BANK.A.032.005',
'LCZX_BANK.A.032.006',
'LCZX_BANK.A.032.007',
'LCZX_BANK.A.032.008',
'LCZX_BANK.A.032.009',
'LCZX_BANK.A.032.011',
'LCZX_BANK.A.032.013',
'LCZX_BANK.A.032.014',
'LCZX_BANK.A.032.016',
'LCZX_BANK.A.032.018',
'LCZX_BANK.A.032.019',
'LCZX_BANK.A.032.021',
'LCZX_BANK.A.032.022',
'LCZX_BANK.A.032.023',
'LCZX_BANK.A.032.024',
'LCZX_BANK.A.032.026',
'LCZX_BANK.A.032.027',
'LCZX_BANK.A.032.030',
'LCZX_BANK.A.032.031',
'LCZX_BANK.A.032.033',
'LCZX_BANK.A.032.034',
'LCZX_BANK.A.032.035',
'LCZX_BANK.A.032.036',
'LCZX_BANK.A.032.037',
'LCZX_BANK.A.032.040',
'LCZX_BANK.A.032.041'
);
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.001', 't_r_lczx_prod_duration_register', '{发行机构代码}为必填项', '发行机构代码要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPISSUEPARTYID IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.002', 't_r_lczx_prod_duration_register', '{发行机构代码}仅可填英文或数字', '发行机构代码要素格式不对。正确的格式:6位英文或数字。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID REGEXP \'[^A-Z0-9]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.003', 't_r_lczx_prod_duration_register', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', '发行机构代码必须与银行代码相同。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID <> \'Z70033\' ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.004', 't_r_lczx_prod_duration_register', '{发行机构代码}6位字符型,定长', '{发行机构代码}6位字符型,定长', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LENGTH( convert (REPISSUEPARTYID using gbk) ) <> 6 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.005', 't_r_lczx_prod_duration_register', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID <> \'Z70033\' ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.006', 't_r_lczx_prod_duration_register', '{发行机构代码},产品登记编码,{业务结束日}不能有重复记录', '{发行机构代码},产品登记编码,{业务结束日}不能有重复记录', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPISSUEPARTYID,REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T1.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\r\nFROM (SELECT REPFINPRODREGID, REPISSUEPARTYID, REPBUSMDATE,\r\n N_ID , FUND_CATEGORY, FILE_DATE\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER T\r\n WHERE FILE_DATE = \'@FILE_DATE\'\r\n GROUP BY T.REPFINPRODREGID, T.REPISSUEPARTYID, T.REPBUSMDATE,\r\n T.FILE_DATE\r\n HAVING COUNT(1) > 1) T1;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.007', 't_r_lczx_prod_duration_register', '{产品登记编码}为必填项', '产品登记编码要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPFINPRODREGID IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.008', 't_r_lczx_prod_duration_register', '{产品登记编码}仅可填英文和数字', '产品登记编码要素格式不对。正确的格式:14或15位英文或数字。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPFINPRODREGID REGEXP \'[^A-Z0-9]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.009', 't_r_lczx_prod_duration_register', '{产品登记编码}必须与发行机构登记信息保持一致,即必须是该银行发行的产品', '该产品不存在。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LEFT ( REPFINPRODREGID, 6 ) <> \'Z70033\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.010', 't_r_lczx_prod_duration_register', '{产品登记编码}数据类型为:14位字符型,定长(公募理财产品)/15位字符型,定长(私募理财产品)', '{产品登记编码}数据类型为:14位字符型,定长(公募理财产品)/15位字符型,定长(私募理财产品)', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n T1.FILE_DATE,\r\n T1.N_ID ,\r\n T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,\r\n T2.ISSUE_TYPE \r\nFROM\r\n t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2 ON T1.REPFINPRODREGID = T2.PROD_REG_ID \r\n ) T \r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\' \r\n AND((length(convert (REPFINPRODREGID using GBK)) in (\'14\',\'15\') and (\r\n (\r\n ( LENGTH( CONVERT ( REPFINPRODREGID USING GBK ) ) <> 14 AND ISSUE_TYPE = \'公募\' OR REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1 ) \r\n OR ( LENGTH( CONVERT ( REPFINPRODREGID USING GBK ) ) <> 15 AND ISSUE_TYPE = \'私募\' OR REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1 ) \r\n )))\r\n or (length(convert (REPFINPRODREGID using GBK)) NOT IN (\'14\',\'15\') or REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1));');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.011', 't_r_lczx_prod_duration_register', '{产品登记编码}和{业务结束日}这2个要素不可同时重复', '{产品登记编码}和{业务结束日}这2个要素不可同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n N_ID ,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nFROM\r\n t_r_lczx_prod_duration_register T \r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\' \r\nGROUP BY\r\n T.REPFINPRODREGID,\r\n T.REPBUSMDATE,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nHAVING\r\n COUNT( 1 ) > 1 \r\n ) T ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.012', 't_r_lczx_prod_duration_register', '{产品登记编码}已进行募集登记的产品可进行存续期登记', '{产品登记编码}已进行募集登记的产品可进行存续期登记', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID\' AS COLUMN_CODE,\r\n RESULT_CODE,\r\n FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\n from (\r\n select \r\n CASE WHEN PROD_REG_CODE IS NULL THEN 0 ELSE 1 END AS RESULT_CODE,\r\n A.N_ID ,\r\n A.FUND_CATEGORY,\r\n A.FILE_DATE\r\nfrom \r\n (select REPFINPRODREGID,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register\r\n WHERE FILE_DATE = \'@FILE_DATE\' ) a\r\n left join \r\n (select PROD_REG_CODE,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_raise_register_result) b\r\n on a.REPFINPRODREGID=b.PROD_REG_CODE\r\n AND a.FUND_CATEGORY=b.FUND_CATEGORY) T\r\n WHERE T.RESULT_CODE=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.014', 't_r_lczx_prod_duration_register', '{产品登记编码}与{业务起始日期}值不能同时重复', '{产品登记编码}与{业务起始日期}值不能同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSVDATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM ( \r\nSELECT N_ID ,FUND_CATEGORY,FILE_DATE\r\nFROM t_r_lczx_prod_duration_register T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nGROUP BY T.REPFINPRODREGID,T.REPBUSVDATE,FUND_CATEGORY,FILE_DATE \r\nHAVING COUNT(1) > 1)T;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.016', 't_r_lczx_prod_duration_register', '{初始净值}大于等于0', '初始净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPINITNETVAL\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPINITNETVAL IS NOT NULL\nAND T.REPINITNETVAL < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.017', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{初始净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{初始净值}选填', '对于净值型产品,初始净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPINITNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPINITNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.018', 't_r_lczx_prod_duration_register', '关联产品基本信息表,判断净值型产品,校验{初始净值}= 1。', '关联产品基本信息表,判断净值型产品,校验{初始净值}= 1。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPINITNETVAL,\r\n T2.OPER_TYPE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.OPER_TYPE LIKE \'%净值%\' AND T.REPINITNETVAL <> 1;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.019', 't_r_lczx_prod_duration_register', '{初始净值}在整个产品存续登记期间应保持不变。', '{初始净值}在整个产品存续登记期间应保持不变。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n T.N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n T.FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM \r\n(SELECT REPFINPRODREGID,REPINITNETVAL,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register) T\r\nLEFT JOIN t_r_lczx_prod_duration_register_result B\r\nON T.REPFINPRODREGID=B.REPFINPRODREGID\r\nAND T.REPINITNETVAL=B.REPINITNETVAL\r\nWHERE T.FILE_DATE=\'@FILE_DATE\'\r\nAND (B.REPINITNETVAL IS NULL and B.REPFINPRODREGID IS NULL)\r\nand T.REPFINPRODREGID in (select REPFINPRODREGID from t_r_lczx_prod_duration_register_result );');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.021', 't_r_lczx_prod_duration_register', '{产品净值}非空时,数值须大于0', '产品净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPPRODNETVAL\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODNETVAL IS NOT NULL\nAND T.REPPRODNETVAL <= 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.022', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{产品净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{产品净值}选填', '对于净值型产品,产品净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPPRODNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPPRODNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPPRODNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.024', 't_r_lczx_prod_duration_register', '{累计净值}非空时,数值须大于0', '累计净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPSUMNETVAL\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMNETVAL IS NOT NULL\nAND T.REPSUMNETVAL <= 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.025', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{累计净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{累计净值}选填', '对于净值型产品,累计净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPSUMNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPSUMNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPSUMNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.028', 't_r_lczx_prod_duration_register', '{净值币种}在《世界各地货币代码》中必须存在', '{净值币种}在《世界各地货币代码》中必须存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPNETVALCCY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPNETVALCCY IS NOT NULL\nAND GET_CURRENCY_MAPPING(T.REPNETVALCCY) = 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.029', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{净值币种}必填,选择“开放式非净值型”和“封闭式非净值型”的,{净值币种}选填', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{净值币种}必填,选择“开放式非净值型”和“封闭式非净值型”的,{净值币种}选填', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPNETVALCCY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPNETVALCCY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPNETVALCCY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.031', 't_r_lczx_prod_duration_register', '{净值币种}填写币种对应的三位代码(如 CNY)', '{净值币种}填写币种对应的三位代码(如 CNY)', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPNETVALCCY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND ( T.REPNETVALCCY REGEXP \'[^A-Z]\' = 1 OR LENGTH ( T.REPNETVALCCY ) <> 3 OR GET_DICT ( \'LCZX_CURRENCY\', REPNETVALCCY ) = 0 ) ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.032', 't_r_lczx_prod_duration_register', '{折算人民币初始净值}大于等于0', '折算人民币初始净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPINITNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND IFNULL(T.REPINITNETVALCNY,0) < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.033', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币初始净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币初始净值}选填', '对于净值型产品,折算人民币初始净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPINITNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPINITNETVALCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.034', 't_r_lczx_prod_duration_register', '{币种}=“CNY“时,{初始净值}={折算人民币初始净值}', '当初始净值的币种为人民币(CNY)时,折算人民币初始净值与初始净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPNETVALCCY,REPINITNETVAL,REPINITNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPNETVALCCY=\'CNY\'\nAND REPINITNETVAL<>REPINITNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.035', 't_r_lczx_prod_duration_register', '{折算人民币初始净值}在整个存续登记期间应固定不变', '{折算人民币初始净值}在整个存续登记期间应固定不变', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n T.N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPINITNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n T.FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM \r\n(SELECT REPFINPRODREGID,REPINITNETVALCNY,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register) T\r\nLEFT JOIN t_r_lczx_prod_duration_register_result B\r\nON T.REPFINPRODREGID=B.REPFINPRODREGID\r\nAND T.REPINITNETVALCNY=B.REPINITNETVALCNY\r\nWHERE T.FILE_DATE=\'@FILE_DATE\'\r\nAND (B.REPINITNETVALCNY IS NULL and B.REPFINPRODREGID IS NULL)\r\nand T.REPFINPRODREGID in (select REPFINPRODREGID from t_r_lczx_prod_duration_register_result );');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.037', 't_r_lczx_prod_duration_register', '{折算人民币净值}非空时,数值须大于0', '折算人民币净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPNETVALCNY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPNETVALCNY <= 0\nAND T.REPNETVALCNY IS NOT NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.038', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币净值}选填', '对于净值型产品,折算人民币净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPNETVALCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.039', 't_r_lczx_prod_duration_register', '{币种}=“CNY“时,{产品净值}={折算人民币净值}', '当产品净值的币种为人民币(CNY)时,折算人民币净值与产品净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPPRODNETVAL,REPNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\r\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\r\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND REPNETVALCCY=\'CNY\'\r\nAND REPPRODNETVAL<>REPNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.041', 't_r_lczx_prod_duration_register', '{折算人民币累计净值}非空时,数值须大于0', '折算人民币累计净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMNETVALCNY <= 0\nand T.REPSUMNETVALCNY is not null;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.042', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币累计净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币累计净值}选填', '对于净值型产品,折算人民币累计净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPSUMNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPSUMNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPSUMNETVALCNY IS NULL\r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.043', 't_r_lczx_prod_duration_register', '{币种}=“CNY“时,{累计净值}={折算人民币累计净值}', '当累计净值的币种为人民币(CNY)时,折算人民币累计净值与累计净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPSUMNETVAL,REPSUMNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\r\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\r\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND REPNETVALCCY=\'CNY\'\r\nAND REPSUMNETVAL<>REPSUMNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.045', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{净值日期}必填,选择“开放式非净值型”和“封闭式非净值型”的,{净值日期}选填', '对于净值型产品,净值日期不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'VAL_DATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.VAL_DATE,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND VAL_DATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.046', 't_r_lczx_prod_duration_register', '{净值日期}日期型,八位长字符,格式为 yyyymmdd', '净值日期必须为日期格式(YYYY-MM-DD);净值日期必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'VAL_DATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND IS_DATE_TYPE(VAL_DATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.047', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{实现收益率%}必填,选择“开放式非净值型”和“封闭式非净值型”的,{实现收益率%}选填', '对于非净值型产品,实现收益率不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPACHIYIELD\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPACHIYIELD,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPACHIYIELD IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.054', 't_r_lczx_prod_duration_register', '{银行实现收益}为必填项', '银行实现收益(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPACHIPROFITCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPACHIPROFITCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.058', 't_r_lczx_prod_duration_register', '{业务起始日}为必填项', '业务起始日要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPBUSVDATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.059', 't_r_lczx_prod_duration_register', '{业务起始日}日期型,八位长字符,格式为 yyyymmdd', '业务起始日必须为日期格式(YYYY-MM-DD);业务起始日必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND IS_DATE_TYPE(REPBUSVDATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.060', 't_r_lczx_prod_duration_register', '{业务结束日}需大于等于{业务起始日}', '{业务结束日}需大于等于{业务起始日}', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID AS N_ID_LIST,\n \'REPBUSMDATE,REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPBUSMDATE < T.REPBUSVDATE ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.061', 't_r_lczx_prod_duration_register', '{业务结束日}为必填项', '业务结束日要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPBUSMDATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\r\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.REPBUSMDATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.062', 't_r_lczx_prod_duration_register', '{业务结束日}日期型,八位长字符,格式为 yyyymmdd', '业务结束日必须为日期格式(YYYY-MM-DD);业务结束日必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSMDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND is_date_type(REPBUSMDATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.063', 't_r_lczx_prod_duration_register', '{业务结束日}需大于等于{业务起始日}', '业务结束日必须大于等于业务起始日。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSMDATE,REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPBUSMDATE < T.REPBUSVDATE ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.064', 't_r_lczx_prod_duration_register', '存续期登记:同一只产品存续期登记时,业务结束日不得重复', '产品登记编码和业务结束日在报文内不可同时重复。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT REPFINPRODREGID, REPBUSMDATE, N_ID ,\r\n FUND_CATEGORY, FILE_DATE\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER T1\r\n GROUP BY T1.REPFINPRODREGID, T1.REPBUSMDATE, T1.FILE_DATE\r\n HAVING COUNT(1) > 1) T\r\n WHERE T.FILE_DATE = \'@FILE_DATE\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.065', 't_r_lczx_prod_duration_register', '{币种}为必填项', '币种要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.SUBSCRIPTIONHONOR IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.067', 't_r_lczx_prod_duration_register', '{币种}单选和多选的值必须在《世界各地货币代码》中存在', '币种不在值域范围内。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\r\nWHERE T.file_date=\'@FILE_DATE\'\r\nAND (T.SUBSCRIPTIONHONOR IS NOT NULL\r\nAND T.N_ID IN\r\n(SELECT T2.N_ID FROM \r\n(select N_ID ,file_date,SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(A.SUBSCRIPTIONHONOR, \';\', B.HELP_TOPIC_ID + 1),\';\',-1),\',\',1) as SUBSCRIPTIONHONOR\r\nfrom T_R_LCZX_PROD_DURATION_REGISTER a\r\nJOIN pawmrpcs.help_topic b\r\non help_topic_id<(length(a.SUBSCRIPTIONHONOR)-length(replace(a.SUBSCRIPTIONHONOR,\';\',\'\'))+1)\r\nwhere file_date=\'@FILE_DATE\') T2\r\nWHERE GET_DICT(\'LCZX_CURRENCY\',T2.SUBSCRIPTIONHONOR) = 0));');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.068', 't_r_lczx_prod_duration_register', '{币种}填写币种对应的三位代码 (如 CNY)', '{币种}填写币种对应的三位代码 (如 CNY)', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n T_R_LCZX_PROD_DURATION_REGISTER T \r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\' \r\n AND LEFT ( SUBSCRIPTIONHONOR, 3 ) REGEXP \'[^A-Z]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.071', 't_r_lczx_prod_duration_register', '{该币种累计申购金额}为必填项', '该币种累计申购金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 2), \',\',\r\n -1) AS BZLJSGJE, REPISSUEPARTYID, N_ID, FILE_DATE,\r\n FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZLJSGJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.072', 't_r_lczx_prod_duration_register', '{该币种累计申购金额}大于等于0', '该币种累计申购金额(元)必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 2), \',\',\r\n -1) AS BZLJSGJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZLJSGJE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.074', 't_r_lczx_prod_duration_register', '{该币种累计兑付金额}为必填项', '该币种累计兑付金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS BZDFJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.075', 't_r_lczx_prod_duration_register', '{该币种累计兑付金额}大于等于0', '该币种累计兑付金额(元)必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS BZDFJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.077', 't_r_lczx_prod_duration_register', '{该币种累计兑付收益金额}为必填项', '该币种累计兑付收益金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', -1) AS DFSYJE,\r\n REPISSUEPARTYID, N_ID , FILE_DATE, FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.DFSYJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.078', 't_r_lczx_prod_duration_register', '{该币种累计兑付收益金额}小于等于{该币种累计兑付金额}', '该币种累计兑付收益金额(元)必须小于等于该币种累计兑付金额(元)。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n T.BZDFJE AS LEFT_CALCULATION_VALUE,T.BZSYJE AS RIGHT_CALCULATION_VALUE,\r\n ABS(T.BZDFJE - T.BZSYJE) AS DIFFERENCE\r\nFROM (SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS DECIMAL(38,6)) AS BZDFJE,\r\n CAST(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', -1) AS DECIMAL(38,6)) AS BZSYJE,\r\n REPISSUEPARTYID, N_ID , FILE_DATE, FUND_CATEGORY\r\n FROM T_R_LCZX_PROD_DURATION_REGISTER A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE < T.BZSYJE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.080', 't_r_lczx_prod_duration_register', '{累计申购份额}为必填项', '累计申购份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMAPPLYSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMAPPLYSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.081', 't_r_lczx_prod_duration_register', '{累计申购份额}大于等于0', '累计申购份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMAPPLYSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMAPPLYSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.084', 't_r_lczx_prod_duration_register', '{累计赎回份额}为必填项', '累计赎回份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMCASHSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMCASHSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.085', 't_r_lczx_prod_duration_register', '{累计赎回份额}大于等于0', '累计赎回份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMCASHSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMCASHSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.088', 't_r_lczx_prod_duration_register', '{每万份份额分红}大于等于0', '每万份份额分红必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'SHARE_FH\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.SHARE_FH < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.090', 't_r_lczx_prod_duration_register', '{每万份现金分红}大于等于0', '每万份现金分红必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNIT_BONUS_VLU\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.UNIT_BONUS_VLU < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.092', 't_r_lczx_prod_duration_register', '{产品余额}大于等于0', '产品余额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPPRODBALANCE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODBALANCE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.095', 't_r_lczx_prod_duration_register', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{产品余额}必填,选择“开放式非净值型”和“封闭式非净值型”的,{产品余额}选填', '对于非净值型产品,产品余额不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPPRODBALANCE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPPRODBALANCE,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPPRODBALANCE IS NULL\r\nGROUP BY T.FUND_CATEGORY, T.FILE_DATE');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.097', 't_r_lczx_prod_duration_register', '{产品份额}为必填项', '产品份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPPRODSHARE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.098', 't_r_lczx_prod_duration_register', '{产品份额}大于等于0', '产品份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPPRODSHARE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.101', 't_r_lczx_prod_duration_register', '{备注}最长256位字符型', '备注过长。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REMARK\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LENGTH( CONVERT ( T.REMARK USING GBK ) ) > 256 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.002.103', 't_r_lczx_prod_duration_register', '同一个产品不同的记录之间,“产品登记编码”与“业务结束日”两个要素不得同时重复', '该发行机构下已存在该产品的存续期信息。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n\'@BATCH_ID\' AS BATCH_ID,\r\n\'@RULE_CODE\' AS RULE_CODE,\r\nN_ID as N_ID_LIST,\r\n\'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n0 AS RESULT_CODE,\r\n\'@FILE_DATE\' AS FILE_DATE,\r\nFUND_CATEGORY AS INSTI_TYPE,\r\nNULL AS LEFT_CALCULATION_VALUE,\r\nNULL AS RIGHT_CALCULATION_VALUE,\r\nNULL AS DIFFERENCE \r\nFROM(\r\n select N_ID ,FUND_CATEGORY,FILE_DATE,REPFINPRODREGID,REPBUSMDATE from T_R_LCZX_PROD_DURATION_REGISTER\r\n group by REPFINPRODREGID,REPBUSMDATE\r\n having count(1)>1) T\r\n where T.FILE_DATE = \'@FILE_DATE\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.001', 't_r_lczx_underlying_assets', '{发行机构代码}为必填项', '{发行机构代码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ISSUER_ORG_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND ISSUER_ORG_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.002', 't_r_lczx_underlying_assets', '理财报表,{发行机构代码}为Z70033', '理财报表,{发行机构代码}为Z70033', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ISSUER_ORG_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_UNDERLYING_ASSETS T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.ISSUER_ORG_CODE <>\'Z70033\' \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.003', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}为必填项', '{对应资管及委外资产行内资产/负债编码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND ASSET_LIABILITY_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.004', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}不得含中文', '{对应资管及委外资产行内资产/负债编码}不得含中文', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(T.ASSET_LIABILITY_CODE) <> CHAR_LENGTH(T.ASSET_LIABILITY_CODE) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.005', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}长度不能超过40位', '{对应资管及委外资产行内资产/负债编码}长度不能超过40位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(ASSET_LIABILITY_CODE)>40 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.006', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}与{底层资产行内资产负债/编码}不能相等', '{对应资管及委外资产行内资产/负债编码}与{底层资产行内资产负债/编码}不能相等', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE,ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_LIABILITY_CODE=ASSET_LIABILITY_CODE \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.007', 't_r_lczx_underlying_assets', '“持仓日期”、“对应资管及委外资产行内资产/负债编码”和“底层资产行内资产/负债编码”不能同时重复', '“持仓日期”、“对应资管及委外资产行内资产/负债编码”和“底层资产行内资产/负债编码”不能同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPORT_DATE,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n N_ID ,\r\n FUND_CATEGORY,\r\n FILE_DATE,\r\nDEPT_NO \r\nFROM\r\n t_r_lczx_underlying_assets T \r\nGROUP BY\r\n T.REPORT_DATE,\r\n T.ASSET_LIABILITY_CODE,\r\n T.UNDERLYING_ASSET_LIABILITY_CODE,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nHAVING\r\n COUNT( 1 ) > 1 \r\n ) T \r\n WHERE\r\n T.FILE_DATE = \'@FILE_DATE\'\r\n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.008', 't_r_lczx_underlying_assets', '{资管及委外资产当前总折算人民币发行金额}为必填项', '{资管及委外资产当前总折算人民币发行金额}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_AMOUNT IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.009', 't_r_lczx_underlying_assets', '{资管及委外资产当前总折算人民币发行金额}大于等于0', '{资管及委外资产当前总折算人民币发行金额}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_AMOUNT <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.011', 't_r_lczx_underlying_assets', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总折算人民币发行金额}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总折算人民币发行金额}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,AGG_AMOUNT\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets T\n INNER JOIN t_r_lczx_underlying_assets T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \nAND T.AGG_AMOUNT <> T1.AGG_AMOUNT \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.013', 't_r_lczx_underlying_assets', '{资管及委外资产当前总数量}为必填项', '{资管及委外资产当前总数量}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_QUANTITY IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.014', 't_r_lczx_underlying_assets', '{资管及委外资产当前总数量}大于等于0', '{资管及委外资产当前总数量}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_QUANTITY <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.016', 't_r_lczx_underlying_assets', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总数量}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总数量}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,AGG_QUANTITY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets T\n INNER JOIN t_r_lczx_underlying_assets T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \n AND T.AGG_QUANTITY <> T1.AGG_QUANTITY \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.018', 't_r_lczx_underlying_assets', '{资管及委外资产未投资头寸]为必填项', '{资管及委外资产未投资头寸]为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'NON_INVESTED_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND NON_INVESTED_AMOUNT IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.019', 't_r_lczx_underlying_assets', '{资管及委外资产未投资头寸}大于等于0', '{资管及委外资产未投资头寸}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'NON_INVESTED_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND NON_INVESTED_AMOUNT <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.021', 't_r_lczx_underlying_assets', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产未投资头寸}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产未投资头寸}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,NON_INVESTED_AMOUNT\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets T\n INNER JOIN t_r_lczx_underlying_assets T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \n AND T.NON_INVESTED_AMOUNT <> T1.NON_INVESTED_AMOUNT \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.022', 't_r_lczx_underlying_assets', '{底层资产行内资产/负债编码}为必填项', '{底层资产行内资产/负债编码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_LIABILITY_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.023', 't_r_lczx_underlying_assets', '{底层资产行内资产/负债编码}长度不超过40位', '{底层资产行内资产/负债编码}长度不超过40位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(UNDERLYING_ASSET_LIABILITY_CODE)>40 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.024', 't_r_lczx_underlying_assets', '{底层资产行内资产/负债编码}不得含中文', '{底层资产行内资产/负债编码}不得含中文', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(T.UNDERLYING_ASSET_LIABILITY_CODE) <> CHAR_LENGTH(T.UNDERLYING_ASSET_LIABILITY_CODE) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.026', 't_r_lczx_underlying_assets', '{底层资产持仓数量}为必填项', '{底层资产持仓数量}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_QUANTITY IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.027', 't_r_lczx_underlying_assets', '{底层资产持仓数量}大于等于0', '{底层资产持仓数量}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_QUANTITY <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.030', 't_r_lczx_underlying_assets', '{底层资产折算人民币市值}为必填项', '{底层资产折算人民币市值}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_MARKET_VALUE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_MARKET_VALUE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.031', 't_r_lczx_underlying_assets', '{底层资产折算人民币市值}大于等于0', '{底层资产折算人民币市值}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_MARKET_VALUE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_MARKET_VALUE <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.033', 't_r_lczx_underlying_assets', '{持仓日期}为必填项', '{持仓日期}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPORT_DATE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.034', 't_r_lczx_underlying_assets', '{持仓日期}日期类型,八位,格式为yyyymmdd', '{持仓日期}日期类型,八位,格式为yyyymmdd', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND (REPORT_DATE REGEXP \'[^0-9]\'=1 OR LENGTH(REPORT_DATE)<>8) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.035', 't_r_lczx_underlying_assets', '{持仓日期}值为周末或者月末的最后一个自然日', '{持仓日期}值为周末或者月末的最后一个自然日', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\n FROM t_r_lczx_underlying_assets T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND (REPORT_DATE <> DATE_FORMAT(last_day(REPORT_DATE),\'%Y%m%d\')\nAND DAYOFWEEK(REPORT_DATE) <> 1 AND DAYOFWEEK(REPORT_DATE) <> 7)\nOR (IS_DATE_TYPE(REPORT_DATE, 1)=0)\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.036', 't_r_lczx_underlying_assets', '{底层资产行内资产/负债编码}对应资产必须已经完成资产要素登记', '{底层资产行内资产/负债编码}对应资产必须已经完成资产要素登记', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\n from t_r_lczx_underlying_assets t\n where T.FILE_DATE = \'@FILE_DATE\' \n and UNDERLYING_ASSET_LIABILITY_CODE NOT IN \n (select REP_FINPROD_ID FROM t_r_lczx_zcys_all_result) \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.037', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}应能匹配数据库中已有的记录', '对应资管及委外资产行内资产/负债编码不存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (\r\nselect a.N_ID ,a.FILE_DATE,a.FUND_CATEGORY,a.ASSET_LIABILITY_CODE,a.DEPT_NO from t_r_lczx_underlying_assets a\r\nleft join t_r_lczx_zcys_all_result b\r\non a.ASSET_LIABILITY_CODE=b.REP_FINPROD_ID\r\nwhere b.REP_FINPROD_ID is null\r\n ) T \r\n where T.FILE_DATE = \'@FILE_DATE\'\r\n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.040', 't_r_lczx_underlying_assets', '{对应资管及委外资产行内资产/负债编码}、{底层资产行内资产/负债编码}、{持仓日期}三个要素在不同记录间不得重复,不得重复登记', '对应资管及委外资产行内资产/负债编码,底层资产行内资产负债/编码和持仓日期记录在系统中重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM(\r\nselect N_ID ,FILE_DATE,FUND_CATEGORY,DEPT_NO,count(1)over(PARTITION by ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE,FUND_CATEGORY) as number from (\r\nselect DEPT_NO,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE, N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_underlying_assets\r\nunion all \r\nselect DEPT_NO,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE, null as N_ID , \'@FILE_DATE\' as FILE_DATE,FUND_CATEGORY from t_r_lczx_underlying_assets_result) a\r\n) T\r\nwhere FILE_DATE = \'@FILE_DATE\'\r\nAND number>1 \r\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX.A.032.041', 't_r_lczx_underlying_assets', '{底层资产行内资产负债/编码}应能匹配数据库中已有的记录', '底层资产行内资产负债/编码不存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM(\r\nselect A.UNDERLYING_ASSET_LIABILITY_CODE,A.N_ID ,A.FUND_CATEGORY, A.FILE_DATE,A.DEPT_NO FROM t_r_lczx_underlying_assets A\r\nLEFT JOIN t_r_lczx_underlying_assets_result B\r\nON A.UNDERLYING_ASSET_LIABILITY_CODE=B.UNDERLYING_ASSET_LIABILITY_CODE\r\nWHERE B.UNDERLYING_ASSET_LIABILITY_CODE is null\r\n) T \r\nWHERE T.FILE_DATE =\'@FILE_DATE\'\r\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.001', 't_r_lczx_prod_duration_register_bank', '{发行机构代码}为必填项', '发行机构代码要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPISSUEPARTYID IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.002', 't_r_lczx_prod_duration_register_bank', '{发行机构代码}仅可填英文或数字', '发行机构代码要素格式不对。正确的格式:6位英文或数字。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID REGEXP \'[^A-Z0-9]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.003', 't_r_lczx_prod_duration_register_bank', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', '发行机构代码必须与银行代码相同。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID <> \'C10307\' ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.004', 't_r_lczx_prod_duration_register_bank', '{发行机构代码}6位字符型,定长', '{发行机构代码}6位字符型,定长', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LENGTH( convert (REPISSUEPARTYID using GBK) ) <> 6 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.005', 't_r_lczx_prod_duration_register_bank', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', '理财报表,{发行机构代码}为Z70033;银行报表,{发行机构代码}为C10307', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPISSUEPARTYID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPISSUEPARTYID <> \'C10307\' ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.006', 't_r_lczx_prod_duration_register_bank', '{发行机构代码},产品登记编码,{业务结束日}不能有重复记录', '{发行机构代码},产品登记编码,{业务结束日}不能有重复记录', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPISSUEPARTYID,REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\r\nFROM (SELECT REPFINPRODREGID, REPISSUEPARTYID, REPBUSMDATE,\r\n N_ID , FUND_CATEGORY, FILE_DATE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n GROUP BY T1.REPFINPRODREGID, T1.REPISSUEPARTYID, T1.REPBUSMDATE,\r\n T1.FILE_DATE\r\n HAVING COUNT(1) > 1) T\r\n WHERE T.FILE_DATE = \'@FILE_DATE\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.007', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}为必填项', '产品登记编码要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPFINPRODREGID IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.008', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}仅可填英文和数字', '产品登记编码要素格式不对。正确的格式:14或15位英文或数字。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID AS N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPFINPRODREGID REGEXP \'[^A-Z0-9]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.009', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}必须与发行机构登记信息保持一致,即必须是该银行发行的产品', '该产品不存在。', 'sql', '0', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPFINPRODREGID\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LEFT ( REPFINPRODREGID, 6 ) <> \'C10307\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.010', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}数据类型为:14位字符型,定长(公募理财产品)/15位字符型,定长(私募理财产品)', '{产品登记编码}数据类型为:14位字符型,定长(公募理财产品)/15位字符型,定长(私募理财产品)', 'sql', '0', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n T1.FILE_DATE,\r\n T1.N_ID ,\r\n T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,\r\n T2.ISSUE_TYPE \r\nFROM\r\n t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2 ON T1.REPFINPRODREGID = T2.PROD_REG_ID \r\n ) T \r\nWHERE\r\n T.FILE_DATE = \'@FILE_DATE\' \r\n AND((length(convert (REPFINPRODREGID using GBK)) in (\'14\',\'15\') and (\r\n (\r\n ( LENGTH( CONVERT ( REPFINPRODREGID USING GBK ) ) <> 14 AND ISSUE_TYPE = \'公募\' OR REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1 ) \r\n OR ( LENGTH( CONVERT ( REPFINPRODREGID USING GBK ) ) <> 15 AND ISSUE_TYPE = \'私募\' OR REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1 ) \r\n )))\r\n or (length(convert (REPFINPRODREGID using GBK)) NOT IN (\'14\',\'15\') or REPFINPRODREGID REGEXP \'[^A-Za-z0-9]\' = 1));');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.011', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}和{业务结束日}这2个要素不可同时重复', '{产品登记编码}和{业务结束日}这2个要素不可同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n N_ID ,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nFROM\r\n t_r_lczx_prod_duration_register_bank T1 \r\nGROUP BY\r\n T1.REPFINPRODREGID,\r\n T1.REPBUSMDATE,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nHAVING\r\n COUNT( 1 ) > 1 \r\n ) T \r\n WHERE\r\n T.FILE_DATE = \'@FILE_DATE\' ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.012', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}已进行募集登记的产品可进行存续期登记', '{产品登记编码}已进行募集登记的产品可进行存续期登记', 'sql', '0', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID\' AS COLUMN_CODE,\r\n RESULT_CODE,\r\n FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\n from (\r\n select \r\n CASE WHEN PROD_REG_CODE IS NULL THEN 0 ELSE 1 END AS RESULT_CODE,\r\n A.N_ID ,\r\n A.FUND_CATEGORY,\r\n A.FILE_DATE\r\nfrom \r\n (select REPFINPRODREGID,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register_bank\r\n ) a\r\n left join \r\n (select PROD_REG_CODE,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_raise_register_result) b\r\n on a.REPFINPRODREGID=b.PROD_REG_CODE\r\n AND a.FUND_CATEGORY=b.FUND_CATEGORY) T \r\n WHERE T.FILE_DATE = \'@FILE_DATE\' \r\n AND T.RESULT_CODE=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.014', 't_r_lczx_prod_duration_register_bank', '{产品登记编码}与{业务起始日期}值不能同时重复', '{产品登记编码}与{业务起始日期}值不能同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSVDATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM ( \r\nSELECT N_ID ,FUND_CATEGORY,FILE_DATE\r\nFROM t_r_lczx_prod_duration_register_bank T1\r\nGROUP BY T1.REPFINPRODREGID,T1.REPBUSVDATE,FUND_CATEGORY,FILE_DATE \r\nHAVING COUNT(1) > 1)T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.016', 't_r_lczx_prod_duration_register_bank', '{初始净值}大于等于0', '初始净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPINITNETVAL\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPINITNETVAL IS NOT NULL\nAND T.REPINITNETVAL < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.017', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{初始净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{初始净值}选填', '对于净值型产品,初始净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPINITNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPINITNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.018', 't_r_lczx_prod_duration_register_bank', '关联产品基本信息表,判断净值型产品,校验{初始净值}= 1。', '关联产品基本信息表,判断净值型产品,校验{初始净值}= 1。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID,T1.REPINITNETVAL,\r\n T2.OPER_TYPE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.OPER_TYPE LIKE \'%净值%\' AND T.REPINITNETVAL <> 1;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.019', 't_r_lczx_prod_duration_register_bank', '{初始净值}在整个产品存续登记期间应保持不变。', '{初始净值}在整个产品存续登记期间应保持不变。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n T.N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPINITNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n T.FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM \r\n(SELECT REPFINPRODREGID,REPINITNETVAL,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register_bank) T\r\nLEFT JOIN t_r_lczx_prod_duration_register_result B\r\nON T.REPFINPRODREGID=B.REPFINPRODREGID\r\nAND T.REPINITNETVAL=B.REPINITNETVAL\r\nWHERE T.FILE_DATE=\'@FILE_DATE\'\r\nAND (B.REPINITNETVAL IS NULL and B.REPFINPRODREGID IS NULL)\r\nand T.REPFINPRODREGID in (select REPFINPRODREGID from t_r_lczx_prod_duration_register_result );');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.021', 't_r_lczx_prod_duration_register_bank', '{产品净值}非空时,数值须大于0', '产品净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPPRODNETVAL\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODNETVAL IS NOT NULL\nAND T.REPPRODNETVAL <= 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.022', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{产品净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{产品净值}选填', '对于净值型产品,产品净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPPRODNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPPRODNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPPRODNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.024', 't_r_lczx_prod_duration_register_bank', '{累计净值}非空时,数值须大于0', '累计净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPSUMNETVAL\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMNETVAL IS NOT NULL\nAND T.REPSUMNETVAL <= 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.025', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{累计净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{累计净值}选填', '对于净值型产品,累计净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPSUMNETVAL\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPSUMNETVAL,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPSUMNETVAL IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.028', 't_r_lczx_prod_duration_register_bank', '{净值币种}在《世界各地货币代码》中必须存在', '{净值币种}在《世界各地货币代码》中必须存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPNETVALCCY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPNETVALCCY IS NOT NULL\nAND GET_CURRENCY_MAPPING(T.REPNETVALCCY) = 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.031', 't_r_lczx_prod_duration_register_bank', '{净值币种}填写币种对应的三位代码(如 CNY)', '{净值币种}填写币种对应的三位代码(如 CNY)', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPNETVALCCY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n T_R_LCZX_PROD_DURATION_REGISTER_BANK T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND ( T.REPNETVALCCY REGEXP \'[^A-Z]\' = 1 OR LENGTH ( T.REPNETVALCCY ) <> 3 OR GET_DICT ( \'LCZX_CURRENCY\', REPNETVALCCY ) = 0 ) ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.032', 't_r_lczx_prod_duration_register_bank', '{折算人民币初始净值}大于等于0', '折算人民币初始净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPINITNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND IFNULL(T.REPINITNETVALCNY,0) < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.033', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币初始净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币初始净值}选填', '对于净值型产品,折算人民币初始净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPINITNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPINITNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPINITNETVALCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.034', 't_r_lczx_prod_duration_register_bank', '{币种}=“CNY“时,{初始净值}={折算人民币初始净值}', '当初始净值的币种为人民币(CNY)时,折算人民币初始净值与初始净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPNETVALCCY,REPINITNETVAL,REPINITNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER_BANK T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPNETVALCCY=\'CNY\'\nAND REPINITNETVAL<>REPINITNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.035', 't_r_lczx_prod_duration_register_bank', '{折算人民币初始净值}在整个存续登记期间应固定不变', '{折算人民币初始净值}在整个存续登记期间应固定不变', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n A.N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPINITNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n A.FILE_DATE,\r\n A.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM \r\n(SELECT REPFINPRODREGID,REPINITNETVALCNY,N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_prod_duration_register_bank) A\r\nLEFT JOIN t_r_lczx_prod_duration_register_bank_result B\r\nON A.REPFINPRODREGID=B.REPFINPRODREGID\r\nAND A.REPINITNETVALCNY=B.REPINITNETVALCNY\r\nWHERE A.FILE_DATE=\'@FILE_DATE\'\r\nAND (B.REPINITNETVALCNY IS NULL and B.REPFINPRODREGID IS NULL)\r\nand A.REPFINPRODREGID in (select REPFINPRODREGID from t_r_lczx_prod_duration_register_bank_result );');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.037', 't_r_lczx_prod_duration_register_bank', '{折算人民币净值}非空时,数值须大于0', '折算人民币净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPNETVALCNY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPNETVALCNY <= 0\nAND T.REPNETVALCNY IS NOT NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.038', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币净值}选填', '对于净值型产品,折算人民币净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPNETVALCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.039', 't_r_lczx_prod_duration_register_bank', '{币种}=“CNY“时,{产品净值}={折算人民币净值}', '当产品净值的币种为人民币(CNY)时,折算人民币净值与产品净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPPRODNETVAL,REPNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPNETVALCCY=\'CNY\'\nAND REPPRODNETVAL<>REPNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.041', 't_r_lczx_prod_duration_register_bank', '{折算人民币累计净值}非空时,数值须大于0', '折算人民币累计净值必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_PROD_DURATION_REGISTER_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMNETVALCNY <= 0\nand T.REPSUMNETVALCNY is not null;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.042', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{折算人民币累计净值}必填,选择“开放式非净值型”和“封闭式非净值型”的,{折算人民币累计净值}选填', '对于净值型产品,折算人民币累计净值不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPSUMNETVALCNY\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPSUMNETVALCNY,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPSUMNETVALCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.043', 't_r_lczx_prod_duration_register_bank', '{币种}=“CNY“时,{累计净值}={折算人民币累计净值}', '当累计净值的币种为人民币(CNY)时,折算人民币累计净值与累计净值必须相等。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMNETVAL,REPSUMNETVALCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n REPSUMNETVAL AS LEFT_CALCULATION_VALUE, REPSUMNETVALCNY AS RIGHT_CALCULATION_VALUE,\n ABS(REPSUMNETVAL-REPSUMNETVALCNY) AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPNETVALCCY=\'CNY\'\nAND REPSUMNETVAL<>REPSUMNETVALCNY;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.045', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{净值日期}必填,选择“开放式非净值型”和“封闭式非净值型”的,{净值日期}选填', '对于净值型产品,净值日期不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'VAL_DATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\n T1.REPFINPRODREGID,T1.N_ID as N_ID_LIST,T1.VAL_DATE,\n T3.OPERATION_MODE\n FROM t_r_lczx_prod_duration_register_bank T1\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\n LEFT JOIN t_r_lczx_filing_register_result T3\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND OPERATION_MODE IN(\'03\',\'01\') AND VAL_DATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.046', 't_r_lczx_prod_duration_register_bank', '{净值日期}日期型,八位长字符,格式为 yyyymmdd', '净值日期必须为日期格式(YYYY-MM-DD);净值日期必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'VAL_DATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND VAL_DATE IS NOT NULL\n AND is_date_type(VAL_DATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.047', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{实现收益率%}必填,选择“开放式非净值型”和“封闭式非净值型”的,{实现收益率%}选填', '对于非净值型产品,实现收益率不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPACHIYIELD\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPACHIYIELD,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPACHIYIELD IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.054', 't_r_lczx_prod_duration_register_bank', '{银行实现收益}为必填项', '银行实现收益(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPACHIPROFITCNY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPACHIPROFITCNY IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.058', 't_r_lczx_prod_duration_register_bank', '{业务起始日}为必填项', '业务起始日要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPBUSVDATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.059', 't_r_lczx_prod_duration_register_bank', '{业务起始日}日期型,八位长字符,格式为 yyyymmdd', '业务起始日必须为日期格式(YYYY-MM-DD);业务起始日必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND IS_DATE_TYPE(REPBUSVDATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.060', 't_r_lczx_prod_duration_register_bank', '{业务结束日}需大于等于{业务起始日}', '{业务结束日}需大于等于{业务起始日}', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSMDATE,REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPBUSMDATE < T.REPBUSVDATE ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.061', 't_r_lczx_prod_duration_register_bank', '{业务结束日}为必填项', '业务结束日要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPBUSMDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPBUSMDATE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.062', 't_r_lczx_prod_duration_register_bank', '{业务结束日}日期型,八位长字符,格式为 yyyymmdd', '业务结束日必须为日期格式(YYYY-MM-DD);业务结束日必须为正确日期。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSMDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND is_date_type(REPBUSMDATE,1)=0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.063', 't_r_lczx_prod_duration_register_bank', '{业务结束日}需大于等于{业务起始日}', '业务结束日必须大于等于业务起始日。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPBUSMDATE,REPBUSVDATE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND T.REPBUSMDATE < T.REPBUSVDATE ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.064', 't_r_lczx_prod_duration_register_bank', '存续期登记:同一只产品存续期登记时,业务结束日不得重复', '产品登记编码和业务结束日在报文内不可同时重复。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT REPFINPRODREGID, REPBUSMDATE, N_ID ,\r\n FUND_CATEGORY, FILE_DATE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n GROUP BY T1.REPFINPRODREGID, T1.REPBUSMDATE, T1.FILE_DATE\r\n HAVING COUNT(1) > 1) T\r\n WHERE T.FILE_DATE = \'@FILE_DATE\';');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.065', 't_r_lczx_prod_duration_register_bank', '{币种}为必填项', '币种要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.SUBSCRIPTIONHONOR IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.067', 't_r_lczx_prod_duration_register_bank', '{币种}单选和多选的值必须在《世界各地货币代码》中存在', '币种不在值域范围内。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM T_R_LCZX_PROD_DURATION_REGISTER_BANK T\r\nWHERE T.file_date=\'@FILE_DATE\'\r\nAND (T.SUBSCRIPTIONHONOR IS NOT NULL\r\nAND T.N_ID IN\r\n(SELECT T2.N_ID FROM \r\n(select N_ID ,file_date,SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(A.SUBSCRIPTIONHONOR, \';\', B.HELP_TOPIC_ID + 1),\';\',-1),\',\',1) as SUBSCRIPTIONHONOR\r\nfrom T_R_LCZX_PROD_DURATION_REGISTER_BANK a\r\nJOIN pawmrpcs.help_topic b\r\non help_topic_id<(length(a.SUBSCRIPTIONHONOR)-length(replace(a.SUBSCRIPTIONHONOR,\';\',\'\'))+1)\r\nwhere file_date=\'@FILE_DATE\') T2\r\nWHERE GET_DICT(\'LCZX_CURRENCY\',T2.SUBSCRIPTIONHONOR) = 0));');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.068', 't_r_lczx_prod_duration_register_bank', '{币种}填写币种对应的三位代码 (如 CNY)', '{币种}填写币种对应的三位代码 (如 CNY)', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID AS N_ID_LIST,\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LEFT ( SUBSCRIPTIONHONOR, 3 ) REGEXP \'[^A-Z]\' = 1 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.071', 't_r_lczx_prod_duration_register_bank', '{该币种累计申购金额}为必填项', '该币种累计申购金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 2), \',\',\r\n -1) AS BZLJSGJE, REPISSUEPARTYID, N_ID, FILE_DATE,\r\n FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZLJSGJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.072', 't_r_lczx_prod_duration_register_bank', '{该币种累计申购金额}大于等于0', '该币种累计申购金额(元)必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 2), \',\',\r\n -1) AS BZLJSGJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZLJSGJE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.074', 't_r_lczx_prod_duration_register_bank', '{该币种累计兑付金额}为必填项', '该币种累计兑付金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS BZDFJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.075', 't_r_lczx_prod_duration_register_bank', '{该币种累计兑付金额}大于等于0', '该币种累计兑付金额(元)必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS BZDFJE, REPISSUEPARTYID, N_ID , FILE_DATE,\r\n FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.077', 't_r_lczx_prod_duration_register_bank', '{该币种累计兑付收益金额}为必填项', '该币种累计兑付收益金额(元)要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', -1) AS DFSYJE,\r\n REPISSUEPARTYID, N_ID , FILE_DATE, FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.DFSYJE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.078', 't_r_lczx_prod_duration_register_bank', '{该币种累计兑付收益金额}小于等于{该币种累计兑付金额}', '该币种累计兑付收益金额(元)必须小于等于该币种累计兑付金额(元)。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'SUBSCRIPTIONHONOR\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\r\n T.BZDFJE AS LEFT_CALCULATION_VALUE, T.BZSYJE AS RIGHT_CALCULATION_VALUE,\r\n ABS(T.BZDFJE - T.BZSYJE) AS DIFFERENCE\r\nFROM (SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', 3), \',\',\r\n -1) AS DECIMAL(38,6)) AS BZDFJE,\r\n CAST(SUBSTRING_INDEX(SUBSCRIPTIONHONOR, \',\', -1) AS DECIMAL(38,6)) AS BZSYJE,\r\n REPISSUEPARTYID, N_ID , FILE_DATE, FUND_CATEGORY\r\n FROM t_r_lczx_prod_duration_register_bank A) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND T.BZDFJE < T.BZSYJE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.080', 't_r_lczx_prod_duration_register_bank', '{累计申购份额}为必填项', '累计申购份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMAPPLYSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMAPPLYSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.081', 't_r_lczx_prod_duration_register_bank', '{累计申购份额}大于等于0', '累计申购份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMAPPLYSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMAPPLYSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.084', 't_r_lczx_prod_duration_register_bank', '{累计赎回份额}为必填项', '累计赎回份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMCASHSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMCASHSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.085', 't_r_lczx_prod_duration_register_bank', '{累计赎回份额}大于等于0', '累计赎回份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPSUMCASHSHARE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPSUMCASHSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.088', 't_r_lczx_prod_duration_register_bank', '{每万份份额分红}大于等于0', '每万份份额分红必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'SHARE_FH\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.SHARE_FH < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.090', 't_r_lczx_prod_duration_register_bank', '{每万份现金分红}大于等于0', '每万份现金分红必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNIT_BONUS_VLU\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.UNIT_BONUS_VLU < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.092', 't_r_lczx_prod_duration_register_bank', '{产品余额}大于等于0', '产品余额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPPRODBALANCE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODBALANCE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.095', 't_r_lczx_prod_duration_register_bank', '{产品运作模式}选择“开放式净值型”和“封闭式净值型”的,{产品余额}必填,选择“开放式非净值型”和“封闭式非净值型”的,{产品余额}选填', '对于非净值型产品,产品余额不能为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST, \'REPPRODBALANCE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\r\n T.FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (SELECT T1.FILE_DATE,T1.FUND_CATEGORY,\r\n T1.REPFINPRODREGID,T1.N_ID ,T1.REPPRODBALANCE,\r\n T3.OPERATION_MODE\r\n FROM t_r_lczx_prod_duration_register_bank T1\r\n LEFT JOIN pawm_fact_pd_prod_base_info_fd T2\r\n ON T2.PROD_REG_ID = T1.REPFINPRODREGID\r\n LEFT JOIN t_r_lczx_filing_register_result T3\r\n ON T3.PRO_CODE = T2.FINPROD_MARKET_ID ) T\r\nWHERE T.FILE_DATE = \'@FILE_DATE\'\r\nAND OPERATION_MODE IN(\'03\',\'01\') AND REPPRODBALANCE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.097', 't_r_lczx_prod_duration_register_bank', '{产品份额}为必填项', '产品份额要素不可为空。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPPRODSHARE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODSHARE IS NULL;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.098', 't_r_lczx_prod_duration_register_bank', '{产品份额}大于等于0', '产品份额必须大于等于0。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST, \'REPPRODSHARE\' AS COLUMN_CODE,\n 0 AS RESULT_CODE, \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE, NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE, NULL AS DIFFERENCE\nFROM t_r_lczx_prod_duration_register_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.REPPRODSHARE < 0;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.101', 't_r_lczx_prod_duration_register_bank', '{备注}最长256位字符型', '备注过长。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REMARK\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_prod_duration_register_bank T \nWHERE\n T.FILE_DATE = \'@FILE_DATE\' \n AND LENGTH( CONVERT ( T.REMARK USING GBK ) ) > 256 ;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.002.103', 't_r_lczx_prod_duration_register_bank', '同一个产品不同的记录之间,“产品登记编码”与“业务结束日”两个要素不得同时重复', '该发行机构下已存在该产品的存续期信息。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n\'@BATCH_ID\' AS BATCH_ID,\r\n\'@RULE_CODE\' AS RULE_CODE,\r\nN_ID as N_ID_LIST,\r\n\'REPFINPRODREGID,REPBUSMDATE\' AS COLUMN_CODE,\r\n0 AS RESULT_CODE,\r\n\'@FILE_DATE\' AS FILE_DATE,\r\nFUND_CATEGORY AS INSTI_TYPE,\r\nNULL AS LEFT_CALCULATION_VALUE,\r\nNULL AS RIGHT_CALCULATION_VALUE,\r\nNULL AS DIFFERENCE \r\nFROM(\r\n select N_ID ,FUND_CATEGORY,FILE_DATE,REPFINPRODREGID,REPBUSMDATE from t_r_lczx_prod_duration_register_bank\r\n where FILE_DATE = \'@FILE_DATE\'\r\n group by REPFINPRODREGID,REPBUSMDATE\r\n having count(1)>1) T\r\n GROUP BY\r\n T.FUND_CATEGORY,\r\n T.FILE_DATE;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.001', 't_r_lczx_underlying_assets_bank', '{发行机构代码}为必填项', '{发行机构代码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ISSUER_ORG_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND ISSUER_ORG_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.002', 't_r_lczx_underlying_assets_bank', '银行报表,{发行机构代码}为C10307', '发行机构代码必须与银行代码相同 AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;发行机构代码要素格式不对。正确的格式:6位英文或数字。', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ISSUER_ORG_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM T_R_LCZX_UNDERLYING_ASSETS_BANK T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND T.ISSUER_ORG_CODE <>\'C10307\'\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.003', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}为必填项', '{对应资管及委外资产行内资产/负债编码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND ASSET_LIABILITY_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.004', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}不得含中文', '{对应资管及委外资产行内资产/负债编码}不得含中文', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(T.ASSET_LIABILITY_CODE) <> CHAR_LENGTH(T.ASSET_LIABILITY_CODE) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.005', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}长度不能超过40位', '{对应资管及委外资产行内资产/负债编码}长度不能超过40位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(ASSET_LIABILITY_CODE)>40 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.006', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}与{底层资产行内资产负债/编码}不能相等', '{对应资管及委外资产行内资产/负债编码}与{底层资产行内资产负债/编码}不能相等', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE,ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_LIABILITY_CODE=ASSET_LIABILITY_CODE \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.007', 't_r_lczx_underlying_assets_bank', '“持仓日期”、“对应资管及委外资产行内资产/负债编码”和“底层资产行内资产/负债编码”不能同时重复', '“持仓日期”、“对应资管及委外资产行内资产/负债编码”和“底层资产行内资产/负债编码”不能同时重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\r\n \'@BATCH_ID\' AS BATCH_ID,\r\n \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'REPORT_DATE,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE,\r\n 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE,\r\n FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE,\r\n NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE \r\nFROM\r\n (\r\nSELECT\r\n N_ID ,\r\n FUND_CATEGORY,\r\n FILE_DATE,\r\nDEPT_NO \r\nFROM\r\n t_r_lczx_underlying_assets_bank T \r\nGROUP BY\r\n T.REPORT_DATE,\r\n T.ASSET_LIABILITY_CODE,\r\n T.UNDERLYING_ASSET_LIABILITY_CODE,\r\n FUND_CATEGORY,\r\n FILE_DATE \r\nHAVING\r\n COUNT( 1 ) > 1 \r\n ) T \r\n WHERE T.FILE_DATE = \'@FILE_DATE\' \r\n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.008', 't_r_lczx_underlying_assets_bank', '{资管及委外资产当前总折算人民币发行金额}为必填项', '{资管及委外资产当前总折算人民币发行金额}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_AMOUNT IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.009', 't_r_lczx_underlying_assets_bank', '{资管及委外资产当前总折算人民币发行金额}大于等于0', '{资管及委外资产当前总折算人民币发行金额}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_AMOUNT <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.011', 't_r_lczx_underlying_assets_bank', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总折算人民币发行金额}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总折算人民币发行金额}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,AGG_AMOUNT\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets_bank T\n INNER JOIN t_r_lczx_underlying_assets_bank T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \n AND T.AGG_AMOUNT <> T1.AGG_AMOUNT \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.013', 't_r_lczx_underlying_assets_bank', '{资管及委外资产当前总数量}为必填项', '{资管及委外资产当前总数量}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_QUANTITY IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.014', 't_r_lczx_underlying_assets_bank', '{资管及委外资产当前总数量}大于等于0', '{资管及委外资产当前总数量}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'AGG_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND AGG_QUANTITY <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.016', 't_r_lczx_underlying_assets_bank', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总数量}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产当前总数量}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,AGG_QUANTITY\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets_bank T\n INNER JOIN t_r_lczx_underlying_assets_bank T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \n AND T.AGG_QUANTITY <> T1.AGG_QUANTITY \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.018', 't_r_lczx_underlying_assets_bank', '{资管及委外资产未投资头寸]为必填项', '{资管及委外资产未投资头寸]为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'NON_INVESTED_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND NON_INVESTED_AMOUNT IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.019', 't_r_lczx_underlying_assets_bank', '{资管及委外资产未投资头寸}大于等于0', '{资管及委外资产未投资头寸}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'NON_INVESTED_AMOUNT\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND NON_INVESTED_AMOUNT <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.021', 't_r_lczx_underlying_assets_bank', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产未投资头寸}须保持一致', '对于同一{对应资管及委外资产行内资产/负债编码}、同一{持仓日期}下,对于不同{底层资产行内资产/负债编码}的记录,{资管及委外资产未投资头寸}须保持一致', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT\n \'@BATCH_ID\' AS BATCH_ID,\n \'@RULE_CODE\' AS RULE_CODE,\n T.N_ID as N_ID_LIST,\n \'ASSET_LIABILITY_CODE,REPORT_DATE,UNDERLYING_ASSET_LIABILITY_CODE,NON_INVESTED_AMOUNT\' AS COLUMN_CODE,\n 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE,\n T.FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE,\n NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE \nFROM\n t_r_lczx_underlying_assets_bank T\n INNER JOIN t_r_lczx_underlying_assets_bank T1 ON T.ASSET_LIABILITY_CODE = T1.ASSET_LIABILITY_CODE \n AND T.REPORT_DATE = T1.REPORT_DATE \n AND T.UNDERLYING_ASSET_LIABILITY_CODE <> T1.UNDERLYING_ASSET_LIABILITY_CODE \n AND T.FILE_DATE = T1.FILE_DATE \n AND T.FUND_CATEGORY = T1.FUND_CATEGORY \nWHERE T.FILE_DATE = \'@FILE_DATE\' \n AND T.NON_INVESTED_AMOUNT <> T1.NON_INVESTED_AMOUNT \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE T.DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.022', 't_r_lczx_underlying_assets_bank', '{底层资产行内资产/负债编码}为必填项', '{底层资产行内资产/负债编码}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_LIABILITY_CODE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.023', 't_r_lczx_underlying_assets_bank', '{底层资产行内资产/负债编码}长度不超过40位', '{底层资产行内资产/负债编码}长度不超过40位', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(UNDERLYING_ASSET_LIABILITY_CODE)>40 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.024', 't_r_lczx_underlying_assets_bank', '{底层资产行内资产/负债编码}不得含中文', '{底层资产行内资产/负债编码}不得含中文', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND LENGTH(T.UNDERLYING_ASSET_LIABILITY_CODE) <> CHAR_LENGTH(T.UNDERLYING_ASSET_LIABILITY_CODE) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.026', 't_r_lczx_underlying_assets_bank', '{底层资产持仓数量}为必填项', '{底层资产持仓数量}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_QUANTITY IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.027', 't_r_lczx_underlying_assets_bank', '{底层资产持仓数量}大于等于0', '{底层资产持仓数量}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_QUANTITY\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_QUANTITY IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.030', 't_r_lczx_underlying_assets_bank', '{底层资产折算人民币市值}为必填项', '{底层资产折算人民币市值}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_MARKET_VALUE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_MARKET_VALUE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.031', 't_r_lczx_underlying_assets_bank', '{底层资产折算人民币市值}大于等于0', '{底层资产折算人民币市值}大于等于0', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_MARKET_VALUE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND UNDERLYING_ASSET_MARKET_VALUE <0 \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.033', 't_r_lczx_underlying_assets_bank', '{持仓日期}为必填项', '{持仓日期}为必填项', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND REPORT_DATE IS NULL \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.034', 't_r_lczx_underlying_assets_bank', '{持仓日期}日期类型,八位,格式为yyyymmdd', '{持仓日期}日期类型,八位,格式为yyyymmdd', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\nFROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND (REPORT_DATE REGEXP \'[^0-9]\'=1 OR LENGTH(REPORT_DATE)<>8) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.035', 't_r_lczx_underlying_assets_bank', '{持仓日期}值为周末或者月末的最后一个自然日', '{持仓日期}值为周末或者月末的最后一个自然日', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\n FROM t_r_lczx_underlying_assets_bank T\nWHERE T.FILE_DATE = \'@FILE_DATE\'\nAND (REPORT_DATE <> DATE_FORMAT(last_day(REPORT_DATE),\'%Y%m%d\')\nAND DAYOFWEEK(REPORT_DATE) <> 1 AND DAYOFWEEK(REPORT_DATE) <> 7)\nOR (IS_DATE_TYPE(REPORT_DATE, 1)=0) \nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.036', 't_r_lczx_underlying_assets_bank', '{底层资产行内资产/负债编码}对应资产必须已经完成资产要素登记', '{底层资产行内资产/负债编码}对应资产必须已经完成资产要素登记', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\n N_ID as N_ID_LIST,\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE,0 AS RESULT_CODE,\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\n NULL AS DIFFERENCE\n from t_r_lczx_underlying_assets_bank t\n where T.FILE_DATE = \'@FILE_DATE\'\n and UNDERLYING_ASSET_LIABILITY_CODE NOT IN \n (select REP_FINPROD_ID FROM t_r_lczx_zcys_all_bank_result) \n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.037', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}应能匹配数据库中已有的记录', '对应资管及委外资产行内资产/负债编码不存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM (\r\nselect a.N_ID ,a.FILE_DATE,a.FUND_CATEGORY,a.ASSET_LIABILITY_CODE,a.DEPT_NO from t_r_lczx_underlying_assets_bank a\r\nleft join t_r_lczx_zcys_all_bank_result b\r\non a.ASSET_LIABILITY_CODE=b.REP_FINPROD_ID\r\nwhere b.REP_FINPROD_ID is null\r\n ) T\r\n where T.FILE_DATE = \'@FILE_DATE\'\r\n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.040', 't_r_lczx_underlying_assets_bank', '{对应资管及委外资产行内资产/负债编码}、{底层资产行内资产/负债编码}、{持仓日期}三个要素在不同记录间不得重复,不得重复登记', '对应资管及委外资产行内资产/负债编码,底层资产行内资产负债/编码和持仓日期记录在系统中重复', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM(\r\nselect N_ID ,FILE_DATE,FUND_CATEGORY,DEPT_NO,count(1)over(PARTITION by ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE,FUND_CATEGORY) as number from (\r\nselect DEPT_NO,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE, N_ID ,FILE_DATE,FUND_CATEGORY from t_r_lczx_underlying_assets_bank\r\nunion all \r\nselect DEPT_NO,ASSET_LIABILITY_CODE,UNDERLYING_ASSET_LIABILITY_CODE,REPORT_DATE, null as N_ID , \'@FILE_DATE\' as FILE_DATE,FUND_CATEGORY from t_r_lczx_underlying_assets_result) a\r\n) T\r\nwhere FILE_DATE = \'@FILE_DATE\'\r\nAND number>1 \r\nAND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
INSERT INTO pawmrpcs.data_check_rule_set(`RULE_CODE`, `REPORT_CODE`, `RULE_NAME`, `RULE_DESC`, `RULE_TYPE`, `STATUS`, `COL_CODE`, `EXP_TYPE`, `EXP_DEFINE`, `EXP_PARAM`, `UNION_TYPE`, `RULE_FORMULA`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `RULE_LEVEL`, `RULE_CODE_CREATE_TYPE`, `RULE_SQL`) VALUES ('LCZX_BANK.A.032.041', 't_r_lczx_underlying_assets_bank', '{底层资产行内资产负债/编码}应能匹配数据库中已有的记录', '底层资产行内资产负债/编码不存在', 'sql', '1', NULL, NULL, NULL, NULL, '0', NULL, 'admin', '2021-09-22 11:30:33', 'admin', '2021-09-22 14:40:03', '严重', 'A', 'SELECT \'@BATCH_ID\' AS BATCH_ID, \'@RULE_CODE\' AS RULE_CODE,\r\n N_ID as N_ID_LIST,\r\n \'UNDERLYING_ASSET_LIABILITY_CODE\' AS COLUMN_CODE, 0 AS RESULT_CODE,\r\n \'@FILE_DATE\' AS FILE_DATE, FUND_CATEGORY AS INSTI_TYPE,\r\n NULL AS LEFT_CALCULATION_VALUE, NULL AS RIGHT_CALCULATION_VALUE,\r\n NULL AS DIFFERENCE\r\nFROM(\r\nselect A.UNDERLYING_ASSET_LIABILITY_CODE,A.N_ID ,A.FUND_CATEGORY, A.FILE_DATE,A.DEPT_NO FROM t_r_lczx_underlying_assets_bank A\r\nLEFT JOIN t_r_lczx_underlying_assets_result B\r\nON A.UNDERLYING_ASSET_LIABILITY_CODE=B.UNDERLYING_ASSET_LIABILITY_CODE\r\nWHERE B.UNDERLYING_ASSET_LIABILITY_CODE is null\r\n) T\r\nwhere T.FILE_DATE =\'@FILE_DATE\'\r\n AND CASE WHEN \'@DEPT_NO\'=\'\' THEN 1=1 ELSE DEPT_NO=\'@DEPT_NO\' END;');
19002
最新推荐文章于 2024-11-11 21:16:16 发布