|
@@ -122,7 +122,17 @@ public class DispatchAutoCloseService extends ServiceController {
|
|
|
}
|
|
|
|
|
|
if (resultobject.getString("errcode").equals("0")) {
|
|
|
- sqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ if(resultobject.containsKey("results")){
|
|
|
+ JSONObject results=resultobject.getJSONObject("results");
|
|
|
+ if(results.containsKey("changedate")){
|
|
|
+ sqlList.add("update sa_dispatch set status='关闭',closedate='"+results.getString("changedate")+"',closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }else{
|
|
|
+ sqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ sqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }
|
|
|
+ //sqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "数据操作日志新增");
|
|
|
sqlFactory.addParameter("sys_contrllogid", createTableID("sys_contrllog"));
|
|
|
sqlFactory.addParameter("ownertable", "sa_dispatch");
|
|
@@ -232,7 +242,17 @@ public class DispatchAutoCloseService extends ServiceController {
|
|
|
// for (Row row:orderRows) {
|
|
|
// sqlList.add("update sa_order set status='审核' where sa_orderid=" + row.getLong("sa_orderid") + " and siteid='" + siteid + "'");
|
|
|
// }
|
|
|
- uncloseSqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ if(resultobject.containsKey("results")){
|
|
|
+ JSONObject results=resultobject.getJSONObject("results");
|
|
|
+ if(results.containsKey("changedate")){
|
|
|
+ uncloseSqlList.add("update sa_dispatch set status='关闭',closedate='"+results.getString("changedate")+"',closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }else{
|
|
|
+ uncloseSqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ uncloseSqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
+ }
|
|
|
+ //uncloseSqlList.add("update sa_dispatch set status='关闭',closedate=current_time,closeby='admin' where sa_dispatchid='" + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "数据操作日志新增");
|
|
|
sqlFactory.addParameter("sys_contrllogid", createTableID("sys_contrllog"));
|
|
|
sqlFactory.addParameter("ownertable", "sa_dispatch");
|