手持系统
This commit is contained in:
BIN
dist(2).zip
Normal file
BIN
dist(2).zip
Normal file
Binary file not shown.
32
dist/index.html
vendored
Normal file
32
dist/index.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><title>立讯</title><script src=../../common/js/appmui.js></script><link href=./static/css/app.eed548fc062a5e0f06128b17bafe2ce6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.5f51929fc72978eab5e9.js></script><script type=text/javascript src=./static/js/app.522a115ee52bf347942f.js></script></body><script type=text/javascript>var event = document.createEvent('HTMLEvents');
|
||||||
|
event.initEvent('qrcodeEvent', false, true);
|
||||||
|
//提供给Android调用的方法
|
||||||
|
function qrcodeCallback(result){
|
||||||
|
event.data = {lxqrcode: result};
|
||||||
|
window.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
function barcodeCallback(result){
|
||||||
|
window.lxqrcode = result
|
||||||
|
// event.data = {lxqrcode: result};
|
||||||
|
// window.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
function imgUploadCallback(result){
|
||||||
|
window.upimgres = result
|
||||||
|
}
|
||||||
|
// window.onload=function(){
|
||||||
|
// document.onkeydown=function(ev){
|
||||||
|
// var event=ev ||event
|
||||||
|
// if(event.keyCode==13){
|
||||||
|
// imgUploadCallback('{"code":"1","desc":"上传成功","fileid":"6042511C35AF4B258045196D19DF9CA0"}')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// enter键测试调用扫码函数
|
||||||
|
// window.onload=function(){
|
||||||
|
// document.onkeydown=function(ev){
|
||||||
|
// var event=ev ||event
|
||||||
|
// if(event.keyCode==13){
|
||||||
|
// barcodeCallback('04#T0001')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }</script></html>
|
||||||
2
dist/static/css/app.eed548fc062a5e0f06128b17bafe2ce6.css
vendored
Normal file
2
dist/static/css/app.eed548fc062a5e0f06128b17bafe2ce6.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/css/app.eed548fc062a5e0f06128b17bafe2ce6.css.map
vendored
Normal file
1
dist/static/css/app.eed548fc062a5e0f06128b17bafe2ce6.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/static/fonts/element-icons.535877f.woff
vendored
Normal file
BIN
dist/static/fonts/element-icons.535877f.woff
vendored
Normal file
Binary file not shown.
BIN
dist/static/fonts/element-icons.732389d.ttf
vendored
Normal file
BIN
dist/static/fonts/element-icons.732389d.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/static/img/bg.04fc0af.png
vendored
Normal file
BIN
dist/static/img/bg.04fc0af.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 166 KiB |
BIN
dist/static/img/bg2.c06cca7.png
vendored
Normal file
BIN
dist/static/img/bg2.c06cca7.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/img/bg3.e7cbf84.png
vendored
Normal file
BIN
dist/static/img/bg3.e7cbf84.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
9
dist/static/js/0.c6ecf374a3ed74bd7cba.js
vendored
Normal file
9
dist/static/js/0.c6ecf374a3ed74bd7cba.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/0.c6ecf374a3ed74bd7cba.js.map
vendored
Normal file
1
dist/static/js/0.c6ecf374a3ed74bd7cba.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/1.a1577c7b9ecac816ac33.js
vendored
Normal file
2
dist/static/js/1.a1577c7b9ecac816ac33.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/1.a1577c7b9ecac816ac33.js.map
vendored
Normal file
1
dist/static/js/1.a1577c7b9ecac816ac33.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/2.c6bd5a548d16a02c6a57.js
vendored
Normal file
2
dist/static/js/2.c6bd5a548d16a02c6a57.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webpackJsonp([2],{"5zde":function(t,e,s){s("zQR9"),s("qyJz"),t.exports=s("FeBl").Array.from},Gu7T:function(t,e,s){"use strict";e.__esModule=!0;var n,r=s("c/Tr"),a=(n=r)&&n.__esModule?n:{default:n};e.default=function(t){if(Array.isArray(t)){for(var e=0,s=Array(t.length);e<t.length;e++)s[e]=t[e];return s}return(0,a.default)(t)}},P7Ss:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("Xxa5"),r=s.n(n),a=s("Gu7T"),i=s.n(a),o=s("exGp"),c=s.n(o),u=s("4ijW"),l={name:"Home",data:function(){return{menuList:[],show:!1,secM:[]}},mounted:function(){document.getElementsByTagName("body")[0].className="bgwhite",this.$store.dispatch("receiveMaterObj",{})},created:function(){},methods:{toPage:function(t){var e=t.path.substr(2);"CheckManage"!==e&&"PressCallMater"!==e||this.$store.dispatch("setKeepAlive",[e]),this.$router.push(t.path.substr(2))},_authority:function(){var t=this;return c()(r.a.mark(function e(){var s,n;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=""!==t.$store.getters.userInfo?JSON.parse(t.$store.getters.userInfo).account_id:"",e.next=3,Object(u.a)(s);case 3:"1"===(n=e.sent).code?t.menuList=[].concat(i()(n.result.sonTree)):t.Dialog(n.desc);case 5:case"end":return e.stop()}},e,t)}))()},Quit:function(){this.$store.dispatch("setSignOut"),this.$router.push("/login")},goInner:function(t){var e=t.substr(1);"CheckManage"!==e&&"PressCallMater"!==e||this.$store.dispatch("setKeepAlive",[e]),this.$router.push(t)}}},f={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",[t._m(0),t._v(" "),s("section",{staticClass:"content",staticStyle:{"margin-bottom":"0"}},[s("div",{staticClass:"userInfo"},[s("div",{staticClass:"fxcol"},[s("p",{staticClass:"p1"},[t._v(t._s(""!==t.$store.getters.userInfo?JSON.parse(t.$store.getters.userInfo).user_name:""))]),t._v(" "),s("p",{staticClass:"p2"},[t._v("欢迎进入晟华手持系统!")])]),t._v(" "),s("div",{staticClass:"exit",on:{click:t.Quit}},[s("i",{staticClass:"icon-exit"}),t._v(" "),s("span",{staticClass:"exit-text"},[t._v("退出")])])])]),t._v(" "),s("div",{staticClass:"con"},[s("ul",[s("li",{on:{click:function(e){t.goInner("/callmanage")}}},[t._v("呼叫管理")]),t._v(" "),s("li",{on:{click:function(e){t.goInner("/zlmanage")}}},[t._v("指令管理")]),t._v(" "),s("li",{on:{click:function(e){t.goInner("/taskmanage")}}},[t._v("任务管理")])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("header",[e("span",{staticClass:"fxcol"},[this._v("首页")])])}]};var v=s("VU/8")(l,f,!1,function(t){s("djX5")},"data-v-113cd606",null);e.default=v.exports},"c/Tr":function(t,e,s){t.exports={default:s("5zde"),__esModule:!0}},djX5:function(t,e){},fBQ2:function(t,e,s){"use strict";var n=s("evD5"),r=s("X8DO");t.exports=function(t,e,s){e in t?n.f(t,e,r(0,s)):t[e]=s}},qyJz:function(t,e,s){"use strict";var n=s("+ZMJ"),r=s("kM2E"),a=s("sB3e"),i=s("msXi"),o=s("Mhyx"),c=s("QRG4"),u=s("fBQ2"),l=s("3fs2");r(r.S+r.F*!s("dY0y")(function(t){Array.from(t)}),"Array",{from:function(t){var e,s,r,f,v=a(t),d="function"==typeof this?this:Array,h=arguments.length,p=h>1?arguments[1]:void 0,_=void 0!==p,g=0,m=l(v);if(_&&(p=n(p,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&o(m))for(s=new d(e=c(v.length));e>g;g++)u(s,g,_?p(v[g],g):v[g]);else for(f=m.call(v),s=new d;!(r=f.next()).done;g++)u(s,g,_?i(f,p,[r.value,g],!0):r.value);return s.length=g,s}})}});
|
||||||
|
//# sourceMappingURL=2.c6bd5a548d16a02c6a57.js.map
|
||||||
1
dist/static/js/2.c6bd5a548d16a02c6a57.js.map
vendored
Normal file
1
dist/static/js/2.c6bd5a548d16a02c6a57.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/3.6feecf8fb27229691e6a.js
vendored
Normal file
2
dist/static/js/3.6feecf8fb27229691e6a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/3.6feecf8fb27229691e6a.js.map
vendored
Normal file
1
dist/static/js/3.6feecf8fb27229691e6a.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/4.1a05ec528439494ece29.js
vendored
Normal file
2
dist/static/js/4.1a05ec528439494ece29.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webpackJsonp([4],{AQMZ:function(t,e){},B8a8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=n("Xxa5"),a=n.n(s),i=n("exGp"),r=n.n(i),c=n("g2+m"),d=n("LIob"),o={name:"ZlManage",components:{NavBar:c.a},data:function(){return{keyword:"",startPoint:"",endPoint:"",btnred:!1,disabled:!1,dataList:[],pkId:""}},mounted:function(){this.queryInstraction(this.keyword,this.startPoint,this.endPoint)},methods:{queryInstraction:function(){var t=this;return r()(a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d.b)(t.keyword,t.startPoint,t.endPoint);case 3:"1"===(n=e.sent).code?t.dataList=n.result:t.Dialog(n.desc),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t.Dialog(e.t0);case 10:case"end":return e.stop()}},e,t,[[0,7]])}))()},instOperation:function(t){var e=this;return r()(a.a.mark(function n(){var s;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(d.a)(e.pkId,t);case 3:"1"===(s=n.sent).code?(e.toast("操作成功"),e.disabled=!1,e.pkId="",e.btnred=!1,e.dataList=[],e.queryInstraction()):(e.Dialog(s.desc),e.disabled=!1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}},n,e,[[0,7]])}))()},toSure:function(t){this.pkId&&(this.disabled=!0,this.instOperation(t))},toCheck:function(t){this.pkId=this.pkId===t.inst_uuid?"":t.inst_uuid,this.pkId?this.btnred=!0:this.btnred=!1}}},u={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("nav-bar",{attrs:{title:"指令管理"}}),t._v(" "),n("section",{staticClass:"content grid-wraper"},[n("div",{staticClass:"left_fixed"},[n("table",{staticClass:"layout-t left_layout_t"},[t._m(0),t._v(" "),t._l(t.dataList,function(e,s){return n("tr",{key:s,class:{checked:e.inst_uuid===t.pkId},on:{click:function(n){t.toCheck(e)}}},[n("td",[t._v(t._s(e.task_no))])])})],2)]),t._v(" "),n("div",{staticClass:"slide"},[n("table",{staticClass:"layout-t"},[t._m(1),t._v(" "),t._l(t.dataList,function(e,s){return n("tr",{key:s,class:{checked:e.inst_uuid===t.pkId},on:{click:function(n){t.toCheck(e)}}},[n("td",[t._v(t._s(e.inst_no))]),t._v(" "),n("td",[t._v(t._s(e.start_devicecode))]),t._v(" "),n("td",[t._v(t._s(e.next_devicecode))]),t._v(" "),n("td",[t._v(t._s(e.inst_status_name))]),t._v(" "),n("td",[t._v(t._s(e.vehicle_code))]),t._v(" "),n("td",[t._v(t._s(e.carno))]),t._v(" "),n("td",[t._v(t._s(e.material_type_name))]),t._v(" "),n("td",[t._v(t._s(e.priority))]),t._v(" "),n("td",[t._v(t._s(e.create_time))])])})],2)])]),t._v(" "),n("section",{staticClass:"submit-bar"},[n("button",{staticClass:"btn btn-disabled submit-button",class:{bgred:t.btnred},attrs:{disabled:t.disabled},on:{click:function(e){t.toSure("1")}}},[t._v("指令撤销")]),t._v(" "),n("button",{staticClass:"btn btn-disabled submit-button",class:{bgred:t.btnred},attrs:{disabled:t.disabled},on:{click:function(e){t.toSure("2")}}},[t._v("重新下发")]),t._v(" "),n("button",{staticClass:"btn btn-disabled submit-button",class:{bgred:t.btnred},attrs:{disabled:t.disabled},on:{click:function(e){t.toSure("3")}}},[t._v("强制完成")])])],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",[e("th",[this._v("任务号")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",[n("th",[t._v("指令号")]),t._v(" "),n("th",[t._v("起点")]),t._v(" "),n("th",[t._v("终点")]),t._v(" "),n("th",[t._v("状态")]),t._v(" "),n("th",[t._v("托盘号")]),t._v(" "),n("th",[t._v("agv车号")]),t._v(" "),n("th",[t._v("物料类型")]),t._v(" "),n("th",[t._v("优先级")]),t._v(" "),n("th",[t._v("时间")])])}]};var _=n("VU/8")(o,u,!1,function(t){n("AQMZ")},"data-v-89640e5c",null);e.default=_.exports},LIob:function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"a",function(){return i}),n.d(e,"c",function(){return r}),n.d(e,"d",function(){return c});var s=n("FT/c"),a=function(t,e,n){return Object(s.a)("api/hand/insts",{keyword:t,start_devicecode:e,next_devicecode:n})},i=function(t,e){return Object(s.a)("api/hand/inst",{inst_uuid:t,type:e})},r=function(t,e,n){return Object(s.a)("api/hand/tasks",{keyword:t,start_devicecode:e,next_devicecode:n})},c=function(t,e){return Object(s.a)("api/hand/taskoperation",{inst_uuid:t,type:e})}}});
|
||||||
|
//# sourceMappingURL=4.1a05ec528439494ece29.js.map
|
||||||
1
dist/static/js/4.1a05ec528439494ece29.js.map
vendored
Normal file
1
dist/static/js/4.1a05ec528439494ece29.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/5.8cc26d78d218acc78b93.js
vendored
Normal file
2
dist/static/js/5.8cc26d78d218acc78b93.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webpackJsonp([5],{"1rzF":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("Xxa5"),s=n.n(a),i=n("exGp"),r=n.n(i),c=n("g2+m"),d=n("LIob"),o={name:"TaskManage",components:{NavBar:c.a},data:function(){return{keyword:"",startPoint:"",endPoint:"",btnred:!1,disabled:!1,dataList:[],pkId:""}},mounted:function(){this.queryTask(this.keyword,this.startPoint,this.endPoint)},methods:{queryTask:function(){var t=this;return r()(s.a.mark(function e(){var n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d.c)(t.keyword,t.startPoint,t.endPoint);case 3:"1"===(n=e.sent).code?t.dataList=n.result:t.Dialog(n.desc),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t.Dialog(e.t0);case 10:case"end":return e.stop()}},e,t,[[0,7]])}))()},taskOperation:function(t){var e=this;return r()(s.a.mark(function n(){var a;return s.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(d.d)(e.pkId,t);case 3:"1"===(a=n.sent).code?(e.toast("操作成功"),e.disabled=!1,e.pkId="",e.btnred=!1,e.dataList=[],e.queryTask()):(e.Dialog(a.desc),e.disabled=!1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}},n,e,[[0,7]])}))()},toSure:function(t){this.pkId&&(this.disabled=!0,this.taskOperation(t))},toCheck:function(t){this.pkId=this.pkId===t.task_uuid?"":t.task_uuid,this.pkId?this.btnred=!0:this.btnred=!1}}},u={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("nav-bar",{attrs:{title:"任务管理"}}),t._v(" "),n("section",{staticClass:"content grid-wraper"},[n("div",{staticClass:"left_fixed"},[n("table",{staticClass:"layout-t left_layout_t"},[t._m(0),t._v(" "),t._l(t.dataList,function(e,a){return n("tr",{key:a,class:{checked:e.task_uuid===t.pkId},on:{click:function(n){t.toCheck(e)}}},[n("td",[t._v(t._s(e.task_no))])])})],2)]),t._v(" "),n("div",{staticClass:"slide"},[n("table",{staticClass:"layout-t"},[t._m(1),t._v(" "),t._l(t.dataList,function(e,a){return n("tr",{key:a,class:{checked:e.task_uuid===t.pkId},on:{click:function(n){t.toCheck(e)}}},[n("td",[t._v(t._s(e.start_devicecode))]),t._v(" "),n("td",[t._v(t._s(e.next_devicecode))]),t._v(" "),n("td",[t._v(t._s(e.task_status_name))]),t._v(" "),n("td",[t._v(t._s(e.vehicle_code))]),t._v(" "),n("td",[t._v(t._s(e.material_type_name))]),t._v(" "),n("td",[t._v(t._s(e.priority))]),t._v(" "),n("td",[t._v(t._s(e.create_time))])])})],2)])]),t._v(" "),n("section",{staticClass:"submit-bar"},[n("button",{staticClass:"btn btn-disabled submit-button",class:{bgred:t.btnred},attrs:{disabled:t.disabled},on:{click:function(e){t.toSure("1")}}},[t._v("重新生成")]),t._v(" "),n("button",{staticClass:"btn btn-disabled submit-button",class:{bgred:t.btnred},attrs:{disabled:t.disabled},on:{click:function(e){t.toSure("2")}}},[t._v("强制完成")])])],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",[e("th",[this._v("任务号")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",[n("th",[t._v("起点")]),t._v(" "),n("th",[t._v("终点")]),t._v(" "),n("th",[t._v("状态")]),t._v(" "),n("th",[t._v("托盘号")]),t._v(" "),n("th",[t._v("物料类型")]),t._v(" "),n("th",[t._v("优先级")]),t._v(" "),n("th",[t._v("时间")])])}]};var _=n("VU/8")(o,u,!1,function(t){n("9HY+")},"data-v-1e7d824a",null);e.default=_.exports},"9HY+":function(t,e){},LIob:function(t,e,n){"use strict";n.d(e,"b",function(){return s}),n.d(e,"a",function(){return i}),n.d(e,"c",function(){return r}),n.d(e,"d",function(){return c});var a=n("FT/c"),s=function(t,e,n){return Object(a.a)("api/hand/insts",{keyword:t,start_devicecode:e,next_devicecode:n})},i=function(t,e){return Object(a.a)("api/hand/inst",{inst_uuid:t,type:e})},r=function(t,e,n){return Object(a.a)("api/hand/tasks",{keyword:t,start_devicecode:e,next_devicecode:n})},c=function(t,e){return Object(a.a)("api/hand/taskoperation",{inst_uuid:t,type:e})}}});
|
||||||
|
//# sourceMappingURL=5.8cc26d78d218acc78b93.js.map
|
||||||
1
dist/static/js/5.8cc26d78d218acc78b93.js.map
vendored
Normal file
1
dist/static/js/5.8cc26d78d218acc78b93.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/6.b532cc0a402d61a4ad3d.js
vendored
Normal file
2
dist/static/js/6.b532cc0a402d61a4ad3d.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webpackJsonp([6],{QDAA:function(e,s){},vdVF:function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=t("Xxa5"),o=t.n(a),n=t("mvHQ"),i=t.n(n),r=t("woOf"),c=t.n(r),l=t("exGp"),d=t.n(l),p=t("4ijW"),m=t("NHnr"),u={name:"Login",data:function(){return{loginname:"",password:"",type:"password",memberName:!1,disabled:!1}},created:function(){""!==this.$store.getters.userInfo&&(this.loginname=JSON.parse(this.$store.getters.userInfo).loginname,this.memberName=""!==this.loginname)},mounted:function(){document.getElementsByTagName("body")[0].className="login-bg"},methods:{changeType:function(){this.type="password"===this.type?"text":"password"},Remember:function(){this.memberName=!this.memberName},loginApi:function(){var e=this;return d()(o.a.mark(function s(){var t,a;return o.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,Object(p.c)(e.loginname,Object(m.encrypt)(e.password));case 3:"1"===(t=s.sent).code?(a={},a=e.memberName?c()({},t.result,{loginname:e.loginname}):c()({},t.result,{loginname:""}),e.$store.dispatch("setUserInfo",i()(a)),e.$router.push("/home")):e.toast(t.desc),e.disabled=!1,s.next=11;break;case 8:s.prev=8,s.t0=s.catch(0),e.disabled=!1;case 11:case"end":return s.stop()}},s,e,[[0,8]])}))()},_Login:function(){return this.disabled=!0,""===this.loginname?(this.toast("用户名不能为空"),void(this.disabled=!1)):""===this.password?(this.toast("密码不能为空"),void(this.disabled=!1)):(this.logintype="01",void this.loginApi())}}},v={render:function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("section",[t("section",{staticClass:"content"},[t("p",{staticClass:"p1"},[e._v("欢迎来到")]),e._v(" "),t("p",{staticClass:"p2"},[e._v("立讯手持系统!")]),e._v(" "),t("div",{staticClass:"input-box"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.loginname,expression:"loginname"}],staticClass:"allwidth",attrs:{type:"text",placeholder:"请输入用户名"},domProps:{value:e.loginname},on:{input:function(s){s.target.composing||(e.loginname=s.target.value)}}})]),e._v(" "),t("div",{staticClass:"fxrow input-box"},["checkbox"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"fxcol",attrs:{placeholder:"请输入密码",type:"checkbox"},domProps:{checked:Array.isArray(e.password)?e._i(e.password,null)>-1:e.password},on:{change:function(s){var t=e.password,a=s.target,o=!!a.checked;if(Array.isArray(t)){var n=e._i(t,null);a.checked?n<0&&(e.password=t.concat([null])):n>-1&&(e.password=t.slice(0,n).concat(t.slice(n+1)))}else e.password=o}}}):"radio"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"fxcol",attrs:{placeholder:"请输入密码",type:"radio"},domProps:{checked:e._q(e.password,null)},on:{change:function(s){e.password=null}}}):t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"fxcol",attrs:{placeholder:"请输入密码",type:e.type},domProps:{value:e.password},on:{input:function(s){s.target.composing||(e.password=s.target.value)}}}),e._v(" "),t("i",{staticClass:"icon-eye",class:"password"===e.type?"icon-eye-close":"icon-eye-open",on:{click:e.changeType}})]),e._v(" "),t("div",{staticClass:"fxrow check-box"},[t("i",{staticClass:"icon-name-check",class:{"icon-name-checked":e.memberName},on:{click:e.Remember}}),e._v(" "),t("span",{staticClass:"fxcol"},[e._v("记住用户名")]),e._v(" "),t("router-link",{staticClass:"fxcol",staticStyle:{"text-align":"right",color:"#6798ef"},attrs:{to:{path:"/setup"}}},[e._v("设置")])],1),e._v(" "),t("button",{staticClass:"login-btn",attrs:{disabled:e.disabled},on:{click:e._Login}},[e._v("确认登录")])])])},staticRenderFns:[]};var h=t("VU/8")(u,v,!1,function(e){t("QDAA")},"data-v-78eaeccc",null);s.default=h.exports}});
|
||||||
|
//# sourceMappingURL=6.b532cc0a402d61a4ad3d.js.map
|
||||||
1
dist/static/js/6.b532cc0a402d61a4ad3d.js.map
vendored
Normal file
1
dist/static/js/6.b532cc0a402d61a4ad3d.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/7.99db30d8ef6f7ce4c098.js
vendored
Normal file
2
dist/static/js/7.99db30d8ef6f7ce4c098.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webpackJsonp([7],{Y9Dn:function(t,s){},iL8N:function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[t._m(0),t._v(" "),e("section",{staticClass:"content"},[e("ul",{staticClass:"pwd-manage-content"},[e("li",[e("span",[t._v("acs地址:")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.acsip,expression:"acsip",modifiers:{trim:!0}}],attrs:{type:"text"},domProps:{value:t.acsip},on:{input:function(s){s.target.composing||(t.acsip=s.target.value.trim())},blur:function(s){t.$forceUpdate()}}})])])]),t._v(" "),e("section",{staticClass:"submit-bar"},[e("button",{staticClass:"btn submit-button",on:{click:t._submit}},[t._v("确认")])])])},staticRenderFns:[function(){var t=this.$createElement,s=this._self._c||t;return s("header",[s("span",{staticClass:"fxcol"},[this._v("设置")])])}]};var a=e("VU/8")({name:"Setup",data:function(){return{addrip:this.$store.getters.baseUrl,acsip:this.$store.getters.acsip,printip:this.$store.getters.printUrl,setTime:this.$store.getters.setTime}},methods:{_submit:function(){""!==this.acsip?(this.$store.dispatch("setAcsIp",this.acsip),this.$router.push("/login")):this.toast("请填写acs地址")}}},i,!1,function(t){e("Y9Dn")},"data-v-37671e02",null);s.default=a.exports}});
|
||||||
|
//# sourceMappingURL=7.99db30d8ef6f7ce4c098.js.map
|
||||||
1
dist/static/js/7.99db30d8ef6f7ce4c098.js.map
vendored
Normal file
1
dist/static/js/7.99db30d8ef6f7ce4c098.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
49
dist/static/js/app.522a115ee52bf347942f.js
vendored
Normal file
49
dist/static/js/app.522a115ee52bf347942f.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/app.522a115ee52bf347942f.js.map
vendored
Normal file
1
dist/static/js/app.522a115ee52bf347942f.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/manifest.5f51929fc72978eab5e9.js
vendored
Normal file
2
dist/static/js/manifest.5f51929fc72978eab5e9.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,d=0,s=[];d<r.length;d++)u=r[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)f=o(o.s=a[d]);return f};var r={},t={9:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"c6ecf374a3ed74bd7cba",1:"a1577c7b9ecac816ac33",2:"c6bd5a548d16a02c6a57",3:"6feecf8fb27229691e6a",4:"1a05ec528439494ece29",5:"8cc26d78d218acc78b93",6:"b532cc0a402d61a4ad3d",7:"99db30d8ef6f7ce4c098"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
|
||||||
|
//# sourceMappingURL=manifest.5f51929fc72978eab5e9.js.map
|
||||||
1
dist/static/js/manifest.5f51929fc72978eab5e9.js.map
vendored
Normal file
1
dist/static/js/manifest.5f51929fc72978eab5e9.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -14,6 +14,6 @@ public class Device extends DeviceManageDto {
|
|||||||
private DeviceDriverDefination deviceDriverDefination;
|
private DeviceDriverDefination deviceDriverDefination;
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "";
|
return this.getDevice_code();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
package org.nl.pad.azd.rest;
|
package org.nl.hand.alx.rest;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -8,8 +8,9 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.annotation.Log;
|
import org.nl.annotation.Log;
|
||||||
import org.nl.annotation.rest.AnonymousPostMapping;
|
import org.nl.annotation.rest.AnonymousPostMapping;
|
||||||
|
import org.nl.hand.ajp.service.JPHandService;
|
||||||
|
import org.nl.hand.alx.service.LXHandService;
|
||||||
import org.nl.modules.system.service.UserService;
|
import org.nl.modules.system.service.UserService;
|
||||||
import org.nl.pad.azd.service.PadService;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
@@ -21,37 +22,18 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qxuan
|
* @author zhoujj
|
||||||
* @date 2021-07-21
|
* @date 2023-05-04
|
||||||
**/
|
**/
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Api(tags = "平板接口")
|
@Api(tags = "手持接口")
|
||||||
@RequestMapping("/api/hand")
|
@RequestMapping("/api/hand")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class PadController {
|
public class LXHandController {
|
||||||
private final PasswordEncoder passwordEncoder;
|
private final PasswordEncoder passwordEncoder;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final PadService HandService;
|
private final LXHandService HandService;
|
||||||
|
|
||||||
@PostMapping("/area")
|
|
||||||
@Log("查询区域")
|
|
||||||
@ApiOperation("查询区域")
|
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
|
||||||
public ResponseEntity<Object> query() {
|
|
||||||
return new ResponseEntity<>(HandService.queryArea(null), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/point")
|
|
||||||
@Log("根据区域查点位")
|
|
||||||
@ApiOperation("根据区域查点位")
|
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
|
||||||
//@RequestBody JSONObject json
|
|
||||||
public ResponseEntity<Object> queryPointByArea(@RequestBody Map whereJson) {
|
|
||||||
String dict_id = (String) whereJson.get("region");
|
|
||||||
return new ResponseEntity<>(HandService.queryPointByArea(dict_id), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/tasks")
|
@PostMapping("/tasks")
|
||||||
@Log("查询任务")
|
@Log("查询任务")
|
||||||
@ApiOperation("查询任务")
|
@ApiOperation("查询任务")
|
||||||
@@ -61,6 +43,24 @@ public class PadController {
|
|||||||
return new ResponseEntity<>(HandService.queryTask(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.queryTask(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryArea")
|
||||||
|
@Log("查询区域")
|
||||||
|
@ApiOperation("查询区域")
|
||||||
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
|
public ResponseEntity<Object> query() {
|
||||||
|
return new ResponseEntity<>(HandService.queryArea(null), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryPointByArea")
|
||||||
|
@Log("查询设备编号及状态")
|
||||||
|
@ApiOperation("查询设备编号及状态")
|
||||||
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
|
//@RequestBody JSONObject json
|
||||||
|
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
|
||||||
|
String areaCode = (String) whereJson.get("areaCode");
|
||||||
|
return new ResponseEntity<>(HandService.queryPointByArea(areaCode), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/insts")
|
@PostMapping("/insts")
|
||||||
@Log("查询指令")
|
@Log("查询指令")
|
||||||
@ApiOperation("查询指令")
|
@ApiOperation("查询指令")
|
||||||
@@ -69,8 +69,16 @@ public class PadController {
|
|||||||
|
|
||||||
return new ResponseEntity<>(HandService.queryInst(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.queryInst(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/queryDevice")
|
||||||
|
@Log("查询设备扩展属性")
|
||||||
|
@ApiOperation("查询设备扩展属性")
|
||||||
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
|
//@RequestBody JSONObject json
|
||||||
|
public ResponseEntity<Object> queryDeviceAugmentabilityByCode(@RequestBody Map<String, String> whereJson) {
|
||||||
|
return new ResponseEntity<>(HandService.queryDevice(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@AnonymousPostMapping("/task")
|
@AnonymousPostMapping("/callTask")
|
||||||
@Log("创建任务")
|
@Log("创建任务")
|
||||||
@ApiOperation("创建任务")
|
@ApiOperation("创建任务")
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
@@ -90,20 +98,10 @@ public class PadController {
|
|||||||
@Log("任务操作")
|
@Log("任务操作")
|
||||||
@ApiOperation("任务操作")
|
@ApiOperation("任务操作")
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
public ResponseEntity<Object> Taskoperation(@RequestBody Map<String, String> whereJson) {
|
public ResponseEntity<Object> Taskoperation(@RequestBody Map<String, String> whereJson) throws Exception {
|
||||||
return new ResponseEntity<>(HandService.Taskoperation(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.Taskoperation(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/login")
|
||||||
@PostMapping("/deviceStatus")
|
|
||||||
@Log("修改设备状态")
|
|
||||||
@ApiOperation("修改设备状态")
|
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
|
||||||
public ResponseEntity<Object> updateDeviceStatus(@RequestBody Map<String, String> whereJson) {
|
|
||||||
|
|
||||||
return new ResponseEntity<>(HandService.updateDeviceStatus(whereJson), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/handlogin")
|
|
||||||
@Log("手持登陆验证")
|
@Log("手持登陆验证")
|
||||||
@ApiOperation("手持登陆验证")
|
@ApiOperation("手持登陆验证")
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
@@ -112,20 +110,4 @@ public class PadController {
|
|||||||
return new ResponseEntity<>(HandService.handleLogin(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.handleLogin(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/matrial")
|
|
||||||
@Log("查询物料信息")
|
|
||||||
@ApiOperation("查询物料信息")
|
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
|
||||||
public ResponseEntity<Object> queryMaterial() {
|
|
||||||
return new ResponseEntity<>(HandService.queryMaterial(), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/queryRouteLine")
|
|
||||||
@Log("查询路由路线信息")
|
|
||||||
@ApiOperation("查询路由路线信息")
|
|
||||||
//@PreAuthorize("@el.check('sect:list')")
|
|
||||||
public ResponseEntity<Object> queryRouteLine(@RequestBody Map<String, String> whereJson) {
|
|
||||||
return new ResponseEntity<>(HandService.queryRouteLine(whereJson), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,13 @@
|
|||||||
|
package org.nl.hand.alx.service;
|
||||||
package org.nl.pad.azd.service;
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qxuan
|
* @author zhoujj
|
||||||
* @description 服务接口
|
* @description 服务接口
|
||||||
* @date 2021-07-21
|
* @date 2023-05-04
|
||||||
**/
|
**/
|
||||||
public interface PadService {
|
public interface LXHandService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询区域
|
* 查询区域
|
||||||
*
|
*
|
||||||
@@ -20,13 +17,27 @@ public interface PadService {
|
|||||||
Map<String, Object> queryArea(Map whereJson);
|
Map<String, Object> queryArea(Map whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据区域查点位
|
* 查询设备编号及状态
|
||||||
*
|
*
|
||||||
* @param dict_id 条件
|
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
Map<String, Object> queryPointByArea(String dict_id);
|
Map<String, Object> queryPointByArea(String dict_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备扩展性
|
||||||
|
*
|
||||||
|
* @param deviceCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> queryDevice(Map deviceCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询任务状态
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> queryTaskType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询指令
|
* 查询指令
|
||||||
*
|
*
|
||||||
@@ -36,7 +47,7 @@ public interface PadService {
|
|||||||
Map<String, Object> queryInst(Map<String, String> jsonObject);
|
Map<String, Object> queryInst(Map<String, String> jsonObject);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询任务
|
* 创建任务
|
||||||
*
|
*
|
||||||
* @param jsonObject 条件
|
* @param jsonObject 条件
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
@@ -51,13 +62,7 @@ public interface PadService {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> queryTask(Map<String, String> jsonObject);
|
Map<String, Object> queryTask(Map<String, String> jsonObject);
|
||||||
|
|
||||||
/**
|
|
||||||
* 指令操作
|
|
||||||
*
|
|
||||||
* @param jsonObject 条件
|
|
||||||
* @return Map<String, Object>
|
|
||||||
*/
|
|
||||||
Map<String, Object> updateDeviceStatus(Map<String, String> jsonObject);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手持登陆
|
* 手持登陆
|
||||||
@@ -68,7 +73,7 @@ public interface PadService {
|
|||||||
Map<String, Object> handleLogin(Map<String, String> jsonObject);
|
Map<String, Object> handleLogin(Map<String, String> jsonObject);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手持登陆
|
* 指令操作
|
||||||
*
|
*
|
||||||
* @param jsonObject 条件
|
* @param jsonObject 条件
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
@@ -76,25 +81,12 @@ public interface PadService {
|
|||||||
Map<String, Object> Instoperation(Map<String, String> jsonObject);
|
Map<String, Object> Instoperation(Map<String, String> jsonObject);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手持登陆
|
* 任务操作
|
||||||
*
|
*
|
||||||
* @param jsonObject 条件
|
* @param jsonObject 条件
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
Map<String, Object> Taskoperation(Map<String, String> jsonObject);
|
Map<String, Object> Taskoperation(Map<String, String> jsonObject) throws Exception;
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询物料
|
|
||||||
*
|
|
||||||
* @return Map<String, Object>
|
|
||||||
*/
|
|
||||||
Map<String, Object> queryMaterial();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询路由路线
|
|
||||||
*
|
|
||||||
* @return Map<String, Object>
|
|
||||||
*/
|
|
||||||
Map<String, Object> queryRouteLine(Map<String, String> jsonObject);
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.pad.azd.service.dto;
|
package org.nl.hand.alx.service.dao;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ import java.math.BigDecimal;
|
|||||||
* @date 2021-07-21
|
* @date 2021-07-21
|
||||||
**/
|
**/
|
||||||
@Data
|
@Data
|
||||||
public class PadDto implements Serializable {
|
public class HandDto implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库区标识
|
* 库区标识
|
||||||
@@ -0,0 +1,518 @@
|
|||||||
|
package org.nl.hand.alx.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.nl.acs.agv.server.AgvService;
|
||||||
|
import org.nl.acs.agv.server.impl.AgvServiceImpl;
|
||||||
|
import org.nl.acs.device.service.DeviceService;
|
||||||
|
import org.nl.acs.device.service.dto.DeviceDto;
|
||||||
|
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||||
|
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.standard_storage.StandardStorageDeviceDriver;
|
||||||
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
|
import org.nl.acs.instruction.service.dto.InstructionDto;
|
||||||
|
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
||||||
|
import org.nl.acs.opc.Device;
|
||||||
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
|
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||||
|
import org.nl.acs.route.service.RouteLineService;
|
||||||
|
import org.nl.acs.task.service.TaskService;
|
||||||
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
|
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
||||||
|
import org.nl.config.RsaProperties;
|
||||||
|
import org.nl.exception.BadRequestException;
|
||||||
|
import org.nl.hand.alx.service.LXHandService;
|
||||||
|
import org.nl.hand.amb.service.MbHandService;
|
||||||
|
import org.nl.modules.system.service.UserService;
|
||||||
|
import org.nl.modules.system.service.dto.UserDto;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.utils.RsaUtils;
|
||||||
|
import org.nl.utils.SpringContextHolder;
|
||||||
|
import org.nl.wql.WQL;
|
||||||
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qxuan
|
||||||
|
* @description 服务实现
|
||||||
|
* @date 2021-07-21
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class LXHandServicelmpl implements LXHandService{
|
||||||
|
private final UserService userService;
|
||||||
|
private final PasswordEncoder passwordEncoder;
|
||||||
|
private final DeviceService deviceService;
|
||||||
|
private final DeviceAppService deviceAppService;
|
||||||
|
InstructionService instructionService = null;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryArea(Map whereJson) {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("QLX_QUERY001").addParam("flag", "1").process().getResultJSONArray(0);
|
||||||
|
jo.put("code", "1");
|
||||||
|
jo.put("desc", "查询成功");
|
||||||
|
jo.put("result", resultJSONArray);
|
||||||
|
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryPointByArea(String dict_id) {
|
||||||
|
JSONArray resultArr = new JSONArray();
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
|
||||||
|
//根据value值去查所有的设备
|
||||||
|
JSONArray acs_deviceja = WQLObject.getWQLObject("ACS_DEVICE").query("region='" + dict_id + "' and device_type='conveyor' and is_config='true' ", "seq_num,device_name").getResultJSONArray(0);
|
||||||
|
for (int i = 0; i < acs_deviceja.size(); i++) {
|
||||||
|
JSONObject devicejo = acs_deviceja.getJSONObject(i);
|
||||||
|
String device_code = devicejo.optString("device_code");
|
||||||
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||||
|
Device device = appService.findDeviceByCode(device_code);
|
||||||
|
//无光电普通站点
|
||||||
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||||
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
|
||||||
|
jo.put("device_id", devicejo.optString("device_id"));
|
||||||
|
jo.put("device_code", devicejo.optString("device_code"));
|
||||||
|
jo.put("device_name", devicejo.optString("device_name"));
|
||||||
|
jo.put("allow_update", "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resultArr.add(jo);
|
||||||
|
}
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
resultJson.put("result", resultArr);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryDevice(Map whereMap) {
|
||||||
|
String deviceCode = whereMap.get("device_code").toString();
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
JSONObject acs_device = WQLObject.getWQLObject("ACS_DEVICE").query("device_code = '" + deviceCode + "'").pageResult();
|
||||||
|
JSONObject acsDevice = (JSONObject) acs_device.getJSONArray("content").get(0);
|
||||||
|
//判断设备类型是不是storage
|
||||||
|
if (!"storage".equals(acsDevice.optString("device_type"))) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "该设备不是货架");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
JSONObject jsonObject = deviceService.queryStorageExtra(deviceCode);
|
||||||
|
jo.put("device_id", acsDevice.optString("device_id"));
|
||||||
|
jo.put("device_code", deviceCode);
|
||||||
|
jo.put("device_name", acsDevice.optString("device_name"));
|
||||||
|
jo.put("device_type", acsDevice.optString("device_type"));
|
||||||
|
jo.put("maxY", jsonObject.optString("maxY"));
|
||||||
|
jo.put("minY", jsonObject.optString("minY"));
|
||||||
|
jo.put("maxZ", jsonObject.optString("maxZ"));
|
||||||
|
jo.put("minZ", jsonObject.optString("minZ"));
|
||||||
|
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
resultJson.put("result", jo);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryTaskType() {
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
JSONObject jo = WQLObject.getWQLObject("sys_dict_detail").query("name = 'task_type'").pageResult();
|
||||||
|
JSONArray arr = new JSONArray();
|
||||||
|
JSONArray content = jo.getJSONArray("content");
|
||||||
|
for (int i = 0; i < content.size(); i++) {
|
||||||
|
JSONObject jsonObject = (JSONObject) content.get(i);
|
||||||
|
JSONObject jsonObject1 = new JSONObject();
|
||||||
|
jsonObject1.put("value", jsonObject.optString("value"));
|
||||||
|
jsonObject1.put("label", jsonObject.optString("label"));
|
||||||
|
arr.add(jsonObject1);
|
||||||
|
}
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
resultJson.put("result", arr);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryInst(Map<String, String> jsonObject) {
|
||||||
|
//查询位完成的指令
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
|
||||||
|
String key = jsonObject.get("keyword");
|
||||||
|
String start_point = jsonObject.get("start_devicecode");
|
||||||
|
String next_point = jsonObject.get("next_devicecode");
|
||||||
|
map.put("flag", "4");
|
||||||
|
if (StrUtil.isNotEmpty(key)) {
|
||||||
|
map.put("key", "%" + key + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(start_point)) {
|
||||||
|
map.put("start_point", "%" + start_point + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(next_point)) {
|
||||||
|
map.put("next_point", "%" + next_point + "%");
|
||||||
|
}
|
||||||
|
map.put("task_code", "%-%");
|
||||||
|
JSONArray resultArr = WQL.getWO("QLX_QUERY001").addParamMap(map).addParamMap((HashMap) jsonObject).process().getResultJSONArray(0);
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
resultJson.put("result", resultArr);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> createTask(Map<String, String> jsonObject) {
|
||||||
|
String start_devicecode = jsonObject.get("start_device_codes");
|
||||||
|
String next_devicecode = jsonObject.get("next_device_code");
|
||||||
|
String material_type = jsonObject.get("material_type");
|
||||||
|
String task_type = jsonObject.get("task_type");
|
||||||
|
String priority = jsonObject.get("priority");
|
||||||
|
String carrier = jsonObject.get("carrier");
|
||||||
|
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||||
|
Device startDevice = appService.findDeviceByCode(start_devicecode);
|
||||||
|
Device nextDevice = appService.findDeviceByCode(next_devicecode);
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(start_devicecode)) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "起点不能为空");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(next_devicecode)) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "终点不能为空");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断起点有货,终点为空
|
||||||
|
if (ObjectUtil.isEmpty(startDevice.getMaterial_type()) || Integer.parseInt(startDevice.getMaterial_type()) == 0) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "起点必须有货");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
if (!ObjectUtil.isEmpty(nextDevice.getMaterial_type()) && !StrUtil.equals(nextDevice.getMaterial_type(), "0")) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "终点必须为空");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
if(Boolean.parseBoolean(startDevice.getIslock()) || Boolean.parseBoolean(nextDevice.getIslock())){
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "起点或终点设备已被锁定");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(priority)) {
|
||||||
|
priority = "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (start_devicecode.equals(next_devicecode)) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "起点和终点不能是同一设备【" + next_devicecode + "】");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
||||||
|
TaskDto dto = new TaskDto();
|
||||||
|
dto.setIs_active("1");
|
||||||
|
dto.setIs_delete("0");
|
||||||
|
dto.setMaterial(material_type);
|
||||||
|
dto.setStart_point_code(start_devicecode);
|
||||||
|
dto.setNext_point_code(next_devicecode);
|
||||||
|
dto.setMaterial(material_type);
|
||||||
|
dto.setTask_type(task_type);
|
||||||
|
dto.setPriority(priority);
|
||||||
|
dto.setVehicle_code(carrier);
|
||||||
|
try {
|
||||||
|
taskService.create(dto);
|
||||||
|
// startDevice.setIslock("true");
|
||||||
|
// nextDevice.setIslock("true");
|
||||||
|
} catch (Exception e) {
|
||||||
|
resultJson.put("code", "2");
|
||||||
|
resultJson.put("desc", e.getMessage());
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "生成成功!");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryTask(Map<String, String> jsonObject) {
|
||||||
|
String key = jsonObject.get("keyword");
|
||||||
|
String start_point = jsonObject.get("start_devicecode");
|
||||||
|
String next_point = jsonObject.get("next_devicecode");
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "2");
|
||||||
|
if (StrUtil.isNotEmpty(key)) {
|
||||||
|
map.put("key", "%" + key + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(start_point)) {
|
||||||
|
map.put("start_point", "%" + start_point + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(next_point)) {
|
||||||
|
map.put("next_point", "%" + next_point + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
map.put("task_code", "%-%");
|
||||||
|
|
||||||
|
//查询有任务 但是没有指令的任务
|
||||||
|
JSONArray result = WQL.getWO("QLX_QUERY001").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
resultJson.put("result", result);
|
||||||
|
return resultJson;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> handleLogin(Map<String, String> jsonObject) {
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
String user = jsonObject.get("username");
|
||||||
|
String password = jsonObject.get("password");
|
||||||
|
if (StrUtil.isEmpty("user")) {
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "用户不能为空");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty("password")) {
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "密码不能为空!");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
boolean is_match = false;
|
||||||
|
Long account_id = 0L;
|
||||||
|
try {
|
||||||
|
String pwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, password);
|
||||||
|
UserDto userDto = userService.findByName(user);
|
||||||
|
account_id = userDto.getId();
|
||||||
|
is_match = passwordEncoder.matches(pwd, userDto.getPassword());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_match) {
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "登陆成功");
|
||||||
|
} else {
|
||||||
|
resultJson.put("code", "2");
|
||||||
|
resultJson.put("desc", "登陆失败!");
|
||||||
|
}
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("user_name", user);
|
||||||
|
jo.put("account_id", account_id);
|
||||||
|
resultJson.put("result", jo);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> Instoperation(Map<String, String> jsonObject) {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
String type = jsonObject.get("type");
|
||||||
|
String inst_uuid = jsonObject.get("inst_uuid");
|
||||||
|
JSONObject instwo = WQLObject.getWQLObject("acs_instruction").query("instruction_id='" + inst_uuid + "'").uniqueResult(0);
|
||||||
|
if (instwo == null) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "未找到该指令!");
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
if (StrUtil.equals(instwo.getString("instruction_status"), "2") ||
|
||||||
|
StrUtil.equals(instwo.getString("instruction_status"), "3")) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "指令已完成或已取消,无法操作");
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
String task_id = instwo.optString("task_id");
|
||||||
|
Instruction instdto = (Instruction) JSONObject.toBean(instwo, Instruction.class);
|
||||||
|
AgvService agvService = SpringContextHolder.getBean(AgvServiceImpl.class);
|
||||||
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
||||||
|
|
||||||
|
/* 1 指令撤销
|
||||||
|
2 重新下发
|
||||||
|
3 强制完成*/
|
||||||
|
if (type.equals("1")) {
|
||||||
|
//调用agv删除任务的接口
|
||||||
|
|
||||||
|
try {
|
||||||
|
//agvService.deleteAgvInst(instwo.getString("instruction_code"));
|
||||||
|
if (StrUtil.isEmpty(instdto.getAgv_jobno())) {
|
||||||
|
instructionService.cancelNOSendAgv(inst_uuid);
|
||||||
|
} else {
|
||||||
|
agvService.deleteAgvInstToNDC(instdto);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "下发agv失败");
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (type.equals("2")) {
|
||||||
|
try {
|
||||||
|
agvService.sendAgvInstToNDC(instdto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "下发agv失败");
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type.equals("3")) {
|
||||||
|
//完成指令
|
||||||
|
try {
|
||||||
|
instructionService.finish(inst_uuid);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", e.getMessage());
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jo.put("code", "1");
|
||||||
|
jo.put("desc", "操作成功");
|
||||||
|
jo.put("result", new JSONObject());
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> Taskoperation(Map<String, String> jsonObject) throws Exception {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
String task_uuid = jsonObject.get("inst_uuid");
|
||||||
|
String type = jsonObject.get("type");
|
||||||
|
JSONObject taskjo = WQLObject.getWQLObject("acs_task").query("task_id='" + task_uuid + "'").uniqueResult(0);
|
||||||
|
String task_code = taskjo.optString("task_code");
|
||||||
|
String start_point_code = taskjo.optString("start_point_code");
|
||||||
|
String next_point_code = taskjo.optString("next_point_code");
|
||||||
|
String task_id = taskjo.optString("task_id");
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(task_uuid)) {
|
||||||
|
throw new BadRequestException("id不能为空!");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(type)) {
|
||||||
|
throw new BadRequestException("操作类型不能为空!");
|
||||||
|
}
|
||||||
|
if (StrUtil.equals(taskjo.getString("task_status"), "2") ||
|
||||||
|
StrUtil.equals(taskjo.getString("task_status"), "3")) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "任务已完成或已取消,无法操作");
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
//重新生成
|
||||||
|
if (type.equals("1")) {
|
||||||
|
//重新生产指令
|
||||||
|
Instruction instdto = new Instruction();
|
||||||
|
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||||
|
instdto.setInstruction_code(CodeUtil.getNewCode("INSTRUCT_NO"));
|
||||||
|
instdto.setRemark(taskjo.optString("remark"));
|
||||||
|
instdto.setMaterial(taskjo.optString("taskjo"));
|
||||||
|
instdto.setTask_id(taskjo.optString("task_id"));
|
||||||
|
instdto.setTask_code(taskjo.optString("task_code"));
|
||||||
|
instdto.setVehicle_code(taskjo.optString("vehicle_code"));
|
||||||
|
String now = DateUtil.now();
|
||||||
|
instdto.setCreate_time(now);
|
||||||
|
instdto.setCreate_by("auto");
|
||||||
|
instdto.setStart_point_code(taskjo.optString("start_point_code"));
|
||||||
|
instdto.setNext_point_code(taskjo.optString("next_point_code"));
|
||||||
|
instdto.setStart_device_code(taskjo.optString("start_device_code"));
|
||||||
|
instdto.setNext_device_code(taskjo.optString("next_device_code"));
|
||||||
|
instdto.setInstruction_status("0");
|
||||||
|
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||||
|
WQLObject instwo = WQLObject.getWQLObject("acs_instruction");
|
||||||
|
JSONObject instcheckjson = instwo.query(" instruction_status <2 and next_point_code= '" + next_point_code + "'" + " and start_point_code = '" + start_point_code + "'" + " and task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
if (instcheckjson != null) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", "操作失败");
|
||||||
|
jo.put("result", task_code + ":该任务已存在待完成指令!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
instructionService.create(instdto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
jo.put("code", "2");
|
||||||
|
jo.put("desc", e.getMessage());
|
||||||
|
jo.put("result", "");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
instdto.setExecute_device_code(taskjo.optString("start_point_code"));
|
||||||
|
//下发指令给agv
|
||||||
|
// AgvService agvserver = SpringContextHolder.getBean("agvServiceImpl");
|
||||||
|
// try {
|
||||||
|
// agvserver.sendAgvInstToMagic(instdto);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// jo.put("code", "2");
|
||||||
|
// jo.put("desc", e.getMessage());
|
||||||
|
// jo.put("result", "");
|
||||||
|
// return jo;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
//强制完成
|
||||||
|
if (type.equals("2")) {
|
||||||
|
//手工完成
|
||||||
|
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
||||||
|
TaskDto acsTask = (TaskDto) JSONObject.toBean(taskjo, TaskDto.class);
|
||||||
|
InstructionService instructionservice = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
||||||
|
InstructionDto instdto = instructionservice.findByTaskid(acsTask.getTask_id(), "instruction_status <2 ");
|
||||||
|
if (instdto != null){
|
||||||
|
jo.put("code", "0");
|
||||||
|
jo.put("desc", "有指令未完成!");
|
||||||
|
jo.put("result", new JSONObject());
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
taskService.finish(acsTask.getTask_id());
|
||||||
|
Device startDevice = deviceAppService.findDeviceByCode(acsTask.getStart_device_code());
|
||||||
|
Device nextDevice = deviceAppService.findDeviceByCode(acsTask.getNext_device_code());
|
||||||
|
startDevice.setIslock("false");
|
||||||
|
nextDevice.setIslock("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
jo.put("code", "1");
|
||||||
|
jo.put("desc", "操作成功");
|
||||||
|
jo.put("result", new JSONObject());
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,12 +16,10 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.key TYPEAS s_string
|
输入.key TYPEAS s_string
|
||||||
输入.keyword TYPEAS s_string
|
输入.keyword TYPEAS s_string
|
||||||
输入.start_devicecode TYPEAS s_string
|
输入.start_point TYPEAS s_string
|
||||||
输入.next_devicecode TYPEAS s_string
|
输入.next_point TYPEAS s_string
|
||||||
输入.detail_id TYPEAS s_string
|
输入.detail_id TYPEAS s_string
|
||||||
输入.start_point TYPEAS s_string
|
输入.task_code TYPEAS s_string
|
||||||
输入.next_point TYPEAS s_string
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -59,7 +57,7 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "2"
|
IF 输入.flag = "2"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
@@ -68,32 +66,35 @@
|
|||||||
task.start_point_code AS start_devicecode,
|
task.start_point_code AS start_devicecode,
|
||||||
task.next_point_code AS next_devicecode,
|
task.next_point_code AS next_devicecode,
|
||||||
task.task_type AS task_type,
|
task.task_type AS task_type,
|
||||||
sys2.VALUE AS material_type_name,
|
task.material AS material_type,
|
||||||
sys2.label AS material_type,
|
sys2.label AS material_type_name,
|
||||||
sys.VALUE AS task_status_name,
|
task.task_status AS task_status,
|
||||||
sys.label AS task_status,
|
sys.label AS task_status_name,
|
||||||
task.vehicle_code AS carrier,
|
task.vehicle_code AS carrier,
|
||||||
task.create_time,
|
task.create_time,
|
||||||
task.priority
|
task.priority
|
||||||
FROM
|
FROM
|
||||||
acs_task task
|
acs_task task
|
||||||
LEFT JOIN sys_dict_detail sys ON sys.label = task.task_status
|
INNER JOIN sys_dict_detail AS sys ON sys.VALUE = task.task_status
|
||||||
AND sys.NAME = 'task_status'
|
AND sys.NAME = 'task_status'
|
||||||
LEFT JOIN sys_dict_detail sys2 ON sys2.VALUE = task.material
|
LEFT JOIN sys_dict_detail AS sys2 ON sys2.VALUE = task.material
|
||||||
AND sys2.NAME = 'material_type'
|
AND sys2.NAME = 'material_type'
|
||||||
where
|
where
|
||||||
( task.task_status ='1' or task.task_status ='0' )
|
( task.task_status ='1' or task.task_status ='0' )
|
||||||
and
|
and
|
||||||
( task.task_id IN (select inst.task_id FROM acs_instruction inst where inst.is_delete<>1 and (instruction_status<>'1' and instruction_status <>'2' and instruction_status <>'0')) or task.task_id not in (select inst.task_id FROM acs_instruction inst where inst.is_delete<>1
|
( task.task_id IN (select inst.task_id FROM acs_instruction inst where inst.is_delete<>1 and (instruction_status<>'1' and instruction_status <>'2' and instruction_status <>'0')) or task.task_id not in (select inst.task_id FROM acs_instruction inst where inst.is_delete<>1
|
||||||
))
|
))
|
||||||
OPTION 输入.key <> ""
|
OPTION 输入.key <> ""
|
||||||
(task.task_code like 输入.key or task.task_status like 输入.key)
|
task.task_code like 输入.key
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.start_point <> ""
|
OPTION 输入.start_point <> ""
|
||||||
task.start_point_code = 输入.start_point
|
task.start_point_code like 输入.start_point
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.next_point <> ""
|
OPTION 输入.next_point <> ""
|
||||||
task.next_point_code = 输入.next_point
|
task.next_point_code like 输入.next_point
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.task_code <> ""
|
||||||
|
task.task_code like 输入.task_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ORDER BY task.create_time
|
ORDER BY task.create_time
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
@@ -117,60 +118,70 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "4"
|
IF 输入.flag = "4"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
inst.instruction_id AS inst_uuid,
|
inst.instruction_id AS inst_uuid,
|
||||||
inst.task_code AS task_no,
|
inst.task_code AS task_no,
|
||||||
inst.instruction_code AS inst_no,
|
inst.instruction_code AS inst_no,
|
||||||
inst.start_point_code AS start_devicecode,
|
inst.start_point_code AS start_devicecode,
|
||||||
inst.next_point_code AS next_devicecode,
|
inst.next_point_code AS next_devicecode,
|
||||||
inst.instruction_status AS inst_status,
|
inst.instruction_status AS inst_status,
|
||||||
dtl.VALUE AS inst_status_name,
|
dtl.label AS inst_status_name,
|
||||||
inst.execute_message AS inst_step,
|
inst.execute_message AS inst_step,
|
||||||
inst.vehicle_code AS carrier,
|
inst.vehicle_code AS carrier,
|
||||||
inst.carno,
|
inst.carno,
|
||||||
inst.priority,
|
inst.priority,
|
||||||
inst.create_time,
|
inst.send_status,
|
||||||
inst.material AS material_type,
|
inst.create_time,
|
||||||
dtl2.VALUE AS material_type_name
|
inst.material AS material_type,
|
||||||
FROM
|
dtl2.label AS material_type_name,
|
||||||
acs_instruction inst
|
dtl3.label AS send_status_name
|
||||||
LEFT JOIN sys_dict_detail AS dtl ON dtl.label = inst.instruction_status
|
FROM
|
||||||
AND dtl.NAME = 'task_status'
|
acs_instruction inst
|
||||||
LEFT JOIN sys_dict_detail AS dtl2 ON dtl2.label = inst.material
|
INNER JOIN sys_dict_detail AS dtl ON dtl.
|
||||||
AND dtl2.NAME = 'material_type'
|
VALUE
|
||||||
WHERE
|
= inst.instruction_status
|
||||||
inst.is_delete = '0'
|
AND dtl.NAME = 'inst_status'
|
||||||
AND (inst.instruction_status ='1'
|
LEFT JOIN sys_dict_detail dtl2 ON dtl2.
|
||||||
OR inst.instruction_status ='0')
|
VALUE
|
||||||
OPTION 输入.keyword <> ""
|
= inst.material
|
||||||
(inst.instruction_code like 输入.keyword
|
AND dtl2.NAME = 'material_type'
|
||||||
or
|
LEFT JOIN sys_dict_detail dtl3 ON dtl3.
|
||||||
inst.task_code like 输入.keyword
|
VALUE
|
||||||
or inst.execute_device_code like 输入.keyword)
|
= inst.send_status
|
||||||
ENDOPTION
|
AND dtl3.NAME = 'send_status'
|
||||||
OPTION 输入.start_devicecode <> ""
|
WHERE
|
||||||
inst.start_point_code = 输入.start_devicecode
|
inst.is_delete = '0'
|
||||||
ENDOPTION
|
AND inst.instruction_status <> '2'
|
||||||
OPTION 输入.next_devicecode <> ""
|
OPTION 输入.key <> ""
|
||||||
inst.next_point_code = 输入.next_devicecode
|
inst.instruction_code like 输入.key
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ORDER BY inst.create_time desc
|
OPTION 输入.start_point <> ""
|
||||||
ENDSELECT
|
inst.start_point_code like 输入.start_point
|
||||||
ENDQUERY
|
ENDOPTION
|
||||||
ENDIF
|
OPTION 输入.next_point <> ""
|
||||||
|
inst.next_point_code like 输入.next_point
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.task_code <> ""
|
||||||
|
inst.task_code like 输入.task_code
|
||||||
|
ENDOPTION
|
||||||
|
ORDER BY
|
||||||
|
inst.create_time DESC
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "5"
|
IF 输入.flag = "5"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
detl.label AS label,
|
detl.label AS label,
|
||||||
detl.
|
detl.VALUE AS value
|
||||||
VALUE
|
|
||||||
AS value
|
|
||||||
FROM
|
FROM
|
||||||
sys_dict_detail detl
|
sys_dict_detail detl
|
||||||
WHERE
|
WHERE
|
||||||
detl.name = 'material_type'
|
detl.name = 'material_type'
|
||||||
|
order by
|
||||||
|
dict_sort
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -1,646 +0,0 @@
|
|||||||
|
|
||||||
package org.nl.pad.azd.service.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.SneakyThrows;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import org.nl.acs.agv.server.AgvService;
|
|
||||||
import org.nl.acs.agv.server.impl.AgvServiceImpl;
|
|
||||||
import org.nl.acs.config.AcsConfig;
|
|
||||||
import org.nl.acs.config.server.AcsConfigService;
|
|
||||||
import org.nl.acs.config.server.impl.AcsConfigServiceImpl;
|
|
||||||
import org.nl.acs.device.service.DeviceService;
|
|
||||||
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
|
||||||
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
|
||||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
|
||||||
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
|
|
||||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
|
||||||
import org.nl.acs.instruction.service.dto.Instruction;
|
|
||||||
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
|
||||||
import org.nl.acs.opc.Device;
|
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
|
||||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
|
||||||
import org.nl.acs.route.service.RouteLineService;
|
|
||||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
|
||||||
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
|
||||||
import org.nl.acs.task.service.TaskService;
|
|
||||||
import org.nl.acs.task.service.dto.TaskDto;
|
|
||||||
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
|
||||||
import org.nl.config.RsaProperties;
|
|
||||||
import org.nl.exception.BadRequestException;
|
|
||||||
import org.nl.modules.system.service.UserService;
|
|
||||||
import org.nl.modules.system.service.dto.UserDto;
|
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
|
||||||
import org.nl.pad.azd.service.PadService;
|
|
||||||
import org.nl.utils.RsaUtils;
|
|
||||||
import org.nl.utils.SpringContextHolder;
|
|
||||||
import org.nl.wql.WQL;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author qxuan
|
|
||||||
* @description 服务实现
|
|
||||||
* @date 2021-07-21
|
|
||||||
**/
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Slf4j
|
|
||||||
public class PadServiceImpl implements PadService {
|
|
||||||
private final UserService userService;
|
|
||||||
private final PasswordEncoder passwordEncoder;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryArea(Map whereJson) {
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
JSONArray resultJSONArray = WQL.getWO("QHAND_QUERY").addParam("flag", "1").process().getResultJSONArray(0);
|
|
||||||
jo.put("code", "1");
|
|
||||||
jo.put("desc", "查询成功");
|
|
||||||
jo.put("result", resultJSONArray);
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryPointByArea(String dict_id) {
|
|
||||||
JSONArray resultArr = new JSONArray();
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
|
|
||||||
if (StrUtil.isEmpty(dict_id)) {
|
|
||||||
throw new BadRequestException("区域id不能为空!");
|
|
||||||
}
|
|
||||||
String value = "";
|
|
||||||
String move = "";
|
|
||||||
String status = "";
|
|
||||||
String input_material = "0";
|
|
||||||
String allow_update = "";
|
|
||||||
String material = "";
|
|
||||||
//再字典中查询出value
|
|
||||||
//JSONObject valuejo = WQLObject.getWQLObject("sys_dict_detail").query("detail_id='" + dict_id + "'").uniqueResult(0);
|
|
||||||
JSONObject valuejo = WQL.getWO("QHAND_QUERY").addParam("flag", "3").addParam("detail_id", dict_id).process().uniqueResult(0);
|
|
||||||
if (!ObjectUtil.isEmpty(valuejo)) {
|
|
||||||
value = valuejo.optString("value");
|
|
||||||
}
|
|
||||||
//根据value值去查所有的设备
|
|
||||||
JSONArray acs_deviceja = WQLObject.getWQLObject("ACS_DEVICE").query("region='" + value + "' and device_type='conveyor'", "seq_num,device_name").getResultJSONArray(0);
|
|
||||||
for (int i = 0; i < acs_deviceja.size(); i++) {
|
|
||||||
JSONObject devicejo = acs_deviceja.getJSONObject(i);
|
|
||||||
String device_code = devicejo.optString("device_code");
|
|
||||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
|
||||||
Device device = appService.findDeviceByCode(device_code);
|
|
||||||
//无光电普通站点
|
|
||||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
|
||||||
//空盘站点
|
|
||||||
StandardEmptyPalletSiteDeviceDriver standardEmptyPalletSiteDeviceDriver;
|
|
||||||
//检测站点
|
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDevicedriver;
|
|
||||||
//区域管制站点(机械手)
|
|
||||||
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
|
|
||||||
//检测站点
|
|
||||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
|
||||||
standardInspectSiteDevicedriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
|
|
||||||
if (standardInspectSiteDevicedriver.getHasGoods() == 0) {
|
|
||||||
status = "0";
|
|
||||||
move = "无货";
|
|
||||||
} else if (standardInspectSiteDevicedriver.getHasGoods() == 1) {
|
|
||||||
status = "1";
|
|
||||||
move = "有托盘";
|
|
||||||
} else if (standardInspectSiteDevicedriver.getHasGoods() == 2) {
|
|
||||||
status = "2";
|
|
||||||
move = "有托盘有货";
|
|
||||||
}
|
|
||||||
material = standardInspectSiteDevicedriver.getMaterial();
|
|
||||||
if (StrUtil.isNullOrUndefined(material)) {
|
|
||||||
material = "";
|
|
||||||
}
|
|
||||||
jo.put("material_type", material);
|
|
||||||
jo.put("status_name", move);
|
|
||||||
jo.put("status", status);
|
|
||||||
jo.put("device_id", devicejo.optString("device_id"));
|
|
||||||
jo.put("device_code", devicejo.optString("device_code"));
|
|
||||||
jo.put("device_name", devicejo.optString("device_name"));
|
|
||||||
jo.put("allow_update", "0");
|
|
||||||
jo.put("input_material", input_material);
|
|
||||||
}
|
|
||||||
//区域管制站点(机械手)
|
|
||||||
else if (device.getDeviceDriver() instanceof StandardManipulatorInspectSiteDeviceDriver) {
|
|
||||||
standardManipulatorInspectSiteDeviceDriver = (StandardManipulatorInspectSiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
if (standardManipulatorInspectSiteDeviceDriver.getHasGoods() == 0) {
|
|
||||||
status = "0";
|
|
||||||
move = "无货";
|
|
||||||
} else if (standardManipulatorInspectSiteDeviceDriver.getHasGoods() == 1) {
|
|
||||||
status = "1";
|
|
||||||
move = "有托盘";
|
|
||||||
} else if (standardManipulatorInspectSiteDeviceDriver.getHasGoods() == 2) {
|
|
||||||
status = "2";
|
|
||||||
move = "有托盘有货";
|
|
||||||
}
|
|
||||||
jo.put("material_type", material);
|
|
||||||
jo.put("status_name", move);
|
|
||||||
jo.put("status", status);
|
|
||||||
jo.put("device_id", devicejo.optString("device_id"));
|
|
||||||
jo.put("device_code", devicejo.optString("device_code"));
|
|
||||||
jo.put("device_name", devicejo.optString("device_name"));
|
|
||||||
jo.put("allow_update", "0");
|
|
||||||
jo.put("input_material", input_material);
|
|
||||||
|
|
||||||
}
|
|
||||||
//空盘站点
|
|
||||||
else if (device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
|
|
||||||
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
|
|
||||||
if (standardEmptyPalletSiteDeviceDriver.getHasGoods() == 0) {
|
|
||||||
status = "0";
|
|
||||||
move = "无货";
|
|
||||||
} else if (standardEmptyPalletSiteDeviceDriver.getHasGoods() == 1) {
|
|
||||||
status = "1";
|
|
||||||
move = "有托盘";
|
|
||||||
} else if (standardEmptyPalletSiteDeviceDriver.getHasGoods() == 2) {
|
|
||||||
status = "2";
|
|
||||||
move = "有托盘有货";
|
|
||||||
}
|
|
||||||
jo.put("material_type", material);
|
|
||||||
jo.put("status_name", move);
|
|
||||||
jo.put("status", status);
|
|
||||||
jo.put("device_id", devicejo.optString("device_id"));
|
|
||||||
jo.put("device_code", devicejo.optString("device_code"));
|
|
||||||
jo.put("device_name", devicejo.optString("device_name"));
|
|
||||||
jo.put("allow_update", "0");
|
|
||||||
jo.put("input_material", input_material);
|
|
||||||
|
|
||||||
}
|
|
||||||
//普通站点
|
|
||||||
else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
if (standardOrdinarySiteDeviceDriver.getHasGoods() == 0) {
|
|
||||||
status = "0";
|
|
||||||
move = "无货";
|
|
||||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 1) {
|
|
||||||
status = "1";
|
|
||||||
move = "有托盘";
|
|
||||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
|
||||||
status = "2";
|
|
||||||
move = "有托盘有货";
|
|
||||||
}
|
|
||||||
material = standardOrdinarySiteDeviceDriver.getMaterial();
|
|
||||||
if (StrUtil.isNullOrUndefined(material)) {
|
|
||||||
material = "";
|
|
||||||
}
|
|
||||||
String input_materialflag = (String) device.getExtraValue().get("input_material");
|
|
||||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("false")) {
|
|
||||||
input_material = "0";
|
|
||||||
}
|
|
||||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("true")) {
|
|
||||||
input_material = "1";
|
|
||||||
}
|
|
||||||
jo.put("material_type", material);
|
|
||||||
jo.put("status_name", move);
|
|
||||||
jo.put("status", status);
|
|
||||||
jo.put("device_id", devicejo.optString("device_id"));
|
|
||||||
jo.put("device_code", devicejo.optString("device_code"));
|
|
||||||
jo.put("device_name", devicejo.optString("device_name"));
|
|
||||||
jo.put("allow_update", "1");
|
|
||||||
jo.put("input_material", input_material);
|
|
||||||
}
|
|
||||||
resultArr.add(jo);
|
|
||||||
}
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "查询成功");
|
|
||||||
resultJson.put("result", resultArr);
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryInst(Map<String, String> jsonObject) {
|
|
||||||
//查询位完成的指令
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
JSONArray resultArr = WQL.getWO("QHAND_QUERY").addParam("flag", "4").addParamMap((HashMap) jsonObject).process().getResultJSONArray(0);
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "查询成功");
|
|
||||||
resultJson.put("result", resultArr);
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> createTask(Map<String, String> jsonObject) {
|
|
||||||
String start_devicecode = jsonObject.get("start_devicecode");
|
|
||||||
String next_devicecode = jsonObject.get("next_devicecode");
|
|
||||||
String material_type = jsonObject.get("material_type");
|
|
||||||
String carrier = jsonObject.get("carrier");
|
|
||||||
String task_type = jsonObject.get("task_type");
|
|
||||||
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineServiceImpl.class);
|
|
||||||
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
if (StrUtil.isEmpty(start_devicecode)) {
|
|
||||||
throw new BadRequestException("起点不能为空!");
|
|
||||||
}
|
|
||||||
if (StrUtil.isEmpty(next_devicecode)) {
|
|
||||||
throw new BadRequestException("终点点不能为空!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (start_devicecode.equals(next_devicecode)) {
|
|
||||||
resultJson.put("code", "0");
|
|
||||||
resultJson.put("desc", "起点和终点不能是同一设备【" + next_devicecode + "】");
|
|
||||||
resultJson.put("result", "");
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
|
||||||
TaskDto dto = new TaskDto();
|
|
||||||
|
|
||||||
if (StrUtil.equals("2", task_type)) {
|
|
||||||
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(start_devicecode, next_devicecode, "normal");
|
|
||||||
String compound_task_data = shortPathsList.get(0).getPath();
|
|
||||||
dto.setCompound_task("1");
|
|
||||||
dto.setCompound_task_data(compound_task_data);
|
|
||||||
}
|
|
||||||
dto.setIs_active("1");
|
|
||||||
dto.setIs_delete("0");
|
|
||||||
dto.setTask_type(task_type);
|
|
||||||
dto.setMaterial(material_type);
|
|
||||||
dto.setStart_point_code(start_devicecode);
|
|
||||||
dto.setNext_point_code(next_devicecode);
|
|
||||||
dto.setVehicle_code(carrier);
|
|
||||||
try {
|
|
||||||
taskService.create(dto);
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
resultJson.put("code", "2");
|
|
||||||
resultJson.put("desc", e.getMessage());
|
|
||||||
resultJson.put("result", "");
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "生成成功!");
|
|
||||||
resultJson.put("result", "");
|
|
||||||
return resultJson;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryTask(Map<String, String> jsonObject) {
|
|
||||||
String key = jsonObject.get("keyword");
|
|
||||||
String start_point = jsonObject.get("start_devicecode");
|
|
||||||
String next_point = jsonObject.get("next_devicecode");
|
|
||||||
HashMap<String, String> map = new HashMap<>();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("key", key);
|
|
||||||
map.put("start_point", start_point);
|
|
||||||
map.put("next_point", next_point);
|
|
||||||
//查询有任务 但是没有指令的任务
|
|
||||||
JSONArray result = WQL.getWO("QHAND_QUERY").addParamMap(map).process().getResultJSONArray(0);
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "查询成功");
|
|
||||||
resultJson.put("result", result);
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> updateDeviceStatus(Map<String, String> jsonObject) {
|
|
||||||
//修改任务的状态
|
|
||||||
String device_code = jsonObject.get("device_code");
|
|
||||||
String type = jsonObject.get("type");
|
|
||||||
String status = jsonObject.get("status");
|
|
||||||
String material_type = jsonObject.get("material_type");
|
|
||||||
|
|
||||||
//粉桶号
|
|
||||||
String barrels_code = jsonObject.get("barrels_code");
|
|
||||||
//配合批号
|
|
||||||
String cooperate_code = jsonObject.get("cooperate_code");
|
|
||||||
//粉钟名称
|
|
||||||
String powder_name = jsonObject.get("powder_name");
|
|
||||||
//粉桶状态
|
|
||||||
String barrels_status = jsonObject.get("barrels_status");
|
|
||||||
|
|
||||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
|
||||||
|
|
||||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
|
||||||
Device device = appService.findDeviceByCode(device_code);
|
|
||||||
//无光电普通站点
|
|
||||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
|
||||||
//空盘站点
|
|
||||||
StandardEmptyPalletSiteDeviceDriver standardEmptyPalletSiteDeviceDriver;
|
|
||||||
//检测站点
|
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDevicedriver;
|
|
||||||
//区域管制站点(机械手)
|
|
||||||
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
|
|
||||||
//修改
|
|
||||||
if (type.equals("1")) {
|
|
||||||
//检测站点
|
|
||||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
|
||||||
standardInspectSiteDevicedriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
if (!StrUtil.isEmpty(material_type)) {
|
|
||||||
standardInspectSiteDevicedriver.setMaterial(material_type);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(barrels_code)) {
|
|
||||||
device.setBarrels_code(barrels_code);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(cooperate_code)) {
|
|
||||||
device.setCooperate_code(cooperate_code);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(powder_name)) {
|
|
||||||
device.setPowder_name(powder_name);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(barrels_status)) {
|
|
||||||
device.setBarrels_status(barrels_status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//普通站点
|
|
||||||
else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
standardOrdinarySiteDeviceDriver.setHasGoods(Integer.parseInt(status));
|
|
||||||
device.setHas_goods(Integer.parseInt(status));
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("device_code", device_code);
|
|
||||||
jo.put("hasGoodStatus", status);
|
|
||||||
deviceService.changeDeviceStatus(jo);
|
|
||||||
if (!StrUtil.isEmpty(material_type)) {
|
|
||||||
standardOrdinarySiteDeviceDriver.setMaterial(material_type);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(barrels_code)) {
|
|
||||||
device.setBarrels_code(barrels_code);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(cooperate_code)) {
|
|
||||||
device.setCooperate_code(cooperate_code);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(powder_name)) {
|
|
||||||
device.setPowder_name(powder_name);
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(barrels_status)) {
|
|
||||||
device.setBarrels_status(barrels_status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//清空
|
|
||||||
if (type.equals("2")) {
|
|
||||||
|
|
||||||
//检测站点
|
|
||||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
|
||||||
standardInspectSiteDevicedriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
standardInspectSiteDevicedriver.setMaterial("");
|
|
||||||
device.setBarrels_code("");
|
|
||||||
device.setCooperate_code("");
|
|
||||||
device.setPowder_name("");
|
|
||||||
device.setBarrels_status("");
|
|
||||||
}
|
|
||||||
//普通站点
|
|
||||||
else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
|
||||||
standardOrdinarySiteDeviceDriver.setHasGoods(0);
|
|
||||||
device.setHas_goods(0);
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("device_code", device_code);
|
|
||||||
jo.put("hasGoodStatus", "0");
|
|
||||||
deviceService.changeDeviceStatus(jo);
|
|
||||||
standardOrdinarySiteDeviceDriver.setMaterial("");
|
|
||||||
device.setBarrels_code("");
|
|
||||||
device.setCooperate_code("");
|
|
||||||
device.setPowder_name("");
|
|
||||||
device.setBarrels_status("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "更新成功");
|
|
||||||
resultJson.put("result", new JSONObject());
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SneakyThrows
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> handleLogin(Map<String, String> jsonObject) {
|
|
||||||
JSONObject resultJson = new JSONObject();
|
|
||||||
String user = jsonObject.get("user");
|
|
||||||
String password = jsonObject.get("password");
|
|
||||||
if (StrUtil.isEmpty("user")) {
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "用户不能为空");
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
if (StrUtil.isEmpty("password")) {
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "密码不能为空!");
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
boolean is_match = false;
|
|
||||||
Long account_id = 0L;
|
|
||||||
try {
|
|
||||||
String pwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, password);
|
|
||||||
UserDto userDto = userService.findByName(user);
|
|
||||||
account_id = userDto.getId();
|
|
||||||
is_match = passwordEncoder.matches(pwd, userDto.getPassword());
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_match) {
|
|
||||||
resultJson.put("code", "1");
|
|
||||||
resultJson.put("desc", "登陆成功");
|
|
||||||
} else {
|
|
||||||
resultJson.put("code", "2");
|
|
||||||
resultJson.put("desc", "登陆失败!");
|
|
||||||
}
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("user_name", user);
|
|
||||||
jo.put("account_id", account_id);
|
|
||||||
resultJson.put("result", jo);
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> Instoperation(Map<String, String> jsonObject) {
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
String type = jsonObject.get("type");
|
|
||||||
String inst_uuid = jsonObject.get("inst_uuid");
|
|
||||||
JSONObject instwo = WQLObject.getWQLObject("acs_instruction").query("instruction_id='" + inst_uuid + "'").uniqueResult(0);
|
|
||||||
if (instwo == null) {
|
|
||||||
throw new BadRequestException("未找到该指令!");
|
|
||||||
}
|
|
||||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
|
||||||
AgvService agvService = SpringContextHolder.getBean(AgvServiceImpl.class);
|
|
||||||
AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigServiceImpl.class);
|
|
||||||
|
|
||||||
String task_id = instwo.optString("task_id");
|
|
||||||
/* 1 指令撤销
|
|
||||||
2 重新下发
|
|
||||||
3 强制完成*/
|
|
||||||
if (type.equals("1")) {
|
|
||||||
//调用agv删除任务的接口
|
|
||||||
agvService = SpringContextHolder.getBean("agvServiceImpl");
|
|
||||||
try {
|
|
||||||
agvService.deleteAgvInst(instwo.getString("instruction_code"));
|
|
||||||
instructionService.cancel(inst_uuid);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
jo.put("code", "2");
|
|
||||||
jo.put("desc", e.getMessage());
|
|
||||||
jo.put("result", "");
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type.equals("2")) {
|
|
||||||
Instruction instdto = (Instruction) JSONObject.toBean(instwo, Instruction.class);
|
|
||||||
AgvService agvserver = SpringContextHolder.getBean("agvServiceImpl");
|
|
||||||
try {
|
|
||||||
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.FORKAGV).toString(), "1")) {
|
|
||||||
|
|
||||||
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "1")) {
|
|
||||||
agvService.sendAgvInstToMagic(instdto);
|
|
||||||
} else if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "2")) {
|
|
||||||
agvService.sendAgvInstToNDC(instdto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
jo.put("code", "2");
|
|
||||||
jo.put("desc", e.getMessage());
|
|
||||||
jo.put("result", "");
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (type.equals("3")) {
|
|
||||||
//完成指令
|
|
||||||
try {
|
|
||||||
instructionService.finish(inst_uuid);
|
|
||||||
} catch (Exception e) {
|
|
||||||
jo.put("code", "2");
|
|
||||||
jo.put("desc", e.getMessage());
|
|
||||||
jo.put("result", "");
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
jo.put("code", "1");
|
|
||||||
jo.put("desc", "操作成功");
|
|
||||||
jo.put("result", new JSONObject());
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> Taskoperation(Map<String, String> jsonObject) {
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
String task_uuid = jsonObject.get("inst_uuid");
|
|
||||||
String type = jsonObject.get("type");
|
|
||||||
JSONObject taskjo = WQLObject.getWQLObject("acs_task").query("task_id='" + task_uuid + "'").uniqueResult(0);
|
|
||||||
if (StrUtil.isEmpty(task_uuid)) {
|
|
||||||
throw new BadRequestException("id不能为空!");
|
|
||||||
}
|
|
||||||
if (StrUtil.isEmpty(type)) {
|
|
||||||
throw new BadRequestException("操作类型不能为空!");
|
|
||||||
}
|
|
||||||
//重新生成
|
|
||||||
if (type.equals("1")) {
|
|
||||||
//重新生产指令
|
|
||||||
Instruction instdto = new Instruction();
|
|
||||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
|
||||||
instdto.setInstruction_code(CodeUtil.getNewCode("INSTRUCT_NO"));
|
|
||||||
instdto.setRemark(taskjo.optString("remark"));
|
|
||||||
instdto.setMaterial(taskjo.optString("taskjo"));
|
|
||||||
instdto.setTask_id(taskjo.optString("task_id"));
|
|
||||||
instdto.setTask_code(taskjo.optString("task_code"));
|
|
||||||
instdto.setVehicle_code(taskjo.optString("vehicle_code"));
|
|
||||||
String now = DateUtil.now();
|
|
||||||
instdto.setCreate_time(now);
|
|
||||||
instdto.setCreate_by("auto");
|
|
||||||
instdto.setStart_point_code(taskjo.optString("start_point_code"));
|
|
||||||
instdto.setNext_point_code(taskjo.optString("next_point_code"));
|
|
||||||
instdto.setStart_device_code(taskjo.optString("start_device_code"));
|
|
||||||
instdto.setNext_device_code(taskjo.optString("next_device_code"));
|
|
||||||
instdto.setInstruction_status("0");
|
|
||||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
|
||||||
try {
|
|
||||||
instructionService.create(instdto);
|
|
||||||
TaskDto acsTask = (TaskDto) JSONObject.toBean(taskjo, TaskDto.class);
|
|
||||||
acsTask.setTask_status("1");
|
|
||||||
WQLObject taskwo = WQLObject.getWQLObject("acs_task");
|
|
||||||
JSONObject json = JSONObject.fromObject(acsTask);
|
|
||||||
taskwo.update(json);
|
|
||||||
} catch (Exception e) {
|
|
||||||
jo.put("code", "2");
|
|
||||||
jo.put("desc", e.getMessage());
|
|
||||||
jo.put("result", "");
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
instdto.setExecute_device_code(taskjo.optString("start_point_code"));
|
|
||||||
//下发指令给agv
|
|
||||||
// AgvService agvserver = SpringContextHolder.getBean("agvServiceImpl");
|
|
||||||
// try {
|
|
||||||
// agvserver.sendAgvInstToMagic(instdto);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// jo.put("code", "2");
|
|
||||||
// jo.put("desc", e.getMessage());
|
|
||||||
// jo.put("result", "");
|
|
||||||
// return jo;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
//强制完成
|
|
||||||
if (type.equals("2")) {
|
|
||||||
//手工完成
|
|
||||||
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
|
||||||
TaskDto acsTask = (TaskDto) JSONObject.toBean(taskjo, TaskDto.class);
|
|
||||||
taskService.finish(acsTask.getTask_id());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
jo.put("code", "1");
|
|
||||||
jo.put("desc", "操作成功");
|
|
||||||
jo.put("result", new JSONObject());
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryMaterial() {
|
|
||||||
JSONArray resultArr = WQL.getWO("QHAND_QUERY").addParam("flag", "5").process().getResultJSONArray(0);
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("code", "1");
|
|
||||||
jo.put("desc", "查询成功");
|
|
||||||
jo.put("result", resultArr);
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryRouteLine(Map<String, String> jsonObject) {
|
|
||||||
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineServiceImpl.class);
|
|
||||||
;
|
|
||||||
String start_devicecode = jsonObject.get("start_devicecode");
|
|
||||||
String next_devicecode = jsonObject.get("next_devicecode");
|
|
||||||
String route_line = jsonObject.get("route_line");
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(start_devicecode, next_devicecode, StrUtil.isEmpty(route_line) ? "normal" : route_line);
|
|
||||||
if (ObjectUtil.isEmpty(shortPathsList)) {
|
|
||||||
jo.put("code", "2");
|
|
||||||
jo.put("desc", "路由不通");
|
|
||||||
jo.put("result", "");
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
String path = shortPathsList.get(0).getPath();
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
result.put("path", path);
|
|
||||||
jo.put("code", "1");
|
|
||||||
jo.put("desc", "操作成功");
|
|
||||||
jo.put("result", result);
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -8,12 +8,12 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
#url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lxjm_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lxjm_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lxjm_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
#url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lxjm_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:P@ssw0rd}
|
# password: ${DB_PWD:P@ssw0rd}
|
||||||
password: ${DB_PWD:123456}
|
# password: ${DB_PWD:123456}
|
||||||
# password: ${DB_PWD:Root.123456}
|
password: ${DB_PWD:Root.123456}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||||
<property name="LOG_HOME" value="${logPath}"/>
|
<property name="LOG_HOME" value="${logPath}"/>
|
||||||
<!-- 按照每天生成日志文件 -->
|
<!-- 按照每天生成日志文件 -->
|
||||||
<appender name="FILE5" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILEAgvServiceImpl" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--日志文件输出的文件名-->
|
<!--日志文件输出的文件名-->
|
||||||
<FileNamePattern>${LOG_HOME}/反馈AGV请求/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/反馈AGV请求/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
|
|
||||||
<!-- 打印sql -->
|
<!-- 打印sql -->
|
||||||
<logger name="org.nl.acs.agv.server.impl.AgvServiceImpl" level="info" additivity="false">
|
<logger name="org.nl.acs.agv.server.impl.AgvServiceImpl" level="info" additivity="false">
|
||||||
<appender-ref ref="FILE5"/>
|
<appender-ref ref="FILEAgvServiceImpl"/>
|
||||||
</logger>
|
</logger>
|
||||||
</included>
|
</included>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||||
<property name="LOG_HOME" value="${logPath}"/>
|
<property name="LOG_HOME" value="${logPath}"/>
|
||||||
<!-- 按照每天生成日志文件 -->
|
<!-- 按照每天生成日志文件 -->
|
||||||
<appender name="FILE3" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILEAutoCreateInst" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--日志文件输出的文件名-->
|
<!--日志文件输出的文件名-->
|
||||||
<FileNamePattern>${LOG_HOME}/自动创建指令/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/自动创建指令/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
@@ -26,6 +26,6 @@
|
|||||||
|
|
||||||
<!-- 打印sql -->
|
<!-- 打印sql -->
|
||||||
<logger name="org.nl.modules.quartz.task.AutoCreateInst" level="info" additivity="false">
|
<logger name="org.nl.modules.quartz.task.AutoCreateInst" level="info" additivity="false">
|
||||||
<appender-ref ref="FILE3"/>
|
<appender-ref ref="FILEAutoCreateInst"/>
|
||||||
</logger>
|
</logger>
|
||||||
</included>
|
</included>
|
||||||
|
|||||||
@@ -80,27 +80,27 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
<logger name="jdbc.audit" level="ERROR" additivity="false">
|
<!-- <logger name="jdbc.audit" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="jdbc.resultset" level="ERROR" additivity="false">
|
<!-- <logger name="jdbc.resultset" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="springfox.documentation" level="ERROR" additivity="false">
|
<!-- <logger name="springfox.documentation" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="jdbc.resultsettable" level="ERROR" additivity="false">
|
<!-- <logger name="jdbc.resultsettable" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="jdbc.sqlonly" level="ERROR" additivity="false">
|
<!-- <logger name="jdbc.sqlonly" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="jdbc.sqltiming" level="ERROR" additivity="false">
|
<!-- <logger name="jdbc.sqltiming" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
<logger name="org.jinterop" level="ERROR" additivity="false">
|
<!-- <logger name="org.jinterop" level="ERROR" additivity="false">-->
|
||||||
<appender-ref ref="CONSOLE"/>
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
</logger>
|
<!-- </logger>-->
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
<!--测试环境:打印控制台-->
|
<!--测试环境:打印控制台-->
|
||||||
|
|||||||
@@ -173,6 +173,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -184,6 +185,7 @@ import crudOperation from '@crud/CRUD.operation'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import { getDicts } from '@/api/system/dict'
|
import { getDicts } from '@/api/system/dict'
|
||||||
import crudTask from '@/api/acs/task/task'
|
import crudTask from '@/api/acs/task/task'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
instruction_id: null,
|
instruction_id: null,
|
||||||
@@ -225,7 +227,7 @@ export default {
|
|||||||
dicts: ['task_status'],
|
dicts: ['task_status'],
|
||||||
name: 'Instruction',
|
name: 'Instruction',
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
components: { crudOperation, rrOperation },
|
components: { crudOperation, rrOperation,pagination },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
|
|||||||
Reference in New Issue
Block a user