添加注释说明
This commit is contained in:
parent
b7865c8299
commit
f8566c7907
|
@ -24,6 +24,11 @@ import java.util.Map;
|
|||
*/
|
||||
public class Entry {
|
||||
|
||||
/**
|
||||
* 定义牧场标识(创耀信)与牧场标识关系(一牧云)
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static Long getKey(String value){
|
||||
Map<Long, String> map = new HashMap<>();
|
||||
map.put(23L,"1abe187269fd4fae8f6998371cf8076b");//奶一 23
|
||||
|
@ -52,7 +57,11 @@ public class Entry {
|
|||
return key;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定义牧场名称与牧场标识关系(一牧云)
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String getKeyName(String value){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("奶一牧场","1abe187269fd4fae8f6998371cf8076b");//奶一 23
|
||||
|
@ -81,6 +90,10 @@ public class Entry {
|
|||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义牧场名称与牧场标识关系(创耀信)
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Integer> sourceCow(){
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
map.put("奶一牧场",23);//奶一
|
||||
|
@ -111,19 +124,19 @@ public class Entry {
|
|||
public static void synsData(String[] args){
|
||||
String[] farmIds = args[1].split(",");
|
||||
for(String farmId : farmIds){
|
||||
EventLog.info("......["+args[4]+"]-["+args[5]+"]......");
|
||||
EventLog.info("牛场标识:创耀信["+getKey(farmId)+"],一牧云["+farmId+"]...开始...");
|
||||
EventLog.info("------["+args[4]+"]-["+args[5]+"]------");
|
||||
EventLog.info("......牛场标识:创耀信["+getKey(farmId)+"],一牧云["+farmId+"]...开始......");
|
||||
String str = HttpRequest.get("http://dairyapp.yimucloud.com:8085/dweb/login/apiLogin?platForm=DWeb&orgCode=DG64001&sign=pVibK5VxEpU=").execute().body();
|
||||
JSONObject obj = new JSONObject(str);
|
||||
JSONObject result = obj.getJSONObject("result");
|
||||
String token = result.getStr("token");//获取token
|
||||
String[] eventIds = args[2].split(",");
|
||||
for(String eventId : eventIds){
|
||||
EventLog.info("事件标识:["+eventId+"]...开始...");
|
||||
EventLog.info("......事件标识:["+eventId+"]...开始......");
|
||||
int total = 0;
|
||||
int count = 1;
|
||||
for(int i=1;i<=count;i++){
|
||||
EventLog.info("第["+i+"]页开始...");
|
||||
EventLog.info("第["+i+"]页开始......");
|
||||
String url = "http://dairyapp.yimucloud.com:8085/dweb/party/event/getEventSingleInfoList?";
|
||||
url = url + "farmId="+farmId;
|
||||
url = url + "&pageNo="+i;
|
||||
|
@ -142,7 +155,7 @@ public class Entry {
|
|||
}
|
||||
for (int j = 0; j < arrayList.size(); j++) {
|
||||
JSONObject param = arrayList.getJSONObject(j);
|
||||
EventLog.info("第("+(j+1)+")头...["+param.get("COW_NAME")+"]...["+param.get("EVENT_DATE")+"]...");
|
||||
EventLog.info("第("+(j+1)+")头...["+param.get("COW_NAME")+"]...["+param.get("EVENT_DATE")+"]......");
|
||||
//转群转圈
|
||||
if("101".equals(eventId)){
|
||||
com.alibaba.fastjson2.JSONObject reJSON = EventJson.setParamTurn(param);
|
||||
|
@ -325,19 +338,19 @@ public class Entry {
|
|||
}
|
||||
}
|
||||
}
|
||||
EventLog.info("第["+i+"]页结束...");
|
||||
EventLog.info("第["+i+"]页结束......");
|
||||
}
|
||||
EventLog.info("事件["+eventId+"]总量:["+total+"]头...");
|
||||
EventLog.info("事件标识:["+eventId+"]...结束...");
|
||||
EventLog.info("等待2秒后继续...");
|
||||
EventLog.info("......事件["+eventId+"]总量:["+total+"]头......");
|
||||
EventLog.info("......事件标识:["+eventId+"]...结束......");
|
||||
EventLog.info("......2秒后继续......");
|
||||
try {
|
||||
Thread.sleep(2000L);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
EventLog.info("牛场标识:创耀信["+getKey(farmId)+"],一牧云["+farmId+"]...结束...");
|
||||
EventLog.info("......["+args[4]+"]-["+args[5]+"]......");
|
||||
EventLog.info("......牛场标识:创耀信["+getKey(farmId)+"],一牧云["+farmId+"]...结束......");
|
||||
EventLog.info("------["+args[4]+"]-["+args[5]+"]------");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,11 +361,11 @@ public class Entry {
|
|||
public static void editData(String[] args){
|
||||
String[] farmIds = args[1].split(",");
|
||||
for(String farmId : farmIds){
|
||||
EventLog.info("......["+args[2]+"]-["+args[3]+"]......");
|
||||
EventLog.info("------["+args[2]+"]-["+args[3]+"]------");
|
||||
EventLog.info("......牛场["+farmId+"]判决开始......");
|
||||
Edit.dealEdit(farmId,args[2],args[3]);
|
||||
EventLog.info("......牛场["+farmId+"]判决结束......");
|
||||
EventLog.info("......["+args[2]+"]-["+args[3]+"]......");
|
||||
EventLog.info("------["+args[2]+"]-["+args[3]+"]------");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue