完善前端二期播种墙初始化和任务完成按钮,后端定期删除日志
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | Usage: npm <command> |
| | | |
| | | where <command> is one of: |
| | | access, adduser, audit, bin, bugs, c, cache, ci, cit, |
| | | clean-install, clean-install-test, completion, config, |
| | | create, ddp, dedupe, deprecate, dist-tag, docs, doctor, |
| | | edit, explore, fund, get, help, help-search, hook, i, init, |
| | | install, install-ci-test, install-test, it, link, list, ln, |
| | | login, logout, ls, org, outdated, owner, pack, ping, prefix, |
| | | profile, prune, publish, rb, rebuild, repo, restart, root, |
| | | run, run-script, s, se, search, set, shrinkwrap, star, |
| | | stars, start, stop, t, team, test, token, tst, un, |
| | | uninstall, unpublish, unstar, up, update, v, version, view, |
| | | whoami |
| | | |
| | | npm <command> -h quick help on <command> |
| | | npm -l display full usage info |
| | | npm help <term> search for help on <term> |
| | | npm help npm involved overview |
| | | |
| | | Specify configs in the ini-formatted file: |
| | | C:\Users\zjc\.npmrc |
| | | or on the command line via: npm <command> --key value |
| | | Config info can be viewed via: npm help config |
| | | |
| | | npm@6.14.0 D:\nvm\nvm\v16.20.2\node_modules\npm |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | Usage: npm <command> |
| | | |
| | | where <command> is one of: |
| | | access, adduser, audit, bin, bugs, c, cache, ci, cit, |
| | | clean-install, clean-install-test, completion, config, |
| | | create, ddp, dedupe, deprecate, dist-tag, docs, doctor, |
| | | edit, explore, fund, get, help, help-search, hook, i, init, |
| | | install, install-ci-test, install-test, it, link, list, ln, |
| | | login, logout, ls, org, outdated, owner, pack, ping, prefix, |
| | | profile, prune, publish, rb, rebuild, repo, restart, root, |
| | | run, run-script, s, se, search, set, shrinkwrap, star, |
| | | stars, start, stop, t, team, test, token, tst, un, |
| | | uninstall, unpublish, unstar, up, update, v, version, view, |
| | | whoami |
| | | |
| | | npm <command> -h quick help on <command> |
| | | npm -l display full usage info |
| | | npm help <term> search for help on <term> |
| | | npm help npm involved overview |
| | | |
| | | Specify configs in the ini-formatted file: |
| | | C:\Users\zjc\.npmrc |
| | | or on the command line via: npm <command> --key value |
| | | Config info can be viewed via: npm help config |
| | | |
| | | npm@6.14.0 D:\nvm\nvm\v16.20.2\node_modules\npm |
| | | |
| | |
| | | module.exports = { |
| | | presets: [ |
| | | '@vue/cli-plugin-babel/preset' |
| | | ], |
| | | plugins: [ |
| | | // æ·»å å¯é龿ä½ç¬¦æ¯æ |
| | | '@babel/plugin-proposal-optional-chaining' |
| | | ] |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "äºææç§å¢åå§å", |
| | | icon: '', |
| | | value: 'LightB2', |
| | | class: '', |
| | | // plain:true, |
| | | type: 'primary', |
| | | // plain:true, |
| | | onClick: function () { |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "å¼å¸¸ä»»å¡å¤ç", |
| | | icon: 'el-icon-plus', |
| | | value: 'ExceptionTask', |
| | | class: '', |
| | | // plain:true, |
| | | type: 'success', |
| | | // plain:true, |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "ç¼ è¾", |
| | | icon: 'el-icon-edit', |
| | | value: 'Update', |
| | |
| | | "wangeditor": "^4.7.6" |
| | | }, |
| | | "devDependencies": { |
| | | "@babel/core": "^7.28.5", |
| | | "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", |
| | | "@babel/plugin-proposal-optional-chaining": "^7.21.0", |
| | | "@babel/plugin-syntax-dynamic-import": "^7.8.3", |
| | | "@babel/preset-env": "^7.28.5", |
| | | "@vue/cli-plugin-babel": "~4.5.0", |
| | | "@vue/cli-plugin-eslint": "~4.5.0", |
| | | "@vue/cli-plugin-router": "~4.5.0", |
| | |
| | | "@vue/compiler-sfc": "^3.0.0", |
| | | "@vue/test-utils": "^2.0.0-0", |
| | | "babel-eslint": "^10.1.0", |
| | | "babel-loader": "^10.0.0", |
| | | "chai": "^4.1.2", |
| | | "cross-env": "^7.0.3", |
| | | "less": "^4.1.1", |
| | |
| | | VIEW: 'view', |
| | | PAGE: 'getPageData', |
| | | AUDIT: 'audit', |
| | | // INITLIGHT:'InitLight', |
| | | DEL: 'del', |
| | | EXPORT: 'Export', //å¯¼åºæä½è¿åå å¯åçè·¯å¾ |
| | | DOWNLOAD: 'DownLoadFile', //å¯¼åºæä»¶ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/taskExecuteDetail.vue' |
| | | import gridBody from "./extend/taskExecuteDetail.vue"; |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: "", |
| | | gridBody: gridBody, |
| | | gridFooter: "", |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: "", //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | // this.$Notice.success({ title: this.detailOptions.cnName + ',æ¥è¯¢ç»æ', desc: 'è¿åç对象ï¼' + JSON.stringify(data) }); |
| | | |
| | | var previousButton = this.buttons.find((x) => x.value == "Previous"); |
| | | if (previousButton) previousButton.hidden = true; |
| | | var nextButton = this.buttons.find((x) => x.value == "Next"); |
| | | if (nextButton) nextButton.hidden = true; |
| | | var recoveryButton = this.buttons.find((x) => x.value == "TaskRecovery"); |
| | | if (recoveryButton) recoveryButton.hidden = true; |
| | | |
| | | let LightB2Btn = this.buttons.find((x) => x.value == "LightB2"); |
| | | if (LightB2Btn) { |
| | | LightB2Btn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | this.http.post("api/Task/InitLight", "æç§å¢å¯å¨ä¸").then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | }; |
| | | } |
| | | |
| | | let TaskCompletedBtn = this.buttons.find( |
| | | (x) => x.value == "TaskCompleted" |
| | | ); |
| | | |
| | | if (TaskCompletedBtn) { |
| | | TaskCompletedBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | |
| | | if (rows.length > 1) { |
| | | return this.$error("䏿¬¡åªè½æä½ä¸æ¡æ°æ®!"); |
| | | } |
| | | |
| | | this.$confirm("ç¡®å®è´§ç®±æ¾å¨ç®æ å°åäºåï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | const taskNum = rows[0].taskNum; |
| | | |
| | | // æ¹æ³1ï¼åéJSONæ°æ®ï¼éè¦åç«¯æ¯æ[FromBody]ï¼ |
| | | // this.http.post("api/Task/RecTaskCompleted", { taskNum }, "ä»»å¡å®æä¸") |
| | | |
| | | // ææ¹æ³2ï¼URLåæ°æ¹å¼ |
| | | this.http |
| | | .post( |
| | | `api/Task/RecTaskCompleted?taskNum=${taskNum}`, |
| | | null, |
| | | "ä»»å¡å®æä¸" |
| | | ) |
| | | |
| | | // ææ¹æ³3ï¼è¡¨åæ°æ®æ¹å¼ |
| | | // let formData = new FormData(); |
| | | // formData.append('taskNum', taskNum); |
| | | // this.http.post("api/Task/RecTaskCompleted", formData, "ä»»å¡å®æä¸") |
| | | |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已忶æä½", |
| | | }); |
| | | }); |
| | | }; |
| | | } |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: "æä½", |
| | | title: "æä½", |
| | | width: 70, |
| | | fixed: "right", |
| | | align: "center", |
| | | formatter: (row) => { |
| | | return '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥ç</i>'; |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | }, |
| | | }); |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | // this.$Notice.success({ title: this.detailOptions.cnName + ',æ¥è¯¢ç»æ', desc: 'è¿åç对象ï¼' + JSON.stringify(data) }); |
| | | |
| | | var previousButton = this.buttons.find((x) => x.value == "Previous"); |
| | | if (previousButton) previousButton.hidden = true; |
| | | var nextButton = this.buttons.find((x) => x.value == "Next"); |
| | | if (nextButton) nextButton.hidden = true; |
| | | var recoveryButton = this.buttons.find((x) => x.value == "TaskRecovery"); |
| | | if (recoveryButton) recoveryButton.hidden = true; |
| | | |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 70, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥ç</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | },); |
| | | |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | }, |
| | | }, |
| | | }; |
| | | export default extension; |
| | |
| | | // const webpack = require("webpack"); |
| | | |
| | | module.exports = { |
| | | productionSourceMap: false, |
| | | lintOnSave: false, |
| | |
| | | } |
| | | }, |
| | | css: { |
| | | //æ¥çCSSå±äºåªä¸ªcssæä»¶ |
| | | sourceMap: true |
| | | }, |
| | | // 强å¶è½¬è¯ä¾èµ |
| | | transpileDependencies: [ |
| | | 'vue-router', |
| | | 'vue-draggable-next' |
| | | ], |
| | | configureWebpack: { |
| | | module: { |
| | | rules: [ |
| | |
| | | test: /\.mjs$/, |
| | | include: /node_modules/, |
| | | type: "javascript/auto" |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | //https://cli.vuejs.org/zh/guide/html-and-static-assets.html#html |
| | | chainWebpack: (config) => { |
| | | // ç§»é¤ prefetch æä»¶ |
| | | config.plugins.delete('prefetch'); |
| | | //èªä¸å®ä¹title |
| | | |
| | | config.plugin('html').tap((args) => { |
| | | args[0].title = 'WCS'; |
| | | return args; |
| | | }); |
| | | |
| | | // æè
|
| | | // ä¿®æ¹å®çéé¡¹ï¼ |
| | | // config.plugin('prefetch').tap(options => { |
| | | // options[0].fileBlacklist = options[0].fileBlacklist || [] |
| | | // options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/) |
| | | // return options |
| | | // }) |
| | | |
| | | // æ·»å 对 mjs æä»¶çå¤ç |
| | | config.module |
| | | .rule('mjs') |
| | | .test(/\.mjs$/) |
| | | .include |
| | | .add(/node_modules/) |
| | | .end() |
| | | .type('javascript/auto'); |
| | | } |
| | | // configureWebpack: { |
| | | // plugins: [ |
| | | // new webpack.optimize.MinChunkSizePlugin({ |
| | | // minChunkSize: 100000 // éè¿åå¹¶å°äº minChunkSize 大å°ç chunkï¼å° chunk ä½ç§¯ä¿æå¨æå®å¤§å°éå¶ä»¥ä¸ |
| | | // }) |
| | | // ] |
| | | // } |
| | | }; |
| | | } |
| | |
| | | { |
| | | public interface ISys_LogService : IService<Sys_Log> |
| | | { |
| | | void DeleteOldLogs(); |
| | | } |
| | | } |
| | |
| | | /// AGVç¶ææ¥è¯¢è°ç¨åWMSæ
é䏿¥ |
| | | /// </summary> |
| | | void AgvSearchStatus(); |
| | | /// <summary> |
| | | /// éç½®ææå¼å¸¸ä»»å¡ |
| | | /// </summary> |
| | | WebResponseContent ResetAllExceptionTask(int taskNum); |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | //RYB_PTL.UserResultAvailable += new RYB_PTL.UserResultAvailableEventHandler(RYB_PTL_UserResultAvailable); |
| | | |
| | | |
| | | bool isCfg = RYB_PTL.RYB_PTL_InitialConfiguration(new string[,] { { "11.2.30.252", "0001-0016" },{ "11.2.30.252", "1-16" } }); |
| | | bool isConnected = RYB_PTL.RYB_PTL_Connect(request.sIp, request.iPort); |
| | | } |
| | |
| | | /// <summary> |
| | | /// WMSä»»å¡åæ¶åæ¥ |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <param name="taskCancels"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("CancelTask"), AllowAnonymous] |
| | | public WebResponseContent CancelTask(List<TaskCancel> taskCancels) |
| | | public WebResponseContent CancelTask([FromBody] List<TaskCancel> taskCancels) |
| | | { |
| | | return WebResponseContent.Instance.Error(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æä»»å¡å¼å¸¸900ä¿®æ¹ä¸ºAGVæ§è¡ä¸300 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ResetAllExceptionTask"), AllowAnonymous] |
| | | public WebResponseContent ResetAllExceptionTask(int taskNum) |
| | | { |
| | | return Service.ResetAllExceptionTask(taskNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | // 注æï¼http://127.0.0.1:1818 å http://localhost:1818 æ¯ä¸ä¸æ ·ç |
| | | "IPs": "http://127.0.0.1:8080,http://localhost:8080" |
| | | }, |
| | | "ApiLogIgnore": "Export,Get,get", |
| | | "ApiLogIgnore": "Export,Get,get,robotQuery,drivestatus", |
| | | "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",æ£å¼ç¯å¢å°å |
| | | "LogDeubgEnable": true, //æ¯å¦è®°å½è°è¯æ¥å¿ |
| | | "PrintSql": false, //æå°SQLè¯å¥ |
| | |
| | | using System; |
| | | using NPOI.HSSF.Record; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | |
| | | { |
| | | public class Sys_LogService : ServiceBase<Sys_Log, ISys_LogRepository>, ISys_LogService |
| | | { |
| | | private static DateTime? _lastExecutionDate = null; |
| | | private readonly object _lock = new object(); |
| | | |
| | | public Sys_LogService(ISys_LogRepository BaseDal) : base(BaseDal) |
| | | { |
| | | |
| | | } |
| | | |
| | | public void DeleteOldLogs() |
| | | { |
| | | // 使ç¨éç¡®ä¿çº¿ç¨å®å
¨ |
| | | lock (_lock) |
| | | { |
| | | var today = DateTime.Today; |
| | | |
| | | // æ£æ¥ä»å¤©æ¯å¦å·²ç»æ§è¡è¿ |
| | | if (_lastExecutionDate.HasValue && _lastExecutionDate.Value.Date == today) |
| | | { |
| | | return; |
| | | } |
| | | try |
| | | { |
| | | // 计ç®3个æåçæ¥æ |
| | | var threeMonthsAgo = DateTime.Now.AddMonths(-3); |
| | | // 计ç®3天åçæ¥æ |
| | | var sevenDaysAgo = DateTime.Now.AddDays(-3); |
| | | // ç¹å®URL |
| | | var specificUrl = "http://11.2.30.141:10870/interfaces/api/amr/robotQuery"; |
| | | |
| | | // æå»ºå 餿¡ä»¶ï¼3个æåçæ¥å¿ æ (7天åä¸URL为ç¹å®å°åçæ¥å¿) |
| | | var result = BaseDal.Db.Deleteable<Sys_Log>() |
| | | .Where(log => log.EndDate < threeMonthsAgo || |
| | | (log.EndDate < sevenDaysAgo && log.Url == specificUrl)) |
| | | .ExecuteCommand(); |
| | | // æ´æ°æåæ§è¡æ¥æä¸ºä»å¤© |
| | | _lastExecutionDate = today; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine($"æ§è¡æ¥å¿æ¸
çæ¶åçé误ï¼{ex.Message}"); |
| | | // åçé误æ¶ä¸æ´æ°æåæ§è¡æ¥æï¼ä»¥ä¾¿éè¯ |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// éç½®ææå¼å¸¸ä»»å¡ |
| | | /// </summary> |
| | | public WebResponseContent ResetAllExceptionTask(int taskNum) |
| | | { |
| | | // è·åå¼å¸¸ä»»å¡990ä¿®æ¹ä¸ºAGVå¾
æ§è¡300 |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task == null) return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä»»å¡ä¿¡æ¯,ä»»å¡å·:ã{taskNum}ã"); |
| | | if (task.TaskState != (int)TaskStatusEnum.Exception) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"该任å¡ç¶æä¸å¯éç½®,ä»»å¡å·:ã{taskNum}ã,ä»»å¡ç¶æ:ã{task.TaskState}ã"); |
| | | } |
| | | task.TaskState = (int)TaskStatusEnum.AGV_Execute; |
| | | BaseDal.UpdateData(task); |
| | | //_taskExecuteDetailService.AddTaskExecuteDetail(task, $"人工éç½®å¼å¸¸ä»»å¡,éç½®åä»»å¡ç¶æã{task.TaskState}ã"); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ISystemRepository; |
| | | using WIDESEAWCS_ISystemServices; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private readonly ILocationInfoRepository _locationInfoRepository; |
| | | private readonly IMapper _mapper; |
| | | private readonly ISys_LogService _logService; |
| | | |
| | | public AGVErrorJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, ILocationInfoRepository locationInfoRepository, IMapper mapper) |
| | | |
| | | public AGVErrorJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, ILocationInfoRepository locationInfoRepository, ISys_LogService logService, IMapper mapper) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _locationInfoRepository = locationInfoRepository; |
| | | _mapper = mapper; |
| | | _logService = logService; |
| | | } |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | try |
| | | { |
| | | _taskService.AgvSearchStatus(); |
| | | // æ¥è¯¢æ¥å¿å3个æå3天å并䏿¯Url为http://11.2.30.141:10870/interfaces/api/amr/robotQuery |
| | | _logService.DeleteOldLogs(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_ISystemServices\WIDESEAWCS_ISystemServices.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_TaskInfoService\WIDESEAWCS_TaskInfoService.csproj" /> |
| | | </ItemGroup> |
| | | |