فهرست منبع

cloud 获取修正数据

yuanhao 2 سال پیش
والد
کامیت
f7a04556b6
19فایلهای تغییر یافته به همراه1586 افزوده شده و 180 حذف شده
  1. 43 0
      in-cloud-ui/src/api/quartzBase.js
  2. 42 5
      in-cloud-ui/src/router/index.js
  3. 1 1
      in-cloud-ui/src/views/index/index.vue
  4. 378 0
      in-cloud-ui/src/views/quartz/quartzBase/index.vue
  5. 344 0
      in-cloud-ui/src/views/quartz/quartzInfo/index.vue
  6. 341 0
      in-cloud-ui/src/views/vab/inCompany/index.vue
  7. 161 99
      in-cloud-ui/src/views/vab/station/index.vue
  8. 0 75
      in-cloud-ui/src/views/vab/table/components/TableEdit.vue
  9. 92 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/controller/QuartzBaseController.java
  10. 93 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/controller/QuartzController.java
  11. 4 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/entity/IntegrationCompany.java
  12. 2 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/entity/Quartz.java
  13. 36 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/entity/QuartzBase.java
  14. 1 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/job/data/pull/PullInitDataJob.java
  15. 9 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/mapper/QuartzBaseMapper.java
  16. 11 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/service/QuartzBaseService.java
  17. 2 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/service/QuartzService.java
  18. 19 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/service/impl/QuartzBaseServiceImpl.java
  19. 7 0
      in-cloud/src/main/java/com/jiayue/insu/incloud/service/impl/QuartzServiceImpl.java

+ 43 - 0
in-cloud-ui/src/api/quartzBase.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request'
+
+export function fetchList(query) {
+  return request({
+    url: '/quartzBase/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addObj(obj) {
+  return request({
+    url: '/quartzBase',
+    method: 'post',
+    data: obj
+  })
+}
+
+export function getExecuteClass(code) {
+  return request({
+    url: '/quartzBase/executeClass/' + code,
+    method: 'get'
+  })
+}
+
+
+
+
+export function delObj(id) {
+  return request({
+    url: '/quartzBase/' + id,
+    method: 'delete'
+  })
+}
+
+export function putObj(obj) {
+  return request({
+    url: '/quartzBase',
+    method: 'put',
+    data: obj
+  })
+
+}

+ 42 - 5
in-cloud-ui/src/router/index.js

@@ -60,14 +60,23 @@ export const asyncRoutes = [
     redirect: 'noRedirect',
     name: 'Vab',
     alwaysShow: true,
-    meta: { title: '组件', icon: 'box-open' },
+    meta: { title: '基本信息', icon: 'box-open' },
     children: [
       {
-        path: 'table',
-        component: () => import('@/views/vab/table/index'),
-        name: 'Table',
+        path: 'station',
+        component: () => import('@/views/vab/station/index'),
+        name: 'station',
         meta: {
-          title: '表格',
+          title: '场站信息',
+          permissions: ['admin'],
+        },
+      },
+      {
+        path: 'inCompany',
+        component: () => import('@/views/vab/inCompany/index'),
+        name: 'inCompany',
+        meta: {
+          title: '公司信息',
           permissions: ['admin'],
         },
       },
@@ -83,6 +92,34 @@ export const asyncRoutes = [
     ],
   },
   {
+    path: '/quartz',
+    component: Layout,
+    redirect: 'noRedirect',
+    name: 'Quartz',
+    alwaysShow: true,
+    meta: { title: '定时任务', icon: 'clock' },
+    children: [
+      {
+        path: 'quartzInfo',
+        component: () => import('@/views/quartz/quartzInfo/index'),
+        name: 'quartzInfo',
+        meta: {
+          title: '定时任务',
+          permissions: ['admin'],
+        },
+      },
+      {
+        path: 'quartzBase',
+        component: () => import('@/views/quartz/quartzBase/index'),
+        name: 'quartzBase',
+        meta: {
+          title: '任务初始',
+          permissions: ['admin'],
+        },
+      },
+    ],
+  },
+  {
     path: '/error',
     component: EmptyLayout,
     redirect: 'noRedirect',

+ 1 - 1
in-cloud-ui/src/views/index/index.vue

@@ -480,7 +480,7 @@
           {
             icon: 'table',
             title: '表格',
-            link: '/vab/table/comprehensiveTable',
+            link: '/vab/station/station',
             color: '#5cdbd3',
           },
           {

+ 378 - 0
in-cloud-ui/src/views/quartz/quartzBase/index.vue

@@ -0,0 +1,378 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            <el-input v-model="searchForm.code" placeholder="公司编码" />
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+            <el-button icon="el-icon-plus" type="primary" @click="handleAdd">
+              添加
+            </el-button>
+          </el-form-item>
+        </el-form>
+      </vab-query-form-left-panel>
+    </vab-query-form>
+
+    <el-table
+      ref="tableSort"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      >
+
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <el-table-column show-overflow-tooltip prop="name" label="名称" />
+      <el-table-column
+        show-overflow-tooltip
+        prop="executeClass"
+        label="执行类"
+      />
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="sort"
+        label="排序"
+      />
+      <el-table-column show-overflow-tooltip prop="description" label="描述" />
+      <el-table-column
+        show-overflow-tooltip
+        prop="inCode"
+        label="所属公司"
+        :formatter="formatCompany"
+      />
+
+      <el-table-column show-overflow-tooltip label="操作" width="180px">
+        <template #default="{ row }">
+          <el-button type="text" @click="handleEdit(row)">
+            <el-tag type="success">编辑</el-tag>
+          </el-button>
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogFormVisible"
+      width="500px"
+      @close="close"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="名称" prop="name">
+          <el-input v-model.trim="form.name" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="执行类" prop="executeClass">
+          <el-input
+            v-model.trim="form.executeClass"
+            autocomplete="off"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="排序" prop="sort">
+          <el-input-number
+            v-model.trim="form.sort"
+            :min="1"
+            :max="15"
+            label="排序"
+          ></el-input-number>
+        </el-form-item>
+
+        <el-form-item label="描述" prop="description">
+          <el-input
+            v-model.trim="form.description"
+            autocomplete="off"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="所属公司" prop="inCode">
+          <el-select v-model.trim="form.inCode" clearable placeholder="请选择">
+            <el-option
+              v-for="item in companys"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="saveOrUpdate()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    fetchList,
+    addObj,
+    putObj,
+    delObj,
+    getExecuteClass,
+  } from '@/api/quartzBase'
+  import { getAll } from '@/api/integrationCompany'
+  export default {
+    name: 'QuartzBase',
+
+    data() {
+      const validateExecuteClass = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入执行类'))
+        }
+        getExecuteClass(this.form.code, value).then((response) => {
+          if (this.dialogType === 'edit') callback()
+          let result = response.data
+          if (result !== null) {
+            callback(new Error('执行类已存在'))
+          } else {
+            callback()
+          }
+        })
+      }
+
+      return {
+        dialogFormVisible: false,
+        dialogType: '',
+        title: '',
+        tableData: [],
+        companys: [],
+
+        searchForm: {
+          code: null,
+          name: null,
+        },
+        form: {},
+        imgShow: true,
+        list: [],
+        imageList: [],
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        selectRows: '',
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+        rules: {
+          name: [
+            { required: true, trigger: 'blur', message: '请输入公司名称' },
+          ],
+
+          executeClass: [
+            {
+              required: true,
+              trigger: 'blur',
+              validator: validateExecuteClass,
+            },
+          ],
+
+          sort: [
+            {
+              required: true,
+              trigger: 'blur',
+              message: '请输入排序'
+            },
+          ],
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.getCompany()
+    },
+    methods: {
+      getCompany() {
+        getAll()
+          .then((response) => {
+            this.companys = response.data
+            this.fetchData()
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+      async fetchData() {
+        this.listLoading = true
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      close() {
+        this.$refs['form'].resetFields()
+        this.form = this.$options.data().form
+        this.dialogFormVisible = false
+        this.$emit('fetch-data')
+      },
+      handleAdd() {
+        this.form = {}
+        this.title = '新增'
+        this.dialogType = 'add'
+        this.dialogFormVisible = true
+      },
+      handleEdit(row) {
+        this.form = row
+        this.title = '修改'
+        this.dialogType = 'edit'
+        this.dialogFormVisible = true
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          const { msg } = await delObj(row.id)
+          this.$baseMessage(msg, 'success')
+          this.fetchData()
+        })
+      },
+      saveOrUpdate() {
+        if (this.dialogType == 'add') {
+          this.save()
+        } else {
+          this.update()
+        }
+      },
+      save() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            addObj(this.form)
+              .then((response) => {
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+      update() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            putObj(this.form)
+              .then((response) => {
+                this.$message({
+                  message: '修改成功',
+                  type: 'success',
+                })
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.$message({
+                  message: '修改失败',
+                  type: 'warning',
+                })
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+
+      formatCompany(row, column) {
+        for (let i = 0; i < this.companys.length; i++) {
+          if (row.inCode == this.companys[i].code) {
+            return this.companys[i].name
+          }
+        }
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 344 - 0
in-cloud-ui/src/views/quartz/quartzInfo/index.vue

@@ -0,0 +1,344 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            <el-input v-model="searchForm.code" placeholder="场站标识" />
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+            <el-button icon="el-icon-plus" type="primary" @click="handleAdd">
+              添加
+            </el-button>
+          </el-form-item>
+        </el-form>
+      </vab-query-form-left-panel>
+    </vab-query-form>
+
+    <el-table
+      ref="tableSort"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      >
+
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <el-form label-position="left" inline class="demo-table-expand">
+            <el-form-item label="鉴权URL:">
+              <span>{{ props.row.comUrl }}</span>
+            </el-form-item>
+            <el-form-item label="推送数据URL:">
+              <span>{{ props.row.pushUrl }}</span>
+            </el-form-item>
+            <el-form-item label="拉取数据URL:">
+              <span>{{ props.row.pullUrl }}</span>
+            </el-form-item>
+          </el-form>
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <el-table-column show-overflow-tooltip prop="name" label="任务名称" />
+      <el-table-column show-overflow-tooltip prop="jobName" label="任务标识" />
+      <el-table-column show-overflow-tooltip prop="jobState" label="任务状态"  />
+      <el-table-column show-overflow-tooltip prop="executeClass" label="执行类"  />
+      <el-table-column show-overflow-tooltip prop="cronExpression" label="cronb表达式"  />
+      <el-table-column show-overflow-tooltip prop="executeClass" label="执行类"  />
+      <el-table-column show-overflow-tooltip prop="description" label="描述"  />
+
+      <el-table-column show-overflow-tooltip label="操作" width="180px">
+        <template #default="{ row }">
+          <el-button type="text" @click="handleEdit(row)">
+            <el-tag type="success">编辑</el-tag>
+          </el-button>
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogFormVisible"
+      width="500px"
+      @close="close"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="公司名称" prop="name">
+          <el-input v-model.trim="form.name" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="公司编码" prop="code">
+          <el-input v-model.trim="form.code" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="联系方式" prop="contact">
+          <el-input v-model.trim="form.contact" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="鉴权URL" prop="username">
+          <el-input v-model.trim="form.comUrl" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="推送数据URL" prop="username">
+          <el-input v-model.trim="form.pushUrl" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="拉取数据URL" prop="username">
+          <el-input v-model.trim="form.pullUrl" autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="saveOrUpdate()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    fetchList,
+    addObj,
+    putObj,
+    delObj,
+    getObj,
+    getAll,
+  } from '@/api/integrationCompany'
+
+  export default {
+    name: 'quartzInfo',
+
+    data() {
+      const validateInCompanyCode = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入一体化公司编码'))
+        }
+        getObj(this.form.code, value).then((response) => {
+          if (this.dialogType === 'edit') callback()
+          let result = response.data
+          if (result !== null) {
+            callback(new Error('一体化公司编码已存在'))
+          } else {
+            callback()
+          }
+        })
+      }
+
+      return {
+        dialogFormVisible: false,
+        dialogType: '',
+        title: '',
+        tableData: [],
+        companys: [],
+        elType: [
+          { label: '光电', value: 'E1' },
+          { label: '风电', value: 'E2' },
+        ],
+        searchForm: {
+          code: null,
+          name: null,
+        },
+        form: {},
+        imgShow: true,
+        list: [],
+        imageList: [],
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        selectRows: '',
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+        rules: {
+          name: [
+            { required: true, trigger: 'blur', message: '请输入公司名称' },
+          ],
+
+          code: [
+            {
+              required: true,
+              trigger: 'blur',
+              validator: validateInCompanyCode,
+            },
+          ],
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.fetchData()
+    },
+    methods: {
+      async fetchData() {
+        this.listLoading = true
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      close() {
+        this.$refs['form'].resetFields()
+        this.form = this.$options.data().form
+        this.dialogFormVisible = false
+        this.$emit('fetch-data')
+      },
+      handleAdd() {
+        this.form = {}
+        this.title = '新增'
+        this.dialogType = 'add'
+        this.dialogFormVisible = true
+      },
+      handleEdit(row) {
+        this.form = row
+        this.title = '修改'
+        this.dialogType = 'edit'
+        this.dialogFormVisible = true
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          const { msg } = await delObj(row.id)
+          this.$baseMessage(msg, 'success')
+          this.fetchData()
+        })
+      },
+      saveOrUpdate() {
+        if (this.dialogType == 'add') {
+          this.save()
+        } else {
+          this.update()
+        }
+      },
+      save() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            addObj(this.form)
+              .then((response) => {
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+      update() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            putObj(this.form)
+              .then((response) => {
+                this.$message({
+                  message: '修改成功',
+                  type: 'success'
+                });
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.$message({
+                  message: '修改失败',
+                  type: 'warning'
+                });
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 341 - 0
in-cloud-ui/src/views/vab/inCompany/index.vue

@@ -0,0 +1,341 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            <el-input v-model="searchForm.code" placeholder="场站标识" />
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+            <el-button icon="el-icon-plus" type="primary" @click="handleAdd">
+              添加
+            </el-button>
+          </el-form-item>
+        </el-form>
+      </vab-query-form-left-panel>
+    </vab-query-form>
+
+    <el-table
+      ref="tableSort"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      >
+
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <el-form label-position="left" inline class="demo-table-expand">
+            <el-form-item label="鉴权URL:">
+              <span>{{ props.row.comUrl }}</span>
+            </el-form-item>
+            <el-form-item label="推送数据URL:">
+              <span>{{ props.row.pushUrl }}</span>
+            </el-form-item>
+            <el-form-item label="拉取数据URL:">
+              <span>{{ props.row.pullUrl }}</span>
+            </el-form-item>
+          </el-form>
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <el-table-column show-overflow-tooltip prop="name" label="公司名称" />
+      <el-table-column show-overflow-tooltip label="公司编码" prop="code" />
+
+      <el-table-column show-overflow-tooltip label="联系方式" prop="contact" />
+
+      <el-table-column show-overflow-tooltip label="操作" width="180px">
+        <template #default="{ row }">
+          <el-button type="text" @click="handleEdit(row)">
+            <el-tag type="success">编辑</el-tag>
+          </el-button>
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogFormVisible"
+      width="500px"
+      @close="close"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="公司名称" prop="name">
+          <el-input v-model.trim="form.name" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="公司编码" prop="code">
+          <el-input v-model.trim="form.code" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="联系方式" prop="contact">
+          <el-input v-model.trim="form.contact" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="鉴权URL" prop="username">
+          <el-input v-model.trim="form.comUrl" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="推送数据URL" prop="username">
+          <el-input v-model.trim="form.pushUrl" autocomplete="off"></el-input>
+        </el-form-item>
+
+        <el-form-item label="拉取数据URL" prop="username">
+          <el-input v-model.trim="form.pullUrl" autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="saveOrUpdate()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    fetchList,
+    addObj,
+    putObj,
+    delObj,
+    getObj,
+    getAll,
+  } from '@/api/integrationCompany'
+
+  export default {
+    name: 'InCompany',
+
+    data() {
+      const validateInCompanyCode = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入一体化公司编码'))
+        }
+        getObj(this.form.code, value).then((response) => {
+          if (this.dialogType === 'edit') callback()
+          let result = response.data
+          if (result !== null) {
+            callback(new Error('一体化公司编码已存在'))
+          } else {
+            callback()
+          }
+        })
+      }
+
+      return {
+        dialogFormVisible: false,
+        dialogType: '',
+        title: '',
+        tableData: [],
+        companys: [],
+        elType: [
+          { label: '光电', value: 'E1' },
+          { label: '风电', value: 'E2' },
+        ],
+        searchForm: {
+          code: null,
+          name: null,
+        },
+        form: {},
+        imgShow: true,
+        list: [],
+        imageList: [],
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        selectRows: '',
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+        rules: {
+          name: [
+            { required: true, trigger: 'blur', message: '请输入公司名称' },
+          ],
+
+          code: [
+            {
+              required: true,
+              trigger: 'blur',
+              validator: validateInCompanyCode,
+            },
+          ],
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.fetchData()
+    },
+    methods: {
+      async fetchData() {
+        this.listLoading = true
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      close() {
+        this.$refs['form'].resetFields()
+        this.form = this.$options.data().form
+        this.dialogFormVisible = false
+        this.$emit('fetch-data')
+      },
+      handleAdd() {
+        this.form = {}
+        this.title = '新增'
+        this.dialogType = 'add'
+        this.dialogFormVisible = true
+      },
+      handleEdit(row) {
+        this.form = row
+        this.title = '修改'
+        this.dialogType = 'edit'
+        this.dialogFormVisible = true
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          const { msg } = await delObj(row.id)
+          this.$baseMessage(msg, 'success')
+          this.fetchData()
+        })
+      },
+      saveOrUpdate() {
+        if (this.dialogType == 'add') {
+          this.save()
+        } else {
+          this.update()
+        }
+      },
+      save() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            addObj(this.form)
+              .then((response) => {
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+      update() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            putObj(this.form)
+              .then((response) => {
+                this.$message({
+                  message: '修改成功',
+                  type: 'success'
+                });
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.$message({
+                  message: '修改失败',
+                  type: 'warning'
+                });
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 161 - 99
in-cloud-ui/src/views/vab/table/index.vue → in-cloud-ui/src/views/vab/station/index.vue

@@ -34,7 +34,30 @@
       :data="tableData"
       :element-loading-text="elementLoadingText"
       :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
     >
+      >
+
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <el-form label-position="left" inline class="demo-table-expand">
+            <el-form-item label="用户名:">
+              <span>{{ props.row.username }}</span>
+            </el-form-item>
+            <el-form-item label="密码:">
+              <span>{{ props.row.password }}</span>
+            </el-form-item>
+            <el-form-item label="通讯秘钥:">
+              <span>{{ props.row.comKey }}</span>
+            </el-form-item>
+            <el-form-item label="秘钥过期时间:">
+              <span>{{ props.row.keyTime }}</span>
+            </el-form-item>
+          </el-form>
+        </template>
+      </el-table-column>
+
       <el-table-column show-overflow-tooltip label="序号" width="95">
         <template #default="scope">
           {{ scope.$index + 1 }}
@@ -46,26 +69,13 @@
         label="场站编码"
         prop="stationCode"
       />
-      <el-table-column
-        show-overflow-tooltip
-        label="场站标识"
-        prop="signCode"
-      />
+      <el-table-column show-overflow-tooltip label="场站标识" prop="signCode" />
       <el-table-column
         show-overflow-tooltip
         label="场站类型"
         prop="type"
         :formatter="formatType"
       />
-      <el-table-column show-overflow-tooltip label="用户名" prop="username" />
-      <el-table-column show-overflow-tooltip label="密码" prop="password" />
-      <el-table-column show-overflow-tooltip label="通讯秘钥" prop="comKey" />
-      <el-table-column
-        show-overflow-tooltip
-        label="秘钥过期时间"
-        prop="keyTime"
-      />
-
       <el-table-column
         show-overflow-tooltip
         label="一体化公司"
@@ -77,8 +87,12 @@
 
       <el-table-column show-overflow-tooltip label="操作" width="180px">
         <template #default="{ row }">
-          <el-button type="text" @click="handleEdit(row)">编辑</el-button>
-          <el-button type="text" @click="handleDelete(row)">删除</el-button>
+          <el-button type="text" @click="handleEdit(row)">
+            <el-tag type="success">编辑</el-tag>
+          </el-button>
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -103,19 +117,22 @@
           <el-input v-model.trim="form.name" autocomplete="off"></el-input>
         </el-form-item>
         <el-form-item label="场站编码" prop="stationCode">
-          <el-input v-model.trim="form.stationCode" autocomplete="off"></el-input>
+          <el-input
+            v-model.trim="form.stationCode"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
         <el-form-item label="场站标识" prop="signCode">
           <el-input v-model.trim="form.signCode" autocomplete="off"></el-input>
         </el-form-item>
         <el-form-item label="场站类型" prop="type">
-          <el-select clearable v-model.trim="form.type" placeholder="请选择">
+          <el-select v-model.trim="form.type" clearable placeholder="请选择">
             <el-option
-              v-for="item in this.elType"
+              v-for="item in elType"
               :key="item.value"
               :label="item.label"
-              :value="item.value">
-            </el-option>
+              :value="item.value"
+            ></el-option>
           </el-select>
         </el-form-item>
 
@@ -126,15 +143,18 @@
           <el-input v-model.trim="form.password" autocomplete="off"></el-input>
         </el-form-item>
 
-        <el-form-item label="推送天速" prop="days">
-          <el-input v-model.trim="form.days" autocomplete="off"></el-input>
+        <el-form-item label="推送天数" prop="days">
+          <el-input-number
+            v-model.trim="form.days"
+            :min="1"
+            :max="15"
+            label="推送天数"
+          ></el-input-number>
         </el-form-item>
-
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="close">取 消</el-button>
-        <el-button type="primary" @click="save">确 定</el-button>
+        <el-button type="primary" @click="saveOrUpdate()">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -145,13 +165,28 @@
   import { getAll } from '@/api/integrationCompany'
 
   export default {
-    name: 'ComprehensiveTable',
-
+    name: 'Station',
 
     data() {
+      const validateStaionCode = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入场站编码'))
+        }
+        getObj(this.form.stationCode, value).then((response) => {
+          if (this.dialogType === 'edit') callback()
+          let result = response.data
+          if (result !== null) {
+            callback(new Error('场站编码已存在'))
+          } else {
+            callback()
+          }
+        })
+      }
+
       return {
         dialogFormVisible: false,
-        title:'',
+        dialogType: '',
+        title: '',
         tableData: [],
         companys: [],
         elType: [
@@ -161,9 +196,7 @@
         searchForm: {
           stationCode: null,
         },
-        form:{
-
-        },
+        form: {},
         imgShow: true,
         list: [],
         imageList: [],
@@ -181,6 +214,14 @@
         rules: {
           name: [{ required: true, trigger: 'blur', message: '请输入标题' }],
           type: [{ required: true, trigger: 'blur', message: '请输入作者' }],
+          stationCode: [
+            {
+              required: true,
+              trigger: 'blur',
+              validator: validateStaionCode,
+
+            },
+          ],
         },
       }
     },
@@ -190,11 +231,8 @@
       },
     },
     created() {
-
       this.getCompany()
     },
-    beforeDestroy() {},
-    mounted() {},
     methods: {
       getCompany() {
         getAll()
@@ -207,43 +245,6 @@
             this.listLoading = false
           })
       },
-
-      handleAdd() {
-        this.form = {},
-        this.title ="新增"
-        this.dialogFormVisible = true
-      },
-      handleEdit(row) {
-        this.form = row
-        this.title ="修改"
-        this.dialogFormVisible = true
-      },
-      handleDelete(row) {
-        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
-          const { msg } = await delObj(row.id)
-          this.$baseMessage(msg, 'success')
-          this.fetchData()
-        })
-      },
-      handleSizeChange(val) {
-        this.page.pageSize = val
-        this.page.currentPage = 1
-        this.fetchData()
-      },
-      handleCurrentChange(val) {
-        this.page.currentPage = val
-        this.fetchData()
-      },
-      handleQuery() {
-        for (var v in this.searchForm) {
-          if (this.searchForm[v] == '') {
-            delete this.searchForm[v]
-          }
-        }
-
-        this.page.currentPage = 1
-        this.fetchData()
-      },
       async fetchData() {
         this.listLoading = true
         fetchList(
@@ -264,23 +265,26 @@
             this.listLoading = false
           })
       },
-      testMessage() {
-        this.$baseMessage('test1', 'success')
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
       },
-      testALert() {
-        this.$baseAlert('11')
-        this.$baseAlert('11', '自定义标题', () => {
-          /* 可以写回调; */
-        })
-        this.$baseAlert('11', null, () => {
-          /* 可以写回调; */
-        })
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
       },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
 
-      testNotify() {
-        this.$baseNotify('测试消息提示', 'test', 'success', 'bottom-right')
+        this.page.currentPage = 1
+        this.fetchData()
       },
-
       formatType(row, column) {
         for (let i = 0; i < this.elType.length; i++) {
           if (row.type == this.elType[i].value) {
@@ -288,7 +292,6 @@
           }
         }
       },
-
       formatCompany(row, column) {
         for (let i = 0; i < this.companys.length; i++) {
           if (row.inCode == this.companys[i].code) {
@@ -296,30 +299,89 @@
           }
         }
       },
-
-
       close() {
         this.$refs['form'].resetFields()
         this.form = this.$options.data().form
         this.dialogFormVisible = false
         this.$emit('fetch-data')
       },
+      handleAdd() {
+        this.form = {}
+        this.title = '新增'
+        this.dialogType = 'add'
+        this.dialogFormVisible = true
+      },
+      handleEdit(row) {
+        this.form = row
+        this.title = '修改'
+        this.dialogType = 'edit'
+        this.dialogFormVisible = true
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          const { msg } = await delObj(row.id)
+          this.$baseMessage(msg, 'success')
+          this.fetchData()
+        })
+      },
+      saveOrUpdate() {
+        if (this.dialogType == 'add') {
+          this.save()
+        } else {
+          this.update()
+        }
+      },
       save() {
-        this.$refs.form.validate((valid)=>{
-          if (valid){
+        this.$refs.form.validate((valid) => {
+          if (valid) {
             this.listLoading = true
-            addObj(this.form).then(response => {
-              this.dialogFormVisible = false
-              this.fetchData()
-              this.listLoading = false
-            }).catch(() => {
-              this.listLoading = false
-            })
-          }else{
-            return false;
+            addObj(this.form)
+              .then((response) => {
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.listLoading = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+      update() {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            this.listLoading = true
+            putObj(this.form)
+              .then((response) => {
+                this.dialogFormVisible = false
+                this.fetchData()
+                this.listLoading = false
+              })
+              .catch(() => {
+                this.listLoading = false
+              })
+          } else {
+            return false
           }
         })
       },
     },
   }
 </script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 0 - 75
in-cloud-ui/src/views/vab/table/components/TableEdit.vue

@@ -1,75 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :visible.sync="dialogFormVisible"
-    width="500px"
-    @close="close"
-  >
-    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-      <el-form-item label="标题" prop="title">
-        <el-input v-model.trim="form.title" autocomplete="off"></el-input>
-      </el-form-item>
-      <el-form-item label="作者" prop="author">
-        <el-input v-model.trim="form.author" autocomplete="off"></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="close">取 消</el-button>
-      <el-button type="primary" @click="save">确 定</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-  import { doEdit } from '@/api/table'
-
-  export default {
-    name: 'TableEdit',
-    data() {
-      return {
-        form: {
-          title: '',
-          author: '',
-        },
-        rules: {
-          title: [{ required: true, trigger: 'blur', message: '请输入标题' }],
-          author: [{ required: true, trigger: 'blur', message: '请输入作者' }],
-        },
-        title: '',
-        dialogFormVisible: false,
-      }
-    },
-    created() {},
-    methods: {
-      showEdit(row) {
-        if (!row) {
-          this.title = '添加'
-        } else {
-          this.title = '编辑'
-          this.form = Object.assign({}, row)
-        }
-        this.dialogFormVisible = true
-      },
-      close() {
-        this.$refs['form'].resetFields()
-        this.form = this.$options.data().form
-        this.dialogFormVisible = false
-        this.$emit('fetch-data')
-      },
-      save() {
-        this.$refs['form'].validate(async (valid) => {
-          if (valid) {
-            const { msg } = await doEdit(this.form)
-            this.$baseMessage(msg, 'success')
-            this.$refs['form'].resetFields()
-            this.dialogFormVisible = false
-            this.$emit('fetch-data')
-            this.form = this.$options.data().form
-          } else {
-            return false
-          }
-        })
-      },
-    },
-  }
-</script>

+ 92 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/controller/QuartzBaseController.java

@@ -0,0 +1,92 @@
+package com.jiayue.insu.incloud.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.incloud.entity.Quartz;
+import com.jiayue.insu.incloud.entity.QuartzBase;
+import com.jiayue.insu.incloud.service.QuartzBaseService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * QuartzController
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/quartzBase")
+public class QuartzBaseController {
+
+    private final QuartzBaseService quartzBaseService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @param quartzBase quartzBase
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getStationPage(Page page, QuartzBase quartzBase) {
+        return R.ok(quartzBaseService.page(page, Wrappers.query(quartzBase)));
+    }
+
+    @GetMapping("/all")
+    public R getAll() {
+        return R.ok(quartzBaseService.list());
+    }
+
+    /**
+     * 通过执行类
+     *
+     * @param executeClass executeClass
+     * @return R
+     */
+        @GetMapping("/executeClass/{executeClass}")
+    public R getByExecuteClass(@PathVariable("executeClass") String  executeClass) {
+        return R.ok(quartzBaseService.findByExecuteClass(executeClass));
+    }
+
+
+    /**
+     * 新增quartzBase
+     *
+     * @param quartzBase quartzBase
+     * @return R
+     */
+
+    @PostMapping
+    public R save(@RequestBody  QuartzBase quartzBase) {
+        return R.ok(quartzBaseService.save(quartzBase));
+    }
+
+    /**
+     * 修改quartzBase
+     *
+     * @param quartzBase quartzBase
+     * @return R
+     */
+
+    @PutMapping
+    public R updateById(@RequestBody QuartzBase quartzBase) {
+        return R.ok(quartzBaseService.updateById(quartzBase));
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id id
+     * @return R
+     */
+    @DeleteMapping("/{id}")
+    public R removeById(@PathVariable Integer id) {
+        return R.ok(quartzBaseService.removeById(id));
+    }
+
+
+}

+ 93 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/controller/QuartzController.java

@@ -0,0 +1,93 @@
+package com.jiayue.insu.incloud.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.incloud.entity.IntegrationCompany;
+import com.jiayue.insu.incloud.entity.Quartz;
+import com.jiayue.insu.incloud.service.IntegrationCompanyService;
+import com.jiayue.insu.incloud.service.QuartzService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * QuartzController
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/quartz")
+public class QuartzController {
+
+    private final QuartzService quartzService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @param quartz quartz
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getStationPage(Page page, Quartz quartz) {
+        return R.ok(quartzService.page(page, Wrappers.query(quartz)));
+    }
+
+    @GetMapping("/all")
+    public R getAll() {
+        return R.ok(quartzService.list());
+    }
+
+    /**
+     * 通过code查询定时任务
+     *
+     * @param jobName jobName
+     * @return R
+     */
+    @GetMapping("/{jobName}")
+    public R getByCode(@PathVariable("jobName") String  jobName) {
+        return R.ok(quartzService.findByJobName(jobName));
+    }
+
+
+    /**
+     * 新增quartz
+     *
+     * @param quartz quartz
+     * @return R
+     */
+
+    @PostMapping
+    public R save(@RequestBody  Quartz quartz) {
+        return R.ok(quartzService.save(quartz));
+    }
+
+    /**
+     * 修改quartz
+     *
+     * @param quartz quartz
+     * @return R
+     */
+
+    @PutMapping
+    public R updateById(@RequestBody Quartz quartz) {
+        return R.ok(quartzService.updateById(quartz));
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id id
+     * @return R
+     */
+    @DeleteMapping("/{id}")
+    public R removeById(@PathVariable Integer id) {
+        return R.ok(quartzService.removeById(id));
+    }
+
+
+}

+ 4 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/entity/IntegrationCompany.java

@@ -30,6 +30,10 @@ public class IntegrationCompany extends  BaseEntity{
      */
     String code;
     /**
+     * 联系方式
+     */
+    String contact;
+    /**
      * 通讯keyURL
      */
     String comUrl;

+ 2 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/entity/Quartz.java

@@ -22,6 +22,8 @@ public class Quartz extends BaseEntity{
     @TableId(type = IdType.AUTO)
     private Integer id;
     /*任务名称*/
+    private String name;
+    /*任务标识*/
     private String jobName;
     /*任务状态*/
     private String jobState;

+ 36 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/entity/QuartzBase.java

@@ -0,0 +1,36 @@
+package com.jiayue.insu.incloud.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Quartz 定时任务基础信息
+ *
+ * @author yh
+ * @version 1.0
+ * @since 2018/12/7 16:22
+ */
+@TableName(value = "in_quartz_base")
+@Data
+public class QuartzBase extends BaseEntity{
+
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+    /*任务名称*/
+    private String name;
+    /*执行类*/
+    private String executeClass;
+    /*排序*/
+    private Integer sort;
+    /*任务描述*/
+    private String description;
+    /*所属一体化公司*/
+    private String inCode;
+
+
+}

+ 1 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/job/data/pull/PullInitDataJob.java

@@ -4,6 +4,7 @@ import com.jiayue.insu.incloud.entity.Station;
 import com.jiayue.insu.incloud.pulldata.PullInitData;
 import com.jiayue.insu.incloud.service.StationService;
 import org.quartz.Job;
+import org.quartz.JobDataMap;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;

+ 9 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/mapper/QuartzBaseMapper.java

@@ -0,0 +1,9 @@
+package com.jiayue.insu.incloud.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jiayue.insu.incloud.entity.QuartzBase;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface QuartzBaseMapper extends BaseMapper<QuartzBase> {
+}

+ 11 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/service/QuartzBaseService.java

@@ -0,0 +1,11 @@
+package com.jiayue.insu.incloud.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jiayue.insu.incloud.entity.QuartzBase;
+
+public interface QuartzBaseService extends IService<QuartzBase> {
+
+
+    QuartzBase findByExecuteClass(String executeClass);
+
+}

+ 2 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/service/QuartzService.java

@@ -5,5 +5,7 @@ import com.jiayue.insu.incloud.entity.Quartz;
 
 public interface QuartzService extends IService<Quartz> {
 
+    Quartz findByJobName(String jobName);
+
 
 }

+ 19 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/service/impl/QuartzBaseServiceImpl.java

@@ -0,0 +1,19 @@
+package com.jiayue.insu.incloud.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jiayue.insu.incloud.entity.QuartzBase;
+import com.jiayue.insu.incloud.mapper.QuartzBaseMapper;
+import com.jiayue.insu.incloud.service.QuartzBaseService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class QuartzBaseServiceImpl extends ServiceImpl<QuartzBaseMapper, QuartzBase> implements QuartzBaseService {
+
+    @Override
+    public QuartzBase findByExecuteClass(String executeClass) {
+        LambdaQueryWrapper<QuartzBase> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(QuartzBase::getExecuteClass,executeClass);
+        return this.getOne(lambdaQueryWrapper);
+    }
+}

+ 7 - 0
in-cloud/src/main/java/com/jiayue/insu/incloud/service/impl/QuartzServiceImpl.java

@@ -1,5 +1,6 @@
 package com.jiayue.insu.incloud.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jiayue.insu.incloud.entity.Quartz;
 import com.jiayue.insu.incloud.mapper.QuartzMapper;
@@ -10,4 +11,10 @@ import org.springframework.stereotype.Service;
 public class QuartzServiceImpl extends ServiceImpl<QuartzMapper, Quartz> implements QuartzService {
 
 
+    @Override
+    public Quartz findByJobName(String jobName) {
+        LambdaQueryWrapper<Quartz> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(Quartz::getJobName,jobName);
+        return this.getOne(lambdaQueryWrapper);
+    }
 }