Browse Source

新增信义同步SqlServer数据的服务

王苗苗 2 months ago
parent
commit
ef3494f079

+ 1 - 0
.idea/compiler.xml

@@ -2,6 +2,7 @@
 <project version="4">
   <component name="CompilerConfiguration">
     <annotationProcessing>
+      <profile default="true" name="Default" enabled="true" />
       <profile name="Maven default annotation processors profile" enabled="true">
         <sourceOutputDir name="target/generated-sources/annotations" />
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 26 - 7
.idea/workspace.xml

@@ -4,7 +4,17 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="494e7e12-0e43-41f1-b914-44d06666de04" name="Changes" comment="" />
+    <list default="true" id="494e7e12-0e43-41f1-b914-44d06666de04" name="Changes" comment="">
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/domain/TXinyiRobot.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/mapper/TXinyiRobotMapper.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/mapper/TXinyiRobotMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/TestController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/TestController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/TestController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/TestController.class" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -17,9 +27,12 @@
       </list>
     </option>
   </component>
-  <component name="ProjectColorInfo"><![CDATA[{
-  "associatedIndex": 6
-}]]></component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="ProjectColorInfo">{
+  &quot;associatedIndex&quot;: 6
+}</component>
   <component name="ProjectId" id="2rZDms9Sm1X0MozaUkRiWMPw3Mu" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectViewState">
@@ -34,14 +47,15 @@
     "RequestMappingsPanelWidth1": "75",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "Spring Boot.SmartRobotRemoteApplication.executor": "Debug",
+    "git-widget-placeholder": "master",
     "kotlin-language-version-configured": "true",
-    "last_opened_file_path": "/Users/wangmiaomiao/IdeaProjects/smart-robot-remote",
+    "last_opened_file_path": "/Users/wangmiaomiao/IdeaProjects/robot-sync/src/main/resources/mapper",
     "node.js.detected.package.eslint": "true",
     "node.js.detected.package.tslint": "true",
     "node.js.selected.package.eslint": "(autodetect)",
     "node.js.selected.package.tslint": "(autodetect)",
     "nodejs_package_manager_path": "npm",
-    "project.structure.last.edited": "Project",
+    "project.structure.last.edited": "Modules",
     "project.structure.proportion": "0.15",
     "project.structure.side.proportion": "0.2",
     "vue.rearranger.settings.migration": "true"
@@ -49,8 +63,8 @@
 }]]></component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
-      <recent name="$PROJECT_DIR$" />
       <recent name="$PROJECT_DIR$/src/main/resources/mapper" />
+      <recent name="$PROJECT_DIR$" />
     </key>
     <key name="CopyClassDialog.RECENTS_KEY">
       <recent name="com.robot.remote.smartrobotremote.domain" />
@@ -94,6 +108,11 @@
       <option name="presentableId" value="Default" />
       <updated>1736757867945</updated>
       <workItem from="1736757869096" duration="8039000" />
+      <workItem from="1736821427479" duration="12746000" />
+      <workItem from="1736944947909" duration="5000" />
+      <workItem from="1736989247063" duration="600000" />
+      <workItem from="1739515108280" duration="313000" />
+      <workItem from="1739517551016" duration="2305000" />
     </task>
     <servers />
   </component>

+ 3 - 3
src/main/java/com/robot/remote/smartrobotremote/conf/JdbcConfig.java

@@ -14,9 +14,9 @@ public class JdbcConfig {
     public DataSource dataSource() {
         DriverManagerDataSource dataSource = new DriverManagerDataSource();
         dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
-        dataSource.setUrl("jdbc:sqlserver://10.0.0.20:1433;DatabaseName=Water");
-        dataSource.setUsername("sa");
-        dataSource.setPassword("Abc123456");
+        dataSource.setUrl("jdbc:sqlserver://10.0.3.53:1433;SelectMethod=Cursor;DatabaseName=信义");
+        dataSource.setUsername("hongshan");
+        dataSource.setPassword("hongshan");
         return dataSource;
     }
 

+ 23 - 6
src/main/java/com/robot/remote/smartrobotremote/controller/TestController.java → src/main/java/com/robot/remote/smartrobotremote/controller/DataController.java

@@ -2,11 +2,14 @@ package com.robot.remote.smartrobotremote.controller;
 
 
 import com.robot.remote.smartrobotremote.domain.BizDevice;
+import com.robot.remote.smartrobotremote.domain.TXinyiRobot;
 import com.robot.remote.smartrobotremote.mapper.BizDeviceMapper;
+import com.robot.remote.smartrobotremote.mapper.TXinyiRobotMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
@@ -14,14 +17,17 @@ import java.util.Map;
 
 @Slf4j
 @RestController
-public class TestController {
+public class DataController {
 
 
-    @Autowired
+    /*@Autowired
     private JdbcTemplate jdbcTemplate;
 
     @Autowired
-    private BizDeviceMapper bizDeviceMapper;
+    private BizDeviceMapper bizDeviceMapper;*/
+
+    @Autowired
+    private TXinyiRobotMapper tXinyiRobotMapper;
 
 
     @GetMapping("/hello")
@@ -34,20 +40,31 @@ public class TestController {
      * jdbcTemplate 模拟查询数据
      *
      */
-    @GetMapping("/testQuerySqlServerByJDBC")
+    /*@GetMapping("/testQuerySqlServerByJDBC")
     public List<Map<String, Object>> testQuerySqlServerByJDBC() {
         String sql = "SELECT * FROM biz_device";
         return jdbcTemplate.queryForList(sql);
-    }
+    }*/
 
 
     /**
      * mybatis 模拟查询数据
      *
      */
-    @GetMapping("/testQuerySqlServerByMybatis")
+    /*@GetMapping("/testQuerySqlServerByMybatis")
     public List<BizDevice> testQuerySqlServerByMybatis() {
         return this.bizDeviceMapper.selectBizDeviceList(null);
+    }*/
+
+
+
+    /**
+     * mybatis 模拟查询数据
+     *
+     */
+    @GetMapping("/selectTXinyiRobotListByTime")
+    public List<TXinyiRobot> selectTXinyiRobotListByTime(@RequestParam String lastTime) {
+        return this.tXinyiRobotMapper.selectTXinyiRobotListByTime(lastTime);
     }
 
 }

+ 142 - 0
src/main/java/com/robot/remote/smartrobotremote/domain/TXinyiRobot.java

@@ -0,0 +1,142 @@
+package com.robot.remote.smartrobotremote.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 信义化验数据对象 t_xinyi_robot
+ * 
+ * @author slibra
+ * @date 2024-03-30
+ */
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TXinyiRobot
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long ID;
+
+    /** 日期 */
+    private String vDate;
+
+    /** 时间 */
+    private String vTime;
+
+    /** 时间日期 */
+    private String vDateTime;
+
+    /** 化验时间 精确到天 */
+    private String testDate;
+
+    /** 化验时间 精确到小时 */
+    private String testHour;
+
+    /** 化验时间 精确到分钟 */
+    private String testTime;
+
+    /** 仪表COD(在线仪表) */
+    private BigDecimal codYb;
+
+    /** 化验机器人COD化验有效值(COD生物池进水机器人) */
+    private BigDecimal codJqr;
+
+    /** 化验机器人COD化验计算值(COD生物池进水阈值) */
+    private BigDecimal codYz;
+
+    /** #1好氧池-正磷酸盐 +  化验机器人正磷化验有效值1(正磷1池回流机器人) */
+    private BigDecimal tpHl1Jqr;
+
+    /** #2好氧池-正磷酸盐 + 化验机器人正磷化验有效值2(正磷2池回流机器人) */
+    private BigDecimal tpHl2Jqr;
+
+    /** 二沉池-正磷酸盐 + 化验机器人正磷化验有效值二沉池(正磷二沉池机器人) */
+    private BigDecimal tpRccJqr;
+
+    /** 化验机器人正磷化验计算值1(正磷1池回流阈值) */
+    private BigDecimal tp1Yz;
+
+    /** 化验机器人正磷化验计算值2(正磷2池回流阈值) */
+    private BigDecimal tp2Yz;
+
+    /** 化验机器人正磷化验计算值二沉池(正磷二沉池阈值) */
+    private BigDecimal tpRccYz;
+
+    /** 1#缺氧氨氮 + 化验机器人氨氮化验有效值1(氨氮1池缺氧机器人) */
+    private BigDecimal nh31Jqr;
+
+    /** 2#缺氧氨氮 + 化验机器人氨氮化验有效值2(氨氮2池缺氧机器人) */
+    private BigDecimal nh32Jqr;
+
+    /** 化验机器人氨氮化验计算值1(氨氮1池缺氧阈值) */
+    private BigDecimal nh31Yz;
+
+    /** 回流出水计算值1(硝氮1池回流阈值) */
+    private BigDecimal no3Hlc1Yz;
+
+    /** 化验机器人氨氮化验计算值2(氨氮2池缺氧阈值) */
+    private BigDecimal nh32Yz;
+
+    /** 回流出水计算值2(硝氮2池回流阈值) */
+    private BigDecimal no3Hlc2Yz;
+
+    /** 1#好氧池硝酸盐(内回流)+ 回流进水化验机器人有效值1(硝氮1池回流机器人) */
+    private BigDecimal no3Hlj1Jqr;
+
+    /** 2#好氧池硝酸盐(内回流) + 回流进水化验机器人有效值2(硝氮2池回流机器人) */
+    private BigDecimal no3Hlj2Jqr;
+
+    /** 碳源投加流量(碳源投加流量) */
+    private BigDecimal TYLL;
+
+    /** 1#缺氧出口硝酸盐 + 缺氧出水化验机器人有效值1(硝氮1池缺氧机器人) */
+    private BigDecimal no3Qyc1Jqr;
+
+    /** 2#缺氧出-硝酸盐 + 缺氧出水化验机器人有效值2(硝氮2池缺氧机器人) */
+    private BigDecimal no3Qyc2Jqr;
+
+    /** 缺氧进水计算值1(硝氮1池缺氧阈值) */
+    private BigDecimal no3Qyc1Yz;
+
+    /** 缺氧进水计算值2(硝氮2池缺氧阈值) */
+    private BigDecimal no3Qyc2Yz;
+
+    /** 进水流量(进水流量) */
+    private BigDecimal JSLL;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createdTime;
+
+    //2024年5月29日10:32:26  新增的字段  多个池子合并一个
+
+    /** 好氧池硝酸盐(多个池子) */
+    private String hycxsyAll;
+
+    /** 缺氧氨氮(多个池子) */
+    private String qyanAll;
+
+    /** 缺氧硝酸盐(多个池子) */
+    private String qyckxsyAll;
+
+    /** 好氧池正磷酸盐(多个池子) */
+    private String hyzlsyAll;
+
+    //2024年09月10日10:47:07 新增的请求参数
+    /**  开始时间 */
+    private String timeBegin;
+
+    /** 截止时间 */
+    private String timeEnd;
+
+}

+ 21 - 0
src/main/java/com/robot/remote/smartrobotremote/mapper/TXinyiRobotMapper.java

@@ -0,0 +1,21 @@
+package com.robot.remote.smartrobotremote.mapper;
+
+
+import com.robot.remote.smartrobotremote.domain.TXinyiRobot;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 信义化验数据Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-03-30
+ */
+@Mapper
+public interface TXinyiRobotMapper 
+{
+
+    List<TXinyiRobot> selectTXinyiRobotListByTime(String lastTime);
+
+}

+ 4 - 4
src/main/resources/application.yml

@@ -1,12 +1,12 @@
 server:
-  port: 8881
+  port: 8079
 
 spring:
   datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://10.0.0.20:1433;DatabaseName=Water
-    username: sa
-    password: Abc123456
+    url: jdbc:sqlserver://10.0.3.53:1433;SelectMethod=Cursor;DatabaseName=信义
+    username: hongshan
+    password: hongshan
 
 # MyBatis 配置
 mybatis:

+ 54 - 0
src/main/resources/mapper/TXinyiRobotMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.robot.remote.smartrobotremote.mapper.TXinyiRobotMapper">
+
+    <resultMap type="TXinyiRobot" id="TXinyiRobotResult">
+        <result property="ID"    column="ID"    />
+        <result property="vDate"    column="V_DATE"    />
+        <result property="vTime"    column="V_TIME"    />
+        <result property="vDateTime"    column="V_DATE_TIME"    />
+        <result property="testDate"    column="TEST_DATE"    />
+        <result property="testHour"    column="TEST_HOUR"    />
+        <result property="testTime"    column="TEST_TIME"    />
+        <result property="codYb"    column="COD_YB"    />
+        <result property="codJqr"    column="COD_JQR"    />
+        <result property="codYz"    column="COD_YZ"    />
+        <result property="tpHl1Jqr"    column="TP_HL1_JQR"    />
+        <result property="tpHl2Jqr"    column="TP_HL2_JQR"    />
+        <result property="tpRccJqr"    column="TP_RCC_JQR"    />
+        <result property="tp1Yz"    column="TP_1_YZ"    />
+        <result property="tp2Yz"    column="TP_2_YZ"    />
+        <result property="tpRccYz"    column="TP_RCC_YZ"    />
+        <result property="nh31Jqr"    column="NH3_1_JQR"    />
+        <result property="nh32Jqr"    column="NH3_2_JQR"    />
+        <result property="nh31Yz"    column="NH3_1_YZ"    />
+        <result property="no3Hlc1Yz"    column="NO3_HLC1_YZ"    />
+        <result property="nh32Yz"    column="NH3_2_YZ"    />
+        <result property="no3Hlc2Yz"    column="NO3_HLC2_YZ"    />
+        <result property="no3Hlj1Jqr"    column="NO3_HLJ1_JQR"    />
+        <result property="no3Hlj2Jqr"    column="NO3_HLJ2_JQR"    />
+        <result property="TYLL"    column="TYLL"    />
+        <result property="no3Qyc1Jqr"    column="NO3_QYC_1_JQR"    />
+        <result property="no3Qyc2Jqr"    column="NO3_QYC_2_JQR"    />
+        <result property="no3Qyc1Yz"    column="NO3_QYC_1_YZ"    />
+        <result property="no3Qyc2Yz"    column="NO3_QYC_2_YZ"    />
+        <result property="JSLL"    column="JSLL"    />
+        <result property="createdTime"    column="CREATED_TIME"    />
+        <result property="hycxsyAll"    column="HYCXSY_ALL"    />
+        <result property="qyanAll"    column="QYAN_ALL"    />
+        <result property="qyckxsyAll"    column="QYCKXSY_ALL"    />
+        <result property="hyzlsyAll"    column="HYZLSY_ALL"    />
+    </resultMap>
+
+    <sql id="selectTXinyiSqlServer">
+        select V_DATE, V_TIME, COD_YB, COD_JQR, COD_YZ, TP_HL1_JQR, TP_HL2_JQR, TP_RCC_JQR, TP_1_YZ, TP_2_YZ, TP_RCC_YZ, NH3_1_JQR, NH3_2_JQR, NH3_1_YZ, NO3_HLC1_YZ, NH3_2_YZ, NO3_HLC2_YZ, NO3_HLJ1_JQR, NO3_HLJ2_JQR, TYLL, NO3_QYC_1_JQR, NO3_QYC_2_JQR, NO3_QYC_1_YZ, NO3_QYC_2_YZ, JSLL from V_SHUJU
+    </sql>
+
+    <select id="selectTXinyiRobotListByTime" parameterType="string" resultMap="TXinyiRobotResult">
+        <include refid="selectTXinyiSqlServer"/> where 1 = 1
+        <if test="lastTime != null  and lastTime != ''"> and CONVERT ( datetime, LTRIM( RTRIM( V_DATE ) ) + ' ' + LTRIM( RTRIM( V_TIME ) ) ) > = #{lastTime}</if>
+    </select>
+
+</mapper>

BIN
target/classes/.DS_Store


+ 4 - 4
target/classes/application.yml

@@ -1,12 +1,12 @@
 server:
-  port: 8881
+  port: 8079
 
 spring:
   datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://10.0.0.20:1433;DatabaseName=Water
-    username: sa
-    password: Abc123456
+    url: jdbc:sqlserver://10.0.3.53:1433;SelectMethod=Cursor;DatabaseName=信义
+    username: hongshan
+    password: hongshan
 
 # MyBatis 配置
 mybatis:

BIN
target/classes/com/robot/remote/smartrobotremote/conf/JdbcConfig.class


BIN
target/classes/com/robot/remote/smartrobotremote/controller/DataController.class


BIN
target/classes/com/robot/remote/smartrobotremote/controller/TestController.class


BIN
target/classes/com/robot/remote/smartrobotremote/domain/TXinyiRobot$TXinyiRobotBuilder.class


BIN
target/classes/com/robot/remote/smartrobotremote/domain/TXinyiRobot.class


BIN
target/classes/com/robot/remote/smartrobotremote/mapper/TXinyiRobotMapper.class


+ 54 - 0
target/classes/mapper/TXinyiRobotMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.robot.remote.smartrobotremote.mapper.TXinyiRobotMapper">
+
+    <resultMap type="TXinyiRobot" id="TXinyiRobotResult">
+        <result property="ID"    column="ID"    />
+        <result property="vDate"    column="V_DATE"    />
+        <result property="vTime"    column="V_TIME"    />
+        <result property="vDateTime"    column="V_DATE_TIME"    />
+        <result property="testDate"    column="TEST_DATE"    />
+        <result property="testHour"    column="TEST_HOUR"    />
+        <result property="testTime"    column="TEST_TIME"    />
+        <result property="codYb"    column="COD_YB"    />
+        <result property="codJqr"    column="COD_JQR"    />
+        <result property="codYz"    column="COD_YZ"    />
+        <result property="tpHl1Jqr"    column="TP_HL1_JQR"    />
+        <result property="tpHl2Jqr"    column="TP_HL2_JQR"    />
+        <result property="tpRccJqr"    column="TP_RCC_JQR"    />
+        <result property="tp1Yz"    column="TP_1_YZ"    />
+        <result property="tp2Yz"    column="TP_2_YZ"    />
+        <result property="tpRccYz"    column="TP_RCC_YZ"    />
+        <result property="nh31Jqr"    column="NH3_1_JQR"    />
+        <result property="nh32Jqr"    column="NH3_2_JQR"    />
+        <result property="nh31Yz"    column="NH3_1_YZ"    />
+        <result property="no3Hlc1Yz"    column="NO3_HLC1_YZ"    />
+        <result property="nh32Yz"    column="NH3_2_YZ"    />
+        <result property="no3Hlc2Yz"    column="NO3_HLC2_YZ"    />
+        <result property="no3Hlj1Jqr"    column="NO3_HLJ1_JQR"    />
+        <result property="no3Hlj2Jqr"    column="NO3_HLJ2_JQR"    />
+        <result property="TYLL"    column="TYLL"    />
+        <result property="no3Qyc1Jqr"    column="NO3_QYC_1_JQR"    />
+        <result property="no3Qyc2Jqr"    column="NO3_QYC_2_JQR"    />
+        <result property="no3Qyc1Yz"    column="NO3_QYC_1_YZ"    />
+        <result property="no3Qyc2Yz"    column="NO3_QYC_2_YZ"    />
+        <result property="JSLL"    column="JSLL"    />
+        <result property="createdTime"    column="CREATED_TIME"    />
+        <result property="hycxsyAll"    column="HYCXSY_ALL"    />
+        <result property="qyanAll"    column="QYAN_ALL"    />
+        <result property="qyckxsyAll"    column="QYCKXSY_ALL"    />
+        <result property="hyzlsyAll"    column="HYZLSY_ALL"    />
+    </resultMap>
+
+    <sql id="selectTXinyiSqlServer">
+        select V_DATE, V_TIME, COD_YB, COD_JQR, COD_YZ, TP_HL1_JQR, TP_HL2_JQR, TP_RCC_JQR, TP_1_YZ, TP_2_YZ, TP_RCC_YZ, NH3_1_JQR, NH3_2_JQR, NH3_1_YZ, NO3_HLC1_YZ, NH3_2_YZ, NO3_HLC2_YZ, NO3_HLJ1_JQR, NO3_HLJ2_JQR, TYLL, NO3_QYC_1_JQR, NO3_QYC_2_JQR, NO3_QYC_1_YZ, NO3_QYC_2_YZ, JSLL from V_SHUJU
+    </sql>
+
+    <select id="selectTXinyiRobotListByTime" parameterType="string" resultMap="TXinyiRobotResult">
+        <include refid="selectTXinyiSqlServer"/> where 1 = 1
+        <if test="lastTime != null  and lastTime != ''"> and CONVERT ( datetime, LTRIM( RTRIM( V_DATE ) ) + ' ' + LTRIM( RTRIM( V_TIME ) ) ) > = #{lastTime}</if>
+    </select>
+
+</mapper>