增加金额校验
This commit is contained in:
parent
9a09539001
commit
468f85daaf
@ -70,13 +70,22 @@ public class BIZ022Processor extends AbstractBusinessProcessor {
|
|||||||
* 验证营销记录有效性
|
* 验证营销记录有效性
|
||||||
*/
|
*/
|
||||||
private int validateMarketingRecords(Connection connection, String batchMonth) throws SQLException {
|
private int validateMarketingRecords(Connection connection, String batchMonth) throws SQLException {
|
||||||
String sql = "UPDATE mps_market m " +
|
String sql = "UPDATE mps_market m " +
|
||||||
"SET check_flag = CASE " +
|
"SET check_flag = CASE " +
|
||||||
" WHEN EXISTS ( " +
|
" WHEN EXISTS ( " +
|
||||||
" SELECT 1 FROM mps_import_water s " +
|
" SELECT 1 " +
|
||||||
" WHERE s.customer_code = m.heating_no ) " +
|
" FROM ( " +
|
||||||
" THEN '1' ELSE '9' END " +
|
" SELECT customer_code " +
|
||||||
"WHERE SUBSTR(entry_date, 1, 7) = ? and subcategory_id = 'BIZ022' and del_flag='0' ";
|
" FROM mps_import_water " +
|
||||||
|
" GROUP BY customer_code " +
|
||||||
|
" HAVING SUM(CAST(NULLIF(TRIM(current_payment_amount), '') AS DECIMAL(18,2))) > 20 " +
|
||||||
|
" ) s " +
|
||||||
|
" WHERE s.customer_code = m.heating_no " +
|
||||||
|
" ) THEN '1' ELSE '9' END " +
|
||||||
|
"WHERE " +
|
||||||
|
" SUBSTR(entry_date, 1, 7) = ? " +
|
||||||
|
" AND subcategory_id = 'BIZ022' " +
|
||||||
|
" AND del_flag = '0' ";
|
||||||
|
|
||||||
return executeParameterizedSql(connection, sql, batchMonth);
|
return executeParameterizedSql(connection, sql, batchMonth);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user