瀏覽代碼

添加马连洼<-->数据同步功能

jianglw 4 年之前
父節點
當前提交
855f6cddfd

+ 5 - 1
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go

@@ -105,6 +105,8 @@ func (s *SamplesInfoService) GetPagingEntitiesWithTb(acccode string, pageIndex,
 	}
 	tbldetail := acccode + SamplesDetailtbName
 	tblmain := acccode + SamplesMaintbName
+	tbsource := acccode + AnimalInfoName
+
 	//groupdetail := acccode + GroupDetailName
 
 	sqlCount := " select count(*) from " + tbldetail + " a  left join " + tblmain + " b on a.SampleCode = b.SampleCode left join " + tbldonor + " c on b.SourceId = c.Id left join Shelf d on a.ShelfId=d.Id left join Box e on a.BoxId=e.Id left join Equipment f on a.EquipmentId=f.Id  where " + where
@@ -113,12 +115,14 @@ func (s *SamplesInfoService) GetPagingEntitiesWithTb(acccode string, pageIndex,
 	var sql string
 
 	//sql = ` select a.*,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode,g.GroupId,g.GroupName from ` + tbldetail + ` a
-	sql = ` select a.*,substr(a.SampleCode,6,4) as groupNo,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode from ` + tbldetail + ` a
+	sql = ` select a.*,substr(a.SampleCode,6,4) as groupNo,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,
+	d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode, g.Longitude, g.Latitude, g.Altitude from ` + tbldetail + ` a
 	left join ` + tblmain + ` b on a.SampleCode = b.SampleCode  
 	left join ` + tbldonor + ` c on b.SourceId = c.Id 
 	left join Shelf d on a.ShelfId=d.Id 
 	left join Box e on a.BoxId=e.Id 
 	left join Equipment f on a.EquipmentId=f.Id 
+	left join `+ tbsource + ` g on b.SourceId = g.Id
 	
 	where ` + where + order + `
 		 limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage) + ""

+ 21 - 5
src/dashoo.cn/frontend_animal/nuxt.config.js

@@ -159,8 +159,16 @@ module.exports = {
   },
 
   axios: {
-    // baseURL: '//localhost:9081/api/' // 本机开发使用
-    baseURL: '/api/' // 蜜蜂所正式发版使用
+    // baseURL: '//81.68.138.114:22533/api/', // 本机开发使用 localhost
+    baseURL: '//192.168.0.37:9081/api/', // 本机开发使用 localhost
+    fileDownLoadURL: '//81.68.138.114:22533/'
+    // baseURL: '//36.112.37.213:9081/api/', // 蜜蜂所
+    // fileDownLoadURL: '//36.112.37.213:9081/' // 蜜蜂所
+    // fileDownLoadURL: '//127.0.0.1:22533/'
+    // fileDownLoadURL: '//10.66.6.237:9081/',
+    // baseURL: '//10.66.6.237:9081/api/' // 蜜蜂所
+    // fileDownLoadURL: '//10.66.6.237:9081/'
+    // baseURL: '/api/' // 蜜蜂所正式发版使用
     // baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
     // baseURL: '//188.188.30.89:9081/api/' //临沂使用
     // baseURL: '//api09.labsop.cn/api/'
@@ -179,11 +187,19 @@ module.exports = {
     // imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
     // imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
     // upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
-    imgserverhost: '/serveruploadfile', // 蜜蜂所服务地址,图片上传文件
-    upfilehost: '/uploadfile' // 蜜蜂所附件上传
+    // imgserverhost: '/serveruploadfile', // 蜜蜂所服务地址,图片上传文件
+    // upfilehost: '/uploadfile' // 蜜蜂所附件上传
 
     // imgserverhost: 'http://188.188.30.89:9081', // 临沂服务地址,图片上传文件
     // upfilehost: '188.188.30.89:9333/dir/assign', // 临沂附件上传
-
+    // imgserverhost: 'http://192.168.0.192:22533', // 临沂服务地址,图片上传文件
+    // micro_base_url: 'http://10.66.6.237:9981', // 网关地址
+    // imgserverhost: 'http://10.66.6.237:9081', // 临沂服务地址,图片上传文件
+    // micro_base_url: 'http://36.112.37.213:9881', // 蜜蜂所网关地址
+    // imgserverhost: 'http://36.112.37.213:9081', // 蜜蜂所服务地址,图片上传文件
+    micro_base_url: 'http://192.168.0.37:9981', // 网关地址
+    imgserverhost: 'http://192.168.0.37:9081', // 临沂服务地址,图片上传文件
+    upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 临沂附件上传
+    micro_base_path: 'dashoo.biobank.bee-0.1-jlw' // 微服务地址
   }
 }

+ 1 - 1
src/dashoo.cn/frontend_animal/src/pages/biobank/source/animal.vue

@@ -1097,7 +1097,7 @@ export default {
         type: 'warning'
       }).then(() => {
         this.loading = true
-        updateInfo({update_type: this.syncType}).then(res => {
+        updateInfo({update_type: this.syncType, add_or_update: '2'}).then(res => {
           this.loading = false
           if (res.code === 200) {
             this.$message({

+ 22 - 5
src/dashoo.cn/frontend_animal/src/pages/index.vue

@@ -196,10 +196,11 @@
   import {
     mapGetters
   } from 'vuex'
+  import {  getTeleConn } from '../utils/microSampleRelated'
   export default {
     name: 'index',
 
-    data() {
+    data () {
       return {
         Diseases: '',
        // diseaseinfolist: [], //疾病
@@ -250,7 +251,7 @@
     },
     created() {
       this.getstylebyuser()
-      //this.getDiseasesList()
+      // this.getDiseasesList()
       this.getPermissions() //权限
       this.getGroupList()
       let _this = this
@@ -278,8 +279,9 @@
             console.error(err)
           })
       },
-      initData() {
+      initData () {
         let _this = this
+        _this.getTeleConn()
         this.$axios.get('users/getaccountinfo', {})
           .then(res => {
             _this.usertotal = res.data
@@ -293,9 +295,24 @@
             console.error(err)
           })
       },
-
+      // 获取远程连接测试(数据同步用)
+      getTeleConn () {
+        getTeleConn().then(res => {
+          if (res.code === 200) {
+            this.$message({
+              type: 'success',
+              message: res.msg
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.msg
+            })
+          }
+        })
+      },
       // 统计样本总数的饼状图
-      getBySampleType() {
+      getBySampleType () {
         let _this = this
         let params = {
           diseases: this.Diseases,

+ 2 - 2
src/dashoo.cn/frontend_animal/src/pages/samples/archived/index.vue

@@ -734,7 +734,7 @@ export default {
       if (_this.SampleType !== '') {
         _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
           .then(res => {
-            _this.STNoteField = []
+            _this.STNoteField = ''
             _this.typetykzlist = res.data
           })
       }
@@ -1284,7 +1284,7 @@ export default {
         d_item: this.DItem,
         equipment_ids: (this.EquipmentIds).length == 0 ? '' : this.EquipmentIds.join(','),
         stnote_value: this.Stnotevalue,
-        stnote_field: this.STNoteField == '' ? [] : this.STNoteField,
+        stnote_field: this.STNoteField == '' ? '' : this.STNoteField,
         create_by: this.CreateBy,
         source_name: this.SourceName,
         name: this.Name,

+ 7 - 2
src/dashoo.cn/frontend_animal/src/pages/samples/prerecorded/index.vue

@@ -512,6 +512,11 @@
           name: '所属分组',
           show: false,
           kuoz: false
+        }, {
+          filed: 'Remark',
+          name: '备注',
+          show: true,
+          kuoz: false
         }]
       }
       this.getextends()
@@ -686,7 +691,7 @@
           _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
             .then(res => {
               // response
-              _this.STNoteField = []
+              _this.STNoteField = ''
               _this.typetykzlist = res.data
             })
         }
@@ -804,7 +809,7 @@
           d_item: this.DItem,
           equipment_ids: (this.EquipmentIds).length == 0 ? '' : this.EquipmentIds.join(','),
           stnote_value: this.Stnotevalue,
-          stnote_field: this.STNoteField == '' ? [] : this.STNoteField,
+          stnote_field: this.STNoteField == '' ? '' : this.STNoteField,
           create_by: this.CreateBy,
           source_name: this.SourceName,
           name: this.Name,

+ 2 - 2
src/dashoo.cn/frontend_animal/src/pages/samples/stored/index.vue

@@ -775,7 +775,7 @@
         if (_this.SampleType !== '') {
           _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
             .then(res => {
-              _this.STNoteField = []
+              _this.STNoteField = ''
               _this.typetykzlist = res.data
             })
         }
@@ -1042,7 +1042,7 @@
           d_item: this.DItem,
           equipment_ids: (this.EquipmentIds).length == 0 ? '' : this.EquipmentIds.join(','),
           stnote_value: this.Stnotevalue,
-          stnote_field: this.STNoteField == '' ? [] : this.STNoteField,
+          stnote_field: this.STNoteField == '' ? '' : this.STNoteField,
           create_by: this.CreateBy,
           source_name: this.SourceName,
           name: this.Name,

+ 2 - 2
src/dashoo.cn/frontend_animal/src/pages/samples/waitingstore/index.vue

@@ -656,7 +656,7 @@
         if (_this.SampleType !== '') {
           _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
             .then(res => {
-              _this.STNoteField = []
+              _this.STNoteField = ''
               _this.typetykzlist = res.data
             })
         }
@@ -1192,7 +1192,7 @@
           d_item: this.DItem,
           equipment_ids: (this.EquipmentIds).length == 0 ? '' : this.EquipmentIds.join(','),
           stnote_value: this.Stnotevalue,
-          stnote_field: this.STNoteField == '' ? [] : this.STNoteField,
+          stnote_field: this.STNoteField == '' ? '' : this.STNoteField,
           create_by: this.CreateBy,
           source_name: this.SourceName,
           name: this.Name,

+ 5 - 0
src/dashoo.cn/frontend_animal/src/utils/microSampleRelated.js

@@ -50,3 +50,8 @@ export function sampleSearchByTemplate (params) {
 export function updateInfo (params) {
   return request.postRequest(basePath, 'BarcodeRules', 'UpdateInfo', params)
 }
+
+// 远程连接测试
+export function getTeleConn (params) {
+  return request.postRequest(basePath, 'BarcodeRules', 'GetTeleConn', params)
+}