|
|
@@ -32,13 +32,14 @@ public class AutoDockItemService extends ServiceController {
|
|
|
RowsMap itemRowsMap = itemRows.toRowsMap("itemno");
|
|
|
RowsMap itemRowsMapAll = itemRowsAll.toRowsMap("itemno");
|
|
|
ERPDocking erpDocking =new ERPDocking();
|
|
|
- Rows servicesRows = dbConnect.runSqlQuery("select lastruntime from sys_services where classname='AutoDockItemService'");
|
|
|
+ Rows servicesRows = dbConnect.runSqlQuery("select lastruntime,lastruntime1 from sys_services where classname='AutoDockItemService'");
|
|
|
Date date =new Date();
|
|
|
if(!servicesRows.isEmpty()){
|
|
|
- if(StringUtils.isNotBlank(servicesRows.get(0).getString("lastruntime"))){
|
|
|
- date=servicesRows.get(0).getDate("lastruntime");
|
|
|
+ if(StringUtils.isNotBlank(servicesRows.get(0).getString("lastruntime1"))){
|
|
|
+ date=servicesRows.get(0).getDate("lastruntime1");
|
|
|
}
|
|
|
}
|
|
|
+ dbConnect.runSqlUpdate("update sys_services set lastruntime1=now() where classname='AutoDockItemService'");
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
JSONArray jsonArray = erpDocking.getErpItemRows(simpleDateFormat.format(date), 100000, 1);
|
|
|
if(!jsonArray.isEmpty()){
|