Commit 56fb5203 by zhouhaibao

[+]查询接口修改

1 parent c9145720
...@@ -24,6 +24,7 @@ import java.util.Map; ...@@ -24,6 +24,7 @@ import java.util.Map;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.apache.commons.dbutils.DbUtils; import org.apache.commons.dbutils.DbUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -124,8 +125,10 @@ public abstract class AbstractConnect { ...@@ -124,8 +125,10 @@ public abstract class AbstractConnect {
int total=0; int total=0;
String[] split = sql.split(";"); String[] split = sql.split(";");
for (String s : split) { for (String s : split) {
int i = dbConnect.executeUpdate(s, para); if(StringUtils.isNotEmpty(s)) {
total=total+i; int i = dbConnect.executeUpdate(s, para);
total = total + i;
}
} }
return total; return total;
} }
......
...@@ -51,6 +51,7 @@ public class ControllerDisTasksDemo { ...@@ -51,6 +51,7 @@ public class ControllerDisTasksDemo {
multiValueMap.add("requestList[0].stageName", SopHelper.getValueFromJsonString(nodeParam, "stage")); multiValueMap.add("requestList[0].stageName", SopHelper.getValueFromJsonString(nodeParam, "stage"));
multiValueMap.add("requestList[0].sopId", sopInst.getInstId()); multiValueMap.add("requestList[0].sopId", sopInst.getInstId());
multiValueMap.add("requestList[0].enterJourneyDays",SopHelper.getValueFromJsonString(nodeParam, "day"));
multiValueMap.add("requestList[0].taskType", SopHelper.getValueFromJsonString(nodeParam, "taskType")); multiValueMap.add("requestList[0].taskType", SopHelper.getValueFromJsonString(nodeParam, "taskType"));
......
...@@ -53,7 +53,7 @@ public class ControllerFoundInsDemo { ...@@ -53,7 +53,7 @@ public class ControllerFoundInsDemo {
CustomerInfo customerInfo = new CustomerInfo(); CustomerInfo customerInfo = new CustomerInfo();
customerInfo.setVin(key); customerInfo.setVin(key);
if(stringObjectMap.get(key)!=null) { if(stringObjectMap.get(key)!=null) {
customerInfo.setArrivalDate(DateFormatUtils.formatUTC(Long.parseLong(s), "yyyy-mm-dd mm:ss")); customerInfo.setArrivalDate(DateFormatUtils.format(Long.parseLong(s), "yyyy-MM-dd HH:mm:ss"));
} }
result.add(customerInfo); result.add(customerInfo);
} }
...@@ -65,4 +65,5 @@ public class ControllerFoundInsDemo { ...@@ -65,4 +65,5 @@ public class ControllerFoundInsDemo {
return JSONArray.parseArray(JSONObject.toJSONString(result)); return JSONArray.parseArray(JSONObject.toJSONString(result));
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!