Explorar el Código

【越加红】【样品申请单 从CRM下载下来若客户资料没有对应客户编号则取客户预录入中的客户编号 】

samhoo hace 3 años
padre
commit
a87b898db4
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/main/java/com/uas/eis/task/SampleApplyTask.java

+ 4 - 0
src/main/java/com/uas/eis/task/SampleApplyTask.java

@@ -80,6 +80,10 @@ public class SampleApplyTask {
                                 }
 
                                 Object cu_code = baseDao.getFieldDataByCondition("customer", "max(cu_code) cu_code", "CU_FXXKID='" + dataList.get(i).get("field_l6W5b__c") + "' or cu_name='"+dataList.get(i).get("field_l6W5b__c__r")+"'");
+                                Object cu_code_pre = baseDao.getFieldDataByCondition("precustomer", "max(cu_code) cu_code", "CU_FXXKID='" + dataList.get(i).get("field_l6W5b__c") + "' or cu_name='"+dataList.get(i).get("field_l6W5b__c__r")+"'");
+                                if(cu_code == null || "".equals(cu_code.toString()) ){
+                                    cu_code=cu_code_pre;
+                                }
                                 String cuCode =cu_code == null ? "" : cu_code.toString();
                                 //默认样品仓
                                 Object wh_description = baseDao.getFieldDataByCondition("Warehouse", "max(wh_description) wh_description", "wh_code='W02'");