Просмотр исходного кода

Merge remote-tracking branch 'origin/develop' into develop-test

wu 4 недель назад
Родитель
Сommit
2c7b172e01
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      src/custom/restcontroller/sale/serviceorder/serviceorder.java

+ 11 - 1
src/custom/restcontroller/sale/serviceorder/serviceorder.java

@@ -205,7 +205,17 @@ public class serviceorder extends Controller {
             if(currentserviceagents.isEmpty()){
                 if (agents.isNotEmpty()) {
                     if (agents.get(0).getBoolean("isservice")) {
-                        sqlList.add("update sa_serviceorder set status='待受理',sys_enterpriseid_service=" + agents.get(0).getLong("sys_enterpriseid") + " where sa_serviceorderid=" + sa_serviceorderid);
+//                        sqlList.add("update sa_serviceorder set status='待受理',sys_enterpriseid_service=" + agents.get(0).getLong("sys_enterpriseid") + " where sa_serviceorderid=" + sa_serviceorderid);
+                        UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_serviceorder");
+                        updateSQL.setUniqueid(sa_serviceorderid);
+                        updateSQL.setSiteid(siteid);
+                        updateSQL.setValue("status", "待受理");
+                        updateSQL.setValue("sys_enterpriseid_service", agents.get(0).getLong("sys_enterpriseid"));
+                        updateSQL.setDateValue("allocationdate");
+                        updateSQL.setValue("allocationby", "自动分配");
+                        sqlList.add(updateSQL.getSQL());
+                        sqlList.add(
+                                DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "自动分配", "服务申请单自动分配成功").getSQL());
                     } else {
                         Rows serviceagents = dbConnect.runSqlQuery("select t1.sys_enterpriseid,t2.province,t2.city,t2.county from sa_agents t1 inner join sa_agents_salescope  t2  on  t1.sa_agentsid=t2.sa_agentsid and t1.siteid=t2.siteid where t1.siteid='" + siteid + "' and status=1 and signingstate!='停用(已止)' and t1.isservice=1");
                         RowsMap countyRowsMap = serviceagents.toRowsMap("county");