Compare commits
No commits in common. "3f5504d44c2590a524cc56afc1e444434346ad15" and "ed5173a84bb3e27651f118628c8fab5813fef401" have entirely different histories.
3f5504d44c
...
ed5173a84b
|
@ -24,11 +24,6 @@ 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
|
||||
|
@ -57,11 +52,7 @@ public class Entry {
|
|||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义牧场名称与牧场标识关系(一牧云)
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static String getKeyName(String value){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("奶一牧场","1abe187269fd4fae8f6998371cf8076b");//奶一 23
|
||||
|
@ -90,10 +81,6 @@ public class Entry {
|
|||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义牧场名称与牧场标识关系(创耀信)
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Integer> sourceCow(){
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
map.put("奶一牧场",23);//奶一
|
||||
|
@ -124,19 +111,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;
|
||||
|
@ -155,7 +142,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);
|
||||
|
@ -338,19 +325,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]+"]......");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,11 +348,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]+"]......");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,16 +175,4 @@ public class EventFind {
|
|||
String sql = "select curr_cowshed_name as cowshed,out_cows_type_name as cowType from t_event_turn_group where source_cow='"+sourceCow+"' and cow_no='"+cowNo+"' and out_cows_type_name ='哺乳犊牛' order by event_date limit 1";
|
||||
return Db.findFirst(sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据牛场ID、日期查询离场牛只信息
|
||||
* @param sourceCow
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public static List<Record> getOffCowByData(String sourceCow,String startDate,String endDate){
|
||||
String sql = "select cow_no as cowNo,event_date as eventDate,out_type as outType,oper_name as operName,create_time as createTime from t_event_out_group where source_cow='"+sourceCow+"' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d')";
|
||||
return Db.find(sql);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cron4j=task
|
||||
task.cron=0 0 * * *
|
||||
task.cron=15 22 * * *
|
||||
task.class=com.cyx.cron.MyTask
|
||||
task.daemon=true
|
||||
task.enable=true
|
Loading…
Reference in New Issue