凭证相关-客户信息传NC过滤内部客商

This commit is contained in:
xiezhiwen 2019-06-27 11:40:15 +08:00
parent 96c8fd7ab7
commit 876e0940c1

View File

@ -133,7 +133,7 @@ public class VoucherToNCforCustomer implements Job{
String year_month_days = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
// 查询为传输或之前传输失败的数据
String sql="SELECT max(cif.customerid) id,cif.customer_num,MAX(cif.customername)customername,MAX(cif.customertype)customertype,MAX(cif.customerid) customerid,MAX(cif.certid) as certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id=cif.customerid LEFT JOIN lb_contract_info lci ON lci.id=lul.contract_id WHERE lci.contract_status >='31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = '"+type+"') GROUP BY CIF.CUSTOMER_NUM ";
String sql="SELECT MAX(cif.customerid) id,cif.customer_num,MAX(cif.customername) customername,MAX(cif.customertype) customertype,MAX(cif.customerid) customerid, MAX(cif.certid) AS certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id = cif.customerid LEFT JOIN lb_contract_info lci ON lci.id = lul.contract_id WHERE lci.contract_status >= '31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = 'customer') AND cif.customer_num NOT IN (SELECT cust_id FROM CUSTOMER_LIST WHERE CUST_STATUS = '2' ) GROUP BY CIF.CUSTOMER_NUM ";
List<Map<String, String>> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null);
if(rs != null && rs.size()>0) {
// 批次号