|
|
@@ -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");
|