Pārlūkot izejas kodu

【贝腾】【销售订单返回值增加商机编号】

wub 2 nedēļas atpakaļ
vecāks
revīzija
2e4fc3a885

+ 5 - 1
src/main/java/com/uas/eis/service/Impl/STKServiceImpl.java

@@ -318,7 +318,11 @@ public class STKServiceImpl implements STKService {
 
         List<String> Sql = new ArrayList<>();
         for (BusinessChanceDistributeDTO b : businessChanceDistributeDTOS){
-            Sql.add("update BusinessChance set bc_domancode='"+b.getDomancode()+"',bc_doman='"+b.getDoman()+"',bc_lastdate=to_date('"+b.getLastdate()+"','yyyy-mm-dd') where bc_id="+b.getId()+" and bc_code ='"+b.getCode()+"'");
+            if(b.getDoman() == null || "".equals(b.getDoman())){
+                Sql.add("update BusinessChance set bc_nichehouse='贝腾CRM公海', bc_domancode='', bc_doman='', bc_lastdate=to_date('"+b.getLastdate()+"','yyyy-mm-dd') where bc_id="+b.getId()+" and bc_code ='"+b.getCode()+"'");
+            }else{
+                Sql.add("update BusinessChance set bc_domancode='"+b.getDomancode()+"', bc_doman='"+b.getDoman()+"', bc_lastdate=to_date('"+b.getLastdate()+"','yyyy-mm-dd') where bc_id="+b.getId()+" and bc_code ='"+b.getCode()+"'");
+            }
             Sql.add("insert into messagelog(ML_ID,ML_DATE,ML_MAN,ML_CONTENT,ML_RESULT,ML_SEARCH,CODE) "
                     + "select messageLog_SEQ.nextval,sysdate,'管理员','商机分配','商机分配','BusinessChance|bc_id='||bc_id,bc_code from BusinessChance where bc_id in(" + b.getId() + ")");
         }