package com.example.sso.newcontroller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.example.sso.util.V5utils; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Slf4j @Component public class DpChongXie { @Scheduled(cron = "0 10 2 * * ?") public void main() { Boolean flag = true; while (flag) { try { JSONObject jsonObject = new JSONObject(); jsonObject.put("app_id", "665ea38ef718f1edccf7b20d"); jsonObject.put("entry_id", "694e2e9f4997401c0bc48444"); jsonObject.put("limit", 1); JSONObject filter = new JSONObject(); filter.put("rel", "and"); JSONArray cond = new JSONArray(); JSONObject oo = new JSONObject(); oo.put("field", "fuz"); oo.put("method", "empty"); cond.add(oo); filter.put("cond", cond); jsonObject.put("filter", filter); String jsonString = jsonObject.toJSONString(); String list = V5utils.list(jsonString); System.out.println(list); JSONObject jsonObject1 = JSON.parseObject(list); JSONArray data = jsonObject1.getJSONArray("data"); if (data != null && data.size() != 0) { for (Object o : data) { JSONObject te = (JSONObject) o; String tqdj = te.getString("tqdj"); String kcwg = te.getString("kcwg"); String wfwg = te.getString("wfwg"); String wnj = te.getString("wnj"); Double ssbzj = te.getDouble("ssbzj"); Double wjje = te.getDouble("wjje"); Double bl = te.getDouble("bl"); Double zf = te.getDouble("zf"); Double zs = te.getDouble("zs"); Double zje = te.getDouble("zje"); Double syf = te.getDouble("syf"); Double sys = te.getDouble("sys"); Double syje = te.getDouble("syje"); Double wyf = te.getDouble("wyf"); Double wys = te.getDouble("wys"); Double wyje = te.getDouble("wyje"); Double yqys = te.getDouble("yqys"); String njyf = te.getString("njyf"); String sfz = te.getString("sfz"); String _id = te.getString("_id"); JSONObject jsonObject12 = new JSONObject(); jsonObject12.put("app_id", "665ea38ef718f1edccf7b20d"); jsonObject12.put("entry_id", "665fd98bf718f1edcc00377c"); jsonObject12.put("limit", 100); JSONObject filter12 = new JSONObject(); filter12.put("rel", "and"); JSONArray cond12 = new JSONArray(); JSONObject oo12 = new JSONObject(); oo12.put("field", "_widget_1717557644376"); oo12.put("method", "eq"); JSONArray jsonArray = new JSONArray(); jsonArray.add(sfz); oo12.put("value", jsonArray); cond12.add(oo12); filter12.put("cond", cond12); jsonObject12.put("filter", filter12); String jsonString12 = jsonObject12.toJSONString(); String list12 = V5utils.list(jsonString12); System.out.println(list12); JSONObject jsonObject122 = JSON.parseObject(list12); JSONArray data1 = jsonObject122.getJSONArray("data"); if (data1 != null && data1.size() != 0) { for (Object object : data1) { JSONObject te1 = (JSONObject) object; String id = te1.getString("_id"); JSONObject jsonObject1123 = new JSONObject(); jsonObject1123.put("app_id", "665ea38ef718f1edccf7b20d"); jsonObject1123.put("entry_id", "665fd98bf718f1edcc00377c"); jsonObject1123.put("data_id", id); JSONObject jsonObject2 = new JSONObject(); JSONObject _widget_1717666304762 = new JSONObject(); _widget_1717666304762.put("value", tqdj); jsonObject2.put("_widget_1717666304762", _widget_1717666304762); JSONObject _widget_1717666304763 = new JSONObject(); _widget_1717666304763.put("value", kcwg); jsonObject2.put("_widget_1717666304763", _widget_1717666304763); JSONObject _widget_1717666304765 = new JSONObject(); _widget_1717666304765.put("value", wfwg); jsonObject2.put("_widget_1717666304765", _widget_1717666304765); JSONObject _widget_1717666304764 = new JSONObject(); _widget_1717666304764.put("value", wnj); jsonObject2.put("_widget_1717666304764", _widget_1717666304764); JSONObject _widget_1718086086807 = new JSONObject(); _widget_1718086086807.put("value", ssbzj); jsonObject2.put("_widget_1718086086807", _widget_1718086086807); JSONObject _widget_1718086086808 = new JSONObject(); _widget_1718086086808.put("value", wjje); jsonObject2.put("_widget_1718086086808", _widget_1718086086808); JSONObject _widget_1718086086810 = new JSONObject(); _widget_1718086086810.put("value", bl); jsonObject2.put("_widget_1718086086810", _widget_1718086086810); JSONObject _widget_1718157395046 = new JSONObject(); _widget_1718157395046.put("value", zf); jsonObject2.put("_widget_1718157395046", _widget_1718157395046); JSONObject _widget_1718098344621 = new JSONObject(); _widget_1718098344621.put("value", zs); jsonObject2.put("_widget_1718098344621", _widget_1718098344621); JSONObject _widget_1724396148701 = new JSONObject(); _widget_1724396148701.put("value", zje); jsonObject2.put("_widget_1724396148701", _widget_1724396148701); JSONObject _widget_1724396148706 = new JSONObject(); _widget_1724396148706.put("value", syf); jsonObject2.put("_widget_1724396148706", _widget_1724396148706); JSONObject _widget_1724396148707 = new JSONObject(); _widget_1724396148707.put("value", sys); jsonObject2.put("_widget_1724396148707", _widget_1724396148707); JSONObject _widget_1724396148708 = new JSONObject(); _widget_1724396148708.put("value", syje); jsonObject2.put("_widget_1724396148708", _widget_1724396148708); JSONObject _widget_1724396148709 = new JSONObject(); _widget_1724396148709.put("value", wyf); jsonObject2.put("_widget_1724396148709", _widget_1724396148709); JSONObject _widget_1724396148710 = new JSONObject(); _widget_1724396148710.put("value", wys); jsonObject2.put("_widget_1724396148710", _widget_1724396148710); JSONObject _widget_1724396148711 = new JSONObject(); _widget_1724396148711.put("value", wyje); jsonObject2.put("_widget_1724396148711", _widget_1724396148711); JSONObject _widget_1718097576151 = new JSONObject(); _widget_1718097576151.put("value", yqys); jsonObject2.put("_widget_1718097576151", _widget_1718097576151); JSONObject _widget_1718097576152 = new JSONObject(); _widget_1718097576152.put("value", njyf); jsonObject2.put("_widget_1718097576152", _widget_1718097576152); JSONObject _widget_1717727879724 = new JSONObject(); _widget_1717727879724.put("value", "是"); jsonObject2.put("_widget_1717727879724", _widget_1717727879724); JSONObject _widget_1717727879725 = new JSONObject(); _widget_1717727879725.put("value", "否"); jsonObject2.put("_widget_1717727879725", _widget_1717727879725); JSONObject _widget_1717727492391 = new JSONObject(); _widget_1717727492391.put("value", "否"); jsonObject2.put("_widget_1717727492391", _widget_1717727492391); jsonObject1123.put("data", jsonObject2); String jsonString15 = jsonObject1123.toJSONString(); V5utils.updata(jsonString15); JSONObject jsonObject1123a = new JSONObject(); jsonObject1123a.put("app_id", "665ea38ef718f1edccf7b20d"); jsonObject1123a.put("entry_id", "694e2e9f4997401c0bc48444"); jsonObject1123a.put("data_id", _id); JSONObject jsonObject2a = new JSONObject(); JSONObject _widget_1717666304762a = new JSONObject(); _widget_1717666304762a.put("value", "/(ㄒoㄒ)/~~"); jsonObject2a.put("fuz", _widget_1717666304762a); jsonObject1123a.put("data", jsonObject2a); String jsonString1 = jsonObject1123a.toJSONString(); V5utils.updata(jsonString1); } } else { JSONObject jsonObject1123a = new JSONObject(); jsonObject1123a.put("app_id", "665ea38ef718f1edccf7b20d"); jsonObject1123a.put("entry_id", "694e2e9f4997401c0bc48444"); jsonObject1123a.put("data_id", _id); JSONObject jsonObject2a = new JSONObject(); JSONObject _widget_1717666304762a = new JSONObject(); _widget_1717666304762a.put("value", "o(* ̄▽ ̄*)ブ"); jsonObject2a.put("fuz", _widget_1717666304762a); jsonObject1123a.put("data", jsonObject2a); String jsonString1 = jsonObject1123a.toJSONString(); V5utils.updata(jsonString1); } } } else { flag = false; } } catch (Exception e) { continue; } log.info(""); } } }