工业级运维app手机api
沈斌
2017-11-07 c34ac6ee5f8aa80dff5026f0f38c26215fbd37c5
insert hostory data to mongo
2 files modified
32 ■■■■■ changed files
.idea/workspace.xml 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/monitor/listener/TaskListener.java 4 ●●● patch | view | raw | blame | history
.idea/workspace.xml
@@ -6,7 +6,7 @@
    </artifacts-to-build>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="test ack flag">
    <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" afterPath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" />
    </list>
@@ -24,8 +24,8 @@
      <file leaf-file-name="TaskListener.java" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="344">
              <caret line="136" column="22" lean-forward="false" selection-start-line="136" selection-start-column="16" selection-end-line="136" selection-end-column="22" />
            <state relative-caret-position="515">
              <caret line="124" column="62" lean-forward="false" selection-start-line="124" selection-start-column="62" selection-end-line="124" selection-end-column="62" />
              <folding>
                <element signature="imports" expanded="true" />
              </folding>
@@ -465,7 +465,7 @@
      <workItem from="1509946269191" duration="522000" />
      <workItem from="1509957226710" duration="251000" />
      <workItem from="1509957794827" duration="173000" />
      <workItem from="1510014788172" duration="851000" />
      <workItem from="1510014788172" duration="1217000" />
    </task>
    <task id="LOCAL-00001" summary="updates">
      <created>1508484578874</created>
@@ -789,11 +789,18 @@
      <option name="project" value="LOCAL" />
      <updated>1509957820879</updated>
    </task>
    <option name="localTasksCounter" value="47" />
    <task id="LOCAL-00047" summary="insert hostory data to mongo">
      <created>1510015691670</created>
      <option name="number" value="00047" />
      <option name="presentableId" value="LOCAL-00047" />
      <option name="project" value="LOCAL" />
      <updated>1510015691671</updated>
    </task>
    <option name="localTasksCounter" value="48" />
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="113643000" />
    <option name="totallyTimeSpent" value="114009000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="23" width="1404" height="877" extended-state="0" />
@@ -807,7 +814,7 @@
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54092073" sideWeight="0.520558" order="8" side_tool="true" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32893288" sideWeight="0.49706313" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.40537083" sideWeight="0.48091042" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.40537083" sideWeight="0.48091042" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54092073" sideWeight="0.479442" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
@@ -892,7 +899,8 @@
    <MESSAGE value="代码发布" />
    <MESSAGE value="修改MQ登录密码" />
    <MESSAGE value="test ack flag" />
    <option name="LAST_COMMIT_MESSAGE" value="test ack flag" />
    <MESSAGE value="insert hostory data to mongo" />
    <option name="LAST_COMMIT_MESSAGE" value="insert hostory data to mongo" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
@@ -1191,8 +1199,8 @@
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="344">
          <caret line="136" column="22" lean-forward="false" selection-start-line="136" selection-start-column="16" selection-end-line="136" selection-end-column="22" />
        <state relative-caret-position="515">
          <caret line="124" column="62" lean-forward="false" selection-start-line="124" selection-start-column="62" selection-end-line="124" selection-end-column="62" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
src/main/java/com/moral/monitor/listener/TaskListener.java
@@ -121,11 +121,13 @@
                history.setSensor(sensor.getSensor());
                history.setMac_value(Double.valueOf(msgData.get(key)));
                histories.add(history);
                mongoTemplate.insert(JSON.toJSONString(history), "data");
            }
        }
        jobDao.batchInsertHistory(histories);
        mongoTemplate.insert(JSON.toJSONString(histories), "data");
        //mongoTemplate.insert(JSON.toJSONString(histories), "data");
    }
    private Map<String, Float> getAdjustData(String mac) {