Commit fcd56a92 authored by youxiaoji's avatar youxiaoji

* [增加默认值]

parent e0282dc3
......@@ -273,6 +273,7 @@ public class VisitorAppointmentTool {
infos.keySet().forEach(key -> {
infoCollectorService.saveValue(key, infos.get(key));
});
infoCollectorService.saveDefaultValue(pageId);
Set<String> keys = infoCollectorService.findLackInfo(pageId);
if (!keys.isEmpty()) {
JSONArray jsonArray = infoCollectorService.getInfo(pageId);
......
......@@ -34,6 +34,24 @@ public class InfoCollectorService {
log.info("key {} value {}", key, value);
values.put(key, value);
}
public void saveDefaultValue(String pageId){
JSONArray jsonArray = infos.get(pageId);
for(int i = 0; i < jsonArray.size(); i++){
JSONObject object = jsonArray.getJSONObject(i);
if(object.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0){
String code = object.getString("code");
saveValue(code, "15841169015");
}
if(object.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0){
String code = object.getString("code");
saveValue(code, "杜艺");
}
if(object.getString("field_name").compareToIgnoreCase("证件类型") == 0){
String code = object.getString("code");
saveValue(code, "居民身份证");
}
}
}
public Object getValue(String key) {
return values.get(key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment