| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Document</title> |
| | | <script src="../js/main.js"></script> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="app" > |
| | | <button @click="add">123</button> |
| | | </div> |
| | | </body> |
| | | |
| | | </html> |
| | | <script> |
| | | let app= new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | textColor:{ |
| | | color:'orange' |
| | | }, |
| | | picture:[{}], |
| | | tupian:['',''],orderData:'' |
| | | |
| | | }, |
| | | watch: { |
| | | errorFlag(){ |
| | | alert |
| | | } |
| | | }, |
| | | methods:{ |
| | | |
| | | }, |
| | | async mounted() { |
| | | let timer1=await setInterval(()=>{ |
| | | let arrObj={ |
| | | type:0, |
| | | stateData:'', |
| | | endeData:'' |
| | | } |
| | | sql="{call AXJ_a_largeScreen_batchOffData_select(?,?,?,?)}~"+JSON.stringify(arrObj) |
| | | this.interValLoadAjxs('ä¸ç订ååæ°',sql,2,"tableData",timer1) |
| | | },5000) |
| | | }, |
| | | methods: { |
| | | add(){ |
| | | this.global.errorFlag=1 |
| | | this.orderData=1 |
| | | //console.log(vue.); |
| | | } |
| | | |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <!-- import CSS --> |
| | | <script src="../js/main.js"></script> |
| | | <style > |
| | | .page-scroll { |
| | | height: 100%; |
| | | } |
| | | |
| | | .page-scroll .el-scrollbar__wrap { |
| | | overflow-x: hidden; |
| | | } |
| | | img{ |
| | | width: auto; |
| | | height: auto; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="app" > |
| | | |
| | | <el-container > |
| | | |
| | | |
| | | <el-upload |
| | | :limit="1" |
| | | :on-change="changeFile" |
| | | class="upload-demo" |
| | | ref="upload" |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :file-list="fileList" |
| | | :auto-upload="false"> |
| | | <el-button slot="trigger" size="small" type="primary" >éåæä»¶</el-button> |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ jpg/pngæä»¶ï¼ä¸ä¸è¶
è¿5m</div> |
| | | </el-upload> |
| | | |
| | | |
| | | </el-container> |
| | | <img :src="ruleForm.route" style="margin-right: 0;width: 1000px;height: 700px;background-color: aqua;" > |
| | | </div> |
| | | </body> |
| | | |
| | | <script > |
| | | //import * as echarts from '../js/echarts.min.js'; |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | var checkNum = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]{1,4}(\.[0-9]{0,2})?$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥0.01-9999.99çæ°å')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | var checkString = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | if (value.length>255) { |
| | | callback(new Error('æå¤§é¿åº¦255')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | }, 1000); |
| | | }; |
| | | var checkThickness = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©ºæè
0')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]*[1-9][0-9]*$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£æ´æ°çå度')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | return { |
| | | ruleForm: { |
| | | produceid:'', |
| | | width: '', |
| | | height: '', |
| | | thickness: '', |
| | | color:'', |
| | | optNum:'', |
| | | creator:'', |
| | | route:null |
| | | }, |
| | | rules: { |
| | | produceid: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | height: [ |
| | | { validator: checkNum, trigger: 'blur' } |
| | | ], |
| | | width: [ |
| | | { validator: checkNum, trigger: 'blur' } |
| | | ], |
| | | thickness: [ |
| | | { validator: checkThickness, trigger: 'blur' } |
| | | ], |
| | | color: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | optNum: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | route: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | |
| | | }, |
| | | tableHead:[], |
| | | produceData:[], |
| | | showFlag:true, |
| | | updateShowFlag:false, |
| | | updateGlass:{ |
| | | id:'' |
| | | }, |
| | | optList:[], |
| | | fileList:[], |
| | | selectGlass:["","","","","","","",""] |
| | | |
| | | |
| | | }; |
| | | |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | let sql="{call AXJ_a_produce_insert(?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(this.ruleForm); |
| | | this.connects("æ°å¢äº§å",sql,1,1); |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | showFlagFuc(){ |
| | | Object.keys(this.ruleForm).forEach((key) => (this.ruleForm[key] = '')); |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=false; |
| | | }, |
| | | updateRow(index,row){//ä¿®æ¹äº§åæ°æ®æ¾ç¤º |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=true; |
| | | let rowObj=row[index] |
| | | this.ruleForm.produceid=rowObj["1_recipe_no"] |
| | | this.ruleForm.width=rowObj["3_width"] |
| | | this.ruleForm.height=rowObj["4_height"] |
| | | this.ruleForm.thickness=rowObj["5_thickness"] |
| | | this.ruleForm.color=rowObj["6_color"] |
| | | this.ruleForm.optNum=rowObj["2_optfile_no"] |
| | | this.ruleForm.creator=rowObj["7_recipe_maker"] |
| | | this.ruleForm.route=rowObj["9_route"] |
| | | this.updateGlass.id=rowObj["0_id"] |
| | | }, |
| | | updateGlassSub(formName){ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | let updateGlassObj=this.ruleForm |
| | | updateGlassObj.id=this.updateGlass.id |
| | | let sql="{call AXJ_a_produce_update(?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(updateGlassObj); |
| | | this.connects("产åä¿®æ¹",sql,1,1); |
| | | }); |
| | | |
| | | }, |
| | | changeFile(file){//æ·»å æä»¶è§¦åçæbase64æä»¶ |
| | | const isJPG = file.raw.type === 'image/jpeg' || file.raw.type === 'image/png' ; |
| | | const isLt2M = file.size / 1024 / 1024 < 5; |
| | | |
| | | if (!isJPG) { |
| | | this.$message.error('ä¸ä¼ 头åå¾çåªè½æ¯ JPGæè
PNG æ ¼å¼!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | if (!isLt2M) { |
| | | this.$message.error('ä¸ä¼ 头åå¾ç大å°ä¸è½è¶
è¿ 5MB!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | let reader = new FileReader(); |
| | | reader.readAsDataURL(file.raw); |
| | | reader.onload = (e) => { |
| | | resolve(e.target.result); |
| | | console.log(e.target.result) |
| | | this.updateShowFlag=true |
| | | this.ruleForm.route=e.target.result; |
| | | }; |
| | | }); |
| | | }, |
| | | selectSub:function(){ |
| | | let arrObj={} |
| | | for(let i in this.selectGlass){ |
| | | arrObj[i]=this.selectGlass[i] |
| | | } |
| | | let sql="{call AXJ_a_produce_select(?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj); |
| | | loadAjxs('äº§åæ¥è¯¢',sql,2,"produceData"); |
| | | } |
| | | }, |
| | | computed:{ |
| | | |
| | | }, |
| | | mounted() { |
| | | // let sql="{call AXJ_a_produce_select_into()}"; |
| | | // let flag=2; |
| | | // loadAjxs('产ååå§æ¥è¯¢',sql,flag,"produceData"); |
| | | |
| | | // sql="{call AXJ_a_produceHeader_select()}"; |
| | | // loadAjxs('产å表头',sql,flag,"tableHead"); |
| | | |
| | | // sql="{call AXJ_a_optFile_select()}"; |
| | | // loadAjxs('产åoptç¼ç æ¥è¯¢',sql,flag,"optList"); |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 5%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 40px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 25%; |
| | | background-color: white; |
| | | display: flex; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 15%; |
| | | height: 100%; |
| | | } |
| | | #main2 { |
| | | width: 20%; |
| | | height: 100%; |
| | | } |
| | | #main4 { |
| | | width: 20%; |
| | | height: 100%; |
| | | } |
| | | #main3 { |
| | | width: 45%; |
| | | height: 100%; |
| | | display: flex; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 25px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 25px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | .boli { |
| | | opacity:0.5; |
| | | |
| | | } |
| | | #cangchu { |
| | | width: 75px; |
| | | height: 25px; |
| | | position: absolute; |
| | | top: 820px; |
| | | left: 1507px; |
| | | } |
| | | /* -45 |
| | | -50 |
| | | */ |
| | | #A4 { |
| | | width: 65px; |
| | | height: 55px; |
| | | position: Absolute; |
| | | top: 775px; |
| | | left: 1250px |
| | | } |
| | | #A7 { |
| | | width: 15px; |
| | | height: 45px; |
| | | position: Absolute; |
| | | top: 785px; |
| | | left: 1185px |
| | | } |
| | | #A9 { |
| | | width: 15px; |
| | | height: 45px; |
| | | position: Absolute; |
| | | top: 785px; |
| | | left: 1139px |
| | | } |
| | | #A10 { |
| | | width: 15px; |
| | | height: 45px; |
| | | position: Absolute; |
| | | top: 840px; |
| | | left: 1139px |
| | | } |
| | | #A11 { |
| | | width: 15px; |
| | | height: 45px; |
| | | position: Absolute; |
| | | top: 840px; |
| | | left: 1185px |
| | | } |
| | | #A14 { |
| | | width: 12px; |
| | | height: 12px; |
| | | position: Absolute; |
| | | top: 922px; |
| | | left: 1140px |
| | | } |
| | | #A15 { |
| | | width: 12px; |
| | | height: 12px; |
| | | position: Absolute; |
| | | top: 922px; |
| | | left: 1183px |
| | | } |
| | | #A16 { |
| | | width: 12px; |
| | | height: 12px; |
| | | position: Absolute; |
| | | top: 951px; |
| | | left: 1183px |
| | | } |
| | | #A17 { |
| | | width: 12px; |
| | | height: 12px; |
| | | position: Absolute; |
| | | top: 951px; |
| | | left: 1163px |
| | | } |
| | | #A18 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 951px; |
| | | left: 1140px |
| | | } |
| | | #A20 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 951px; |
| | | left: 1122px |
| | | } |
| | | #A21 { |
| | | width: 45px; |
| | | height: 65px; |
| | | |
| | | position: Absolute; |
| | | top: 918px; |
| | | left: 1075px; |
| | | |
| | | } |
| | | #A22 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 953px; |
| | | left: 1061px; |
| | | } |
| | | #A23 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 953px; |
| | | left: 1047px; |
| | | } |
| | | #A24 { |
| | | width: 45px; |
| | | height: 65px; |
| | | |
| | | position: Absolute; |
| | | top: 918px; |
| | | left: 1000px; |
| | | } |
| | | #A25 { |
| | | width: 35px; |
| | | height: 50px; |
| | | |
| | | position: Absolute; |
| | | top: 932px; |
| | | left: 945px; |
| | | } |
| | | #A26 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 953px; |
| | | left: 926px; |
| | | } |
| | | #A28 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 953px; |
| | | left: 912px; |
| | | } |
| | | #A29 { |
| | | width: 25px; |
| | | height: 25px; |
| | | |
| | | position: Absolute; |
| | | top: 949px; |
| | | left: 885px; |
| | | } |
| | | #A30 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 871px; |
| | | } |
| | | |
| | | |
| | | #A31 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 851px; |
| | | } |
| | | #A32 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 832px; |
| | | } |
| | | #A33 { |
| | | width: 22px; |
| | | height: 52px; |
| | | |
| | | position: Absolute; |
| | | top: 923px; |
| | | left: 804px; |
| | | } |
| | | #A34 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 956px; |
| | | left: 775px; |
| | | } |
| | | #A35 { |
| | | width: 57px; |
| | | height: 55px; |
| | | |
| | | position: Absolute; |
| | | top: 920px; |
| | | left: 705px; |
| | | } |
| | | #A37 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 956px; |
| | | left: 680px; |
| | | } |
| | | #A38 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 956px; |
| | | left: 642px; |
| | | } |
| | | #A39 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 956px; |
| | | left: 606px; |
| | | } |
| | | #A40 { |
| | | width: 37px; |
| | | height: 44px; |
| | | |
| | | position: Absolute; |
| | | top: 931px; |
| | | left: 556px; |
| | | } |
| | | #A41 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 538px; |
| | | } |
| | | #A42 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 517px; |
| | | } |
| | | #B31 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 884px; |
| | | left: 850px; |
| | | } |
| | | #B32 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 884px; |
| | | left: 832px; |
| | | } |
| | | #B33 { |
| | | width: 22px; |
| | | height: 52px; |
| | | |
| | | position: Absolute; |
| | | top: 853px; |
| | | left: 804px; |
| | | } |
| | | #B34 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 886px; |
| | | left: 775px; |
| | | } |
| | | #B35 { |
| | | width: 57px; |
| | | height: 55px; |
| | | |
| | | position: Absolute; |
| | | top: 850px; |
| | | left: 705px; |
| | | } |
| | | #B37 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 886px; |
| | | left: 680px; |
| | | } |
| | | #B38 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 886px; |
| | | left: 642px; |
| | | } |
| | | #B39 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 886px; |
| | | left: 606px; |
| | | } |
| | | #B40 { |
| | | width: 37px; |
| | | height: 44px; |
| | | |
| | | position: Absolute; |
| | | top: 861px; |
| | | left: 556px; |
| | | } |
| | | #B41 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 884px; |
| | | left: 538px; |
| | | } |
| | | #B42 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 884px; |
| | | left: 517px; |
| | | } |
| | | #C31 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 814px; |
| | | left: 850px; |
| | | } |
| | | #C32 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 814px; |
| | | left: 832px; |
| | | } |
| | | #C33 { |
| | | width: 22px; |
| | | height: 52px; |
| | | |
| | | position: Absolute; |
| | | top: 785px; |
| | | left: 804px; |
| | | } |
| | | #C34 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 817px; |
| | | left: 775px; |
| | | } |
| | | #C35 { |
| | | width: 57px; |
| | | height: 55px; |
| | | |
| | | position: Absolute; |
| | | top: 780px; |
| | | left: 705px; |
| | | } |
| | | #C37 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 817px; |
| | | left: 680px; |
| | | } |
| | | #C38 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 817px; |
| | | left: 642px; |
| | | } |
| | | #C39 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 817px; |
| | | left: 606px; |
| | | } |
| | | #C40 { |
| | | width: 37px; |
| | | height: 44px; |
| | | |
| | | position: Absolute; |
| | | top: 791px; |
| | | left: 556px; |
| | | } |
| | | #C41 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 814px; |
| | | left: 538px; |
| | | } |
| | | #C42 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 814px; |
| | | left: 517px; |
| | | } |
| | | #D31 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 746px; |
| | | left: 850px; |
| | | } |
| | | #D32 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 746px; |
| | | left: 832px; |
| | | } |
| | | #D33 { |
| | | width: 22px; |
| | | height: 52px; |
| | | |
| | | position: Absolute; |
| | | top: 715px; |
| | | left: 804px; |
| | | } |
| | | #D34 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 748px; |
| | | left: 775px; |
| | | } |
| | | #D35 { |
| | | width: 57px; |
| | | height: 55px; |
| | | |
| | | position: Absolute; |
| | | top: 711px; |
| | | left: 705px; |
| | | } |
| | | #D37 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 748px; |
| | | left: 680px; |
| | | } |
| | | #D38 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 748px; |
| | | left: 642px; |
| | | } |
| | | #D39 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 748px; |
| | | left: 606px; |
| | | } |
| | | #D40 { |
| | | width: 37px; |
| | | height: 44px; |
| | | |
| | | position: Absolute; |
| | | top: 723px; |
| | | left: 556px; |
| | | } |
| | | #D41 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 746px; |
| | | left: 538px; |
| | | } |
| | | #D42 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 746px; |
| | | left: 517px; |
| | | } |
| | | #s1 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 906px; |
| | | left: 850px; |
| | | } |
| | | #s2 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 838px; |
| | | left: 850px; |
| | | } |
| | | #s3 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 769px; |
| | | left: 850px; |
| | | } |
| | | #s6 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 906px; |
| | | left: 515px; |
| | | } |
| | | #s5 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 838px; |
| | | left: 515px; |
| | | } |
| | | #s4 { |
| | | width: 15px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 769px; |
| | | left: 515px; |
| | | } |
| | | |
| | | #A43 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 498px; |
| | | } |
| | | #A44 { |
| | | width: 190px; |
| | | height: 26px; |
| | | |
| | | position: Absolute; |
| | | top: 949px; |
| | | left: 297px; |
| | | } |
| | | #A45 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 277px; |
| | | } |
| | | #A47 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 258px; |
| | | } |
| | | #A49 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 240px; |
| | | } |
| | | #A49-1 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 223px; |
| | | } |
| | | #A50 { |
| | | width: 25px; |
| | | height: 25px; |
| | | |
| | | position: Absolute; |
| | | top: 950px; |
| | | left: 197px; |
| | | } |
| | | #A51-1 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 954px; |
| | | left: 183px; |
| | | } |
| | | #A51-2 { |
| | | width: 69px; |
| | | height: 34px; |
| | | |
| | | position: Absolute; |
| | | top: 945px; |
| | | left: 110px; |
| | | } |
| | | #A51-3 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 955px; |
| | | left: 95px; |
| | | } |
| | | #A52-1 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 955px; |
| | | left: 75px; |
| | | } |
| | | #A52-2 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 955px; |
| | | left: 55px; |
| | | } |
| | | #A52-3 { |
| | | width: 23px; |
| | | height: 125px; |
| | | |
| | | position: Absolute; |
| | | top: 820px; |
| | | left: 50px; |
| | | } |
| | | #A52-4 { |
| | | width: 17px; |
| | | height: 30px; |
| | | |
| | | position: Absolute; |
| | | top: 787px; |
| | | left: 52px; |
| | | } |
| | | #A52-5 { |
| | | width: 17px; |
| | | height: 75px; |
| | | |
| | | position: Absolute; |
| | | top: 703px; |
| | | left: 52px; |
| | | } |
| | | #A52-6 { |
| | | width: 17px; |
| | | height: 75px; |
| | | |
| | | position: Absolute; |
| | | top: 618px; |
| | | left: 52px; |
| | | } |
| | | #A55-1 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 603px; |
| | | left: 55px; |
| | | } |
| | | #A55-2 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 585px; |
| | | left: 55px; |
| | | } |
| | | #A55-3 { |
| | | width: 17px; |
| | | height: 30px; |
| | | |
| | | position: Absolute; |
| | | top: 546px; |
| | | left: 52px; |
| | | } |
| | | #A55-4 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 522px; |
| | | left: 55px; |
| | | } |
| | | #A55-5 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 522px; |
| | | left: 73px; |
| | | } |
| | | #A55-6 { |
| | | width: 70px; |
| | | height: 40px; |
| | | |
| | | position: Absolute; |
| | | top: 507px; |
| | | left: 89px; |
| | | } |
| | | #A55-7 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 522px; |
| | | left: 162px; |
| | | } |
| | | #A56-1 { |
| | | width: 148px; |
| | | height: 26px; |
| | | |
| | | position: Absolute; |
| | | top: 516px; |
| | | left: 179px; |
| | | } |
| | | #A56-2 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 522px; |
| | | left: 332px; |
| | | } |
| | | #A56-3 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 522px; |
| | | left: 349px; |
| | | } |
| | | #A56-4 { |
| | | width: 22px; |
| | | height: 22px; |
| | | |
| | | position: Absolute; |
| | | top: 516px; |
| | | left: 364px; |
| | | } |
| | | #A56-5 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 521px; |
| | | left: 390px; |
| | | } |
| | | #A59 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 548px; |
| | | left: 390px; |
| | | } |
| | | #A61 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 572px; |
| | | left: 390px; |
| | | } |
| | | #A63 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 592px; |
| | | left: 390px; |
| | | } |
| | | #A64 { |
| | | width: 12px; |
| | | height: 20px; |
| | | |
| | | position: Absolute; |
| | | top: 614px; |
| | | left: 390px; |
| | | } |
| | | #A65 { |
| | | width: 12px; |
| | | height: 20px; |
| | | |
| | | position: Absolute; |
| | | top: 614px; |
| | | left: 405px; |
| | | } |
| | | #A66 { |
| | | width: 684px; |
| | | height: 50px; |
| | | |
| | | position: Absolute; |
| | | top: 600px; |
| | | left: 438px; |
| | | } |
| | | #A67 { |
| | | width: 12px; |
| | | height: 20px; |
| | | |
| | | position: Absolute; |
| | | top: 617px; |
| | | left: 1140px; |
| | | } |
| | | #A68 { |
| | | width: 12px; |
| | | height: 20px; |
| | | |
| | | position: Absolute; |
| | | top: 617px; |
| | | left: 1158px; |
| | | } |
| | | #A69 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 581px; |
| | | left: 1157px; |
| | | } |
| | | #A70 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 545px; |
| | | left: 1157px; |
| | | } |
| | | #A71 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 508px; |
| | | left: 1157px; |
| | | } |
| | | #A72 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 466px; |
| | | left: 1157px; |
| | | } |
| | | #A73 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 430px; |
| | | left: 1157px; |
| | | } |
| | | #A74 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 430px; |
| | | left: 1175px; |
| | | } |
| | | #A75 { |
| | | width: 76px; |
| | | height: 32px; |
| | | |
| | | position: Absolute; |
| | | top: 416px; |
| | | left: 1190px; |
| | | } |
| | | #A76 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 430px; |
| | | left: 1268px; |
| | | } |
| | | #A78 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 430px; |
| | | left: 1284px; |
| | | } |
| | | #A78-1 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 430px; |
| | | left: 1299px; |
| | | } |
| | | #A79 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 432px; |
| | | left: 1333px; |
| | | } |
| | | #A80 { |
| | | width: 18px; |
| | | height: 18px; |
| | | |
| | | position: Absolute; |
| | | top: 429px; |
| | | left: 1312px; |
| | | } |
| | | #A81 { |
| | | width: 130px; |
| | | height: 18px; |
| | | |
| | | position: Absolute; |
| | | top: 429px; |
| | | left: 1349px; |
| | | } |
| | | #A82 { |
| | | width: 82px; |
| | | height: 18px; |
| | | |
| | | position: Absolute; |
| | | top: 429px; |
| | | left: 1485px; |
| | | } |
| | | #A83-1 { |
| | | width: 22px; |
| | | height: 38px; |
| | | |
| | | position: Absolute; |
| | | top: 415px; |
| | | left: 1575px; |
| | | } |
| | | #A83-2 { |
| | | width: 22px; |
| | | height: 38px; |
| | | |
| | | position: Absolute; |
| | | top: 415px; |
| | | left: 1616px; |
| | | } |
| | | #A84 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 432px; |
| | | left: 1655px; |
| | | } |
| | | #A85 { |
| | | width: 145px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 432px; |
| | | left: 1675px; |
| | | } |
| | | #A89 { |
| | | width: 12px; |
| | | height: 12px; |
| | | |
| | | position: Absolute; |
| | | top: 432px; |
| | | left: 1832px; |
| | | } |
| | | .divGrenn{ |
| | | background-color:green; |
| | | display:block |
| | | } |
| | | .divRed{ |
| | | background-color:red; |
| | | display:block |
| | | } |
| | | .divYellow{ |
| | | background-color:yellow; |
| | | display:block |
| | | } |
| | | .divnull{ |
| | | display:none |
| | | } |
| | | #A3 { |
| | | width: 65px; |
| | | height: 55px; |
| | | position: Absolute; |
| | | top: 775px; |
| | | left: 1335px; |
| | | background-color:green; |
| | | display:block |
| | | } |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 1920px;height: 1080px;background-color: #7f817cdd;"> |
| | | <div id="header1"><span>æµ·å°æºå®¶å¨çµè±é³å·¥åç»ç产线</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['4_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | <div id="main3"> |
| | | <div id="main3-1"> |
| | | <div id="main3-1-1">æ»èçµï¼<span>{{shuzu2[0]['0_@jiqidianliang']}}kw</span></div> |
| | | <div id="main3-1-2"></div> |
| | | </div> |
| | | <div id="main3-2"> |
| | | <div id="main3-2-1">æ»èæ°´ï¼<span>{{shuzu2[0]['1_@jiqidianliang1']}}m³</span></div> |
| | | <div id="main3-2-2"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div id="footer"> |
| | | <img style="width: 100%;height: 100%;" src="../img/大å±.png"> |
| | | </div> |
| | | <div id="cangchu" > |
| | | <img style="width: 100%;height: 100%;" src="../img/cangchu.png"> |
| | | </div> |
| | | <div id='A3' class='boli '></div> |
| | | <div v-for="items in shuzu" :class="items['6_class']" :id="items['3_class_html']" v-if="Object.keys(shuzu[0]).length!=0" class="boli" ></div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | val: { |
| | | title:{ |
| | | text:'', |
| | | left:'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | data: [], |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'rgb(30, 144, 255)' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgb(30, 144, 255)' |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgb(30, 144, 255)', |
| | | type: 'dashed' |
| | | } |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: "value", |
| | | name: "è½è", |
| | | nameTextStyle: { |
| | | color: "rgb(30, 144, 255)", |
| | | fontSize: 12, |
| | | padding: [0, 0, 0, -30], //nameæåä½ç½® å¯¹åº ä¸å³ä¸å·¦ |
| | | }, |
| | | splitLine: { |
| | | // ç½æ ¼çº¿ |
| | | show: false, |
| | | lineStyle: { //åå²çº¿ |
| | | color: "rgb(180, 180, 180)", |
| | | width: 1, |
| | | type: "dashed" //dottedï¼è线 solid:å®çº¿ |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | // è½´æå |
| | | color: "rgb(30, 144, 255)", |
| | | fontSize: 12, |
| | | }, |
| | | }, |
| | | |
| | | ], |
| | | series: [{ |
| | | name: 'çµè', |
| | | type: 'bar', |
| | | barWidth: '80%', |
| | | data: [220, 152, 200, 334, 390, 330, 220], |
| | | itemStyle: { |
| | | color: 'rgb(180, 180, 180)' |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'40%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | // emphasis: { |
| | | // itemStyle: { |
| | | // shadowBlur: 10, |
| | | // shadowOffsetX: 0, |
| | | // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // } |
| | | // } |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | echarsInit() { |
| | | var datashijian=[]; |
| | | var s=7; |
| | | while(s>0){ |
| | | s=s-1; |
| | | |
| | | var date_day7=new Date(Date.parse(new Date())-s*24*60*60*1000); |
| | | |
| | | var day7= (date_day7.getMonth()+1) +"/"+date_day7.getDate(); |
| | | datashijian.push(day7); |
| | | |
| | | |
| | | } |
| | | let HisArr=""; |
| | | let dianhao=[]; |
| | | let shijian=[]; |
| | | |
| | | |
| | | HisArr = this.$echarts.init(document.getElementById('main3-1-2')); |
| | | |
| | | this.val.yAxis[0].name="çµè"; |
| | | this.val.series[0].name='çµè(kw.h)' |
| | | for(let i in this.machineElectric){ |
| | | dianhao.push(this.machineElectric[i]["0_jiqidianliang"]); |
| | | shijian.push(this.machineElectric[i]["1_date"]); |
| | | } |
| | | console.log(dianhao); |
| | | this.val.title.text="æ»èçµ(kw.h)" |
| | | this.val.series[0].itemStyle.color='rgb(84,112,198)' |
| | | this.val.xAxis[0].data=datashijian; |
| | | this.val.series[0].data=dianhao; |
| | | HisArr.setOption(this.val); |
| | | this.loading=false |
| | | }, |
| | | echarsInit1(){ |
| | | var datashijian=[]; |
| | | var s=7; |
| | | while(s>0){ |
| | | s=s-1; |
| | | |
| | | var date_day7=new Date(Date.parse(new Date())-s*24*60*60*1000); |
| | | |
| | | var day7= (date_day7.getMonth()+1) +"/"+date_day7.getDate(); |
| | | datashijian.push(day7); |
| | | |
| | | |
| | | } |
| | | let HisArr=""; |
| | | let dianhao=[]; |
| | | let shijian=[]; |
| | | HisArr = this.$echarts.init(document.getElementById('main3-2-2')); |
| | | this.val.yAxis[0].name="æ°´è"; |
| | | this.val.series[0].name='æ°´è(m³)' |
| | | for(let i in this.machineWater){ |
| | | dianhao.push(this.machineWater[i]["0_jiqidianliang"]); |
| | | shijian.push(this.machineWater[i]["1_date"]); |
| | | } |
| | | this.val.title.text="æ»èæ°´(m³)" |
| | | this.val.series[0].itemStyle.color='#00ff00' |
| | | this.val.xAxis[0].data=datashijian; |
| | | this.val.series[0].data=[78,80,84,75,82,77,80]; |
| | | HisArr.setOption(this.val); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: 942, |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' } |
| | | |
| | | } |
| | | let b = { |
| | | value: 58, |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' } |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="40%" |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' } |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' } |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="40%" |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | shuzu(){ |
| | | for(item of this.shuzu){ |
| | | |
| | | if((item["3_class_html"].indexOf("33")>-1) || (item["3_class_html"].indexOf("35")>-1) || (item["3_class_html"].indexOf("40")>-1)){ |
| | | if(item["1_connect_state"]=="å·²è¿æ¥"){ |
| | | if(item["5_baojin"]>0){ |
| | | //æ°´å |
| | | if(item["3_class_html"].indexOf("35")>-1){ |
| | | if(item["5_baojin"]>1){ |
| | | item["6_class"]='divYellow'; |
| | | }else{ |
| | | item["4_shuliang"]==4?item["6_class"]='divGrenn':item["6_class"]='divnull'; |
| | | } |
| | | |
| | | }else{ |
| | | item["6_class"]='divYellow'; |
| | | } |
| | | |
| | | }else{ |
| | | |
| | | //é»å å å·¥ä¸å¿ |
| | | item["4_shuliang"]==2?item["6_class"]='divGrenn':item["6_class"]='divnull'; |
| | | |
| | | |
| | | } |
| | | }else{ |
| | | item["6_class"]='divRed'; |
| | | } |
| | | } |
| | | else{ |
| | | if(item["1_connect_state"]=="å·²è¿æ¥"){ |
| | | if(item["5_baojin"]>0){ |
| | | item["6_class"]='divYellow'; |
| | | }else{ |
| | | if((item["0_machine_id"]==76)||(item["0_machine_id"]==77)||(item["0_machine_id"]==26)||(item["0_machine_id"]==53)){ |
| | | |
| | | item["6_class"]='divGrenn'; |
| | | }else{ |
| | | item["4_shuliang"]>0?item["6_class"]='divGrenn':item["6_class"]='divnull';} |
| | | } |
| | | }else{ |
| | | item["6_class"]='divRed'; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | machineElectric(){ |
| | | this.echarsInit() |
| | | }, |
| | | machineWater(){ |
| | | this.echarsInit1() |
| | | }, |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | // let canshu={ |
| | | // sql:"{call AXJ_dapingxianshijiqishuju()}", |
| | | // flag:2, |
| | | // vals:"shuzu" |
| | | // } |
| | | // let canshu1={ |
| | | // sql:"{call AXJ_dapingxianshi_dingdanshuju()}", |
| | | // flag:2, |
| | | // vals:"shuzu1" |
| | | // } |
| | | // this.shuzu1=await this.returnloadAjxss(canshu1); |
| | | |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshijiqishuju()}" |
| | | this.loadAjxss('大屿¾ç¤º',sql,flag,"shuzu") |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju()}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | sql="{call AXJ_a_largeScreen_sumelectric_select()}" |
| | | this.loadAjxss('大屿»çµèæ°æ®',sql,flag,"machineElectric") |
| | | sql="{call AXJ_a_largeScreen_sumselect()}" |
| | | this.loadAjxss('大屿»è½èæ»æ°æ®',sql,flag,"shuzu2") |
| | | sql="{call AXJ_a_largeScreen_sumwater_select()}" |
| | | this.loadAjxss('大屿»æ°´èæ°æ®',sql,flag,"machineWater") |
| | | |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshijiqishuju()}" |
| | | this.interValLoadAjxs('大屿¾ç¤º',sql,flag,"shuzu") |
| | | },5000) |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju()}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | await setInterval(()=>{ |
| | | sql="{call AXJ_a_largeScreen_sumelectric_select()}" |
| | | this.interValLoadAjxs('大屿»çµèæ°æ®',sql,flag,"machineElectric") |
| | | },5000) |
| | | await setInterval(()=>{ |
| | | sql="{call AXJ_a_largeScreen_sumselect()}" |
| | | this.interValLoadAjxs('大屿»è½èæ»æ°æ®',sql,flag,"shuzu2") |
| | | },5000) |
| | | await setInterval(()=>{ |
| | | sql="{call AXJ_a_largeScreen_sumwater_select()}" |
| | | this.interValLoadAjxs('大屿»æ°´èæ°æ®',sql,flag,"machineWater") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // function drawLine2(){ |
| | | |
| | | // var chartDom = document.getElementById('main2'); |
| | | // var myChart = echarts.init(chartDom); |
| | | // var option; |
| | | // alert(app.$data.shuzu1[0]['2_smallglass_completed']); |
| | | // option = { |
| | | |
| | | |
| | | // borderColor:'#082352', |
| | | // title: { |
| | | // // text: 'æååºå', |
| | | // // left: '290px', |
| | | // // top: '0px' |
| | | // text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | // left:'center', |
| | | // top:'45%', |
| | | // left:'40%', |
| | | // textStyle:{ |
| | | // color:'#454c5c', |
| | | // align:'center' |
| | | // }, |
| | | // subtextStyle:{ |
| | | // fontFamily : "微软é
é»", |
| | | // color:'#6c7a89', |
| | | // } |
| | | |
| | | // }, |
| | | |
| | | // tooltip: { |
| | | // trigger: 'item', |
| | | // textStyle:{ |
| | | // } |
| | | // }, |
| | | // legend: { |
| | | // // orient: 'vertical', |
| | | // left: 'left', |
| | | // textStyle:{ |
| | | |
| | | // } |
| | | // }, |
| | | // textStyle:{ |
| | | |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | |
| | | // type: 'pie', |
| | | // radius : ['40%','70%'], |
| | | // center: ['50%', '50%'], |
| | | // minAngle:'15', |
| | | // label: { |
| | | // // position: 'inside', |
| | | // show: true, |
| | | // formatter(param) { |
| | | // // correct the percentage |
| | | // return param.name + ' (' + param.percent + '%)'; |
| | | // } |
| | | // }, |
| | | // data: [ |
| | | // { value: app.$data.shuzu1[0]['2_smallglass_completed'], name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | // { value: app.$data.shuzu1[0]['3_smallglass_processing'], name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | // ], |
| | | // // emphasis: { |
| | | // // itemStyle: { |
| | | // // shadowBlur: 10, |
| | | // // shadowOffsetX: 0, |
| | | // // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // // } |
| | | // // } |
| | | // itemStyle: { |
| | | // normal:{ |
| | | // label:{ |
| | | // show:true, |
| | | // //formatter: "{b} :\n {c} \n ({d}%)", |
| | | // formatter: "{b} :\n ({d}%)", |
| | | // position:"inner" |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | // ] |
| | | // }; |
| | | |
| | | // option && myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | // var chartDom4 = document.getElementById('main4'); |
| | | // var myChart4 = echarts.init(chartDom4); |
| | | // var option4; |
| | | // option4 = { |
| | | |
| | | |
| | | // borderColor:'#082352', |
| | | // title: { |
| | | // // text: 'æååºå', |
| | | // // left: '290px', |
| | | // // top: '0px' |
| | | // text:'订åå å·¥',//主æ é¢ææ¬ |
| | | // left:'center', |
| | | // top:'45%', |
| | | // left:'40%', |
| | | // textStyle:{ |
| | | // color:'#454c5c', |
| | | // align:'center' |
| | | // }, |
| | | // subtextStyle:{ |
| | | // fontFamily : "微软é
é»", |
| | | // color:'#6c7a89', |
| | | // } |
| | | |
| | | // }, |
| | | |
| | | // tooltip: { |
| | | // trigger: 'item', |
| | | // textStyle:{ |
| | | // fontsize: 12, |
| | | // } |
| | | // }, |
| | | // legend: { |
| | | // // orient: 'vertical', |
| | | // left: 'left', |
| | | // textStyle:{ |
| | | // fontsize: 12, |
| | | // } |
| | | // }, |
| | | // textStyle:{ |
| | | // fontsize: 12, |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | |
| | | // type: 'pie', |
| | | // radius : ['40%','70%'], |
| | | // center: ['50%', '50%'], |
| | | // minAngle:'15', |
| | | // label: { |
| | | // // position: 'inside', |
| | | // show: true, |
| | | // formatter(param) { |
| | | // // correct the percentage |
| | | // return param.name + ' (' + param.percent + '%)'; |
| | | // } |
| | | // }, |
| | | // data: [ |
| | | // { value: 700, name: '已宿',itemStyle:{color:'#53a2ff'} }, |
| | | // { value: 300, name: 'æªå®æ',itemStyle:{color:'darkseagreen'} } |
| | | // ], |
| | | // // emphasis: { |
| | | // // itemStyle: { |
| | | // // shadowBlur: 10, |
| | | // // shadowOffsetX: 0, |
| | | // // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // // } |
| | | // // } |
| | | // itemStyle: { |
| | | // normal:{ |
| | | // label:{ |
| | | // show:true, |
| | | // //formatter: "{b} :\n {c} \n ({d}%)", |
| | | // formatter: "{b} :\n ({d}%)", |
| | | // position:"inner" |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | // ] |
| | | // }; |
| | | |
| | | // option4 && myChart4.setOption(option4); |
| | | |
| | | |
| | | |
| | | // var chartDom1 = document.getElementById('main3-1-2'); |
| | | // var myChart1 = echarts.init(chartDom1); |
| | | // var option1; |
| | | |
| | | // option1 = { |
| | | // title: { |
| | | // text: 'èçµç»è®¡å¾', |
| | | // right: '0px', |
| | | // textStyle:{ |
| | | |
| | | |
| | | // } |
| | | |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'axis', |
| | | // axisPointer: { |
| | | // type: 'shadow' |
| | | // }, |
| | | // textStyle:{ |
| | | |
| | | // } |
| | | // }, |
| | | // grid: { |
| | | // left: '3%', |
| | | // right: '4%', |
| | | // bottom: '3%', |
| | | // containLabel: true |
| | | // }, |
| | | // xAxis: [ |
| | | // { |
| | | // type: 'category', |
| | | // data: datashijian, |
| | | // axisTick: { |
| | | // alignWithLabel: true |
| | | // }, |
| | | // axisLabel:{ |
| | | |
| | | // } |
| | | // } |
| | | // ], |
| | | // yAxis: [ |
| | | // { |
| | | // type: 'value', |
| | | // axisLabel:{ |
| | | |
| | | // } |
| | | // } |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // name: '产é', |
| | | // type: 'bar', |
| | | // barWidth: '40%', |
| | | // data: [100, 52, 200, 334, 330, 220, 80, 460, 310, 120, 430, 260, 250], |
| | | // itemStyle:{color:'#53a2ff'} |
| | | // } |
| | | // ] |
| | | // }; |
| | | |
| | | // option1 && myChart1.setOption(option1); |
| | | |
| | | |
| | | // var chartDom2 = document.getElementById('main3-2-2'); |
| | | // var myChart2 = echarts.init(chartDom2); |
| | | // var option2; |
| | | |
| | | // option2 = { |
| | | // title: { |
| | | // text: 'èæ°´ç»è®¡å¾', |
| | | // right: '0px', |
| | | // textStyle:{ |
| | | |
| | | |
| | | // } |
| | | |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'axis', |
| | | // axisPointer: { |
| | | // type: 'shadow' |
| | | // }, |
| | | // textStyle:{ |
| | | |
| | | // } |
| | | // }, |
| | | // grid: { |
| | | // left: '3%', |
| | | // right: '4%', |
| | | // bottom: '3%', |
| | | // containLabel: true |
| | | // }, |
| | | // xAxis: [ |
| | | // { |
| | | // type: 'category', |
| | | // data: datashijian, |
| | | // axisTick: { |
| | | // alignWithLabel: true |
| | | // }, |
| | | // axisLabel:{ |
| | | |
| | | // } |
| | | // } |
| | | // ], |
| | | // yAxis: [ |
| | | // { |
| | | // type: 'value', |
| | | // axisLabel:{ |
| | | |
| | | // } |
| | | // } |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // name: '产é', |
| | | // type: 'bar', |
| | | // barWidth: '40%', |
| | | // data: [100, 52, 200, 334, 330, 220, 80, 460, 310, 120, 430, 260, 250], |
| | | // itemStyle:{color:'#53a2ff'} |
| | | // } |
| | | // ] |
| | | // }; |
| | | |
| | | // option2 && myChart2.setOption(option2); |
| | | //} |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html style="width:100%;height:100%;"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <title>大å±å¯å±</title> |
| | | <script src="../js/main.js"></script> |
| | | </head> |
| | | <body style="width:100%;height:100%;"> |
| | | <div id="app" > |
| | | <screen-photo :id="15" :intime="this.global.timer" |
| | | > |
| | | </div> |
| | | </body> |
| | | <script> |
| | | let app= new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | |
| | | }, |
| | | watch: { |
| | | }, |
| | | methods:{ |
| | | |
| | | }, |
| | | async mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | }, |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('æå')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('æå')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('é¢å')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('é¢å')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('åå²')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('åå²')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <meta http-equiv="expires" content="0"> |
| | | <meta http-equiv="pragma" content="no-cache"> |
| | | <meta http-equiv="cache-control" content="no-cache"> |
| | | <title>ä»å¨å¤§å±</title> |
| | | <script src="../js/main.js"></script> |
| | | </head> |
| | | <body> |
| | | <div id="app" @mousemove="onmouseMove" v-loading="loading" element-loading-background="white"> |
| | | <div id="mains" v-show="this.global.pollingIndex==0"> |
| | | <div id="divHead" style="width: 100%;height:19.5%;float: left;margin-bottom: 0.5%;position: relative;"> |
| | | <!-- <el-scrollbar class="page-scroll" style="width: 100%;height: 70%;overflow-y: auto;"> --> |
| | | <div v-for="(items,index) in storage" style="width:6.9% ;height: 35%;margin-top: 1.5%;margin-left: 1.3%;float: left;"> |
| | | <div |
| | | class="shelf" |
| | | :title="items['2_raw_thickness']+items['3_color']+' '+items['4_raw_width']+'*'+items['5_raw_height'] " |
| | | style="background-color: #909399;width: 100%;height: 40%;float: left;position: relative;"> |
| | | |
| | | <div v-if="index<=23" |
| | | :style="{ |
| | | width:(items['7_left_pieces']/items['6_pieces']*100)+'%', |
| | | position: 'absolute', |
| | | left: 0, |
| | | height: 100+'%', |
| | | float: 'left', |
| | | 'background-image':`url('../js/static/imgs/101.png')` |
| | | }" |
| | | |
| | | |
| | | > |
| | | <span style="position: absolute;left: 0;color:white;font-size:small;height: 100%;width: 100%;">{{items['7_left_pieces']+'/'+items['6_pieces']}}</span> |
| | | </div> |
| | | |
| | | <!-- <div v-if="index==24" |
| | | style="background-image:url('../static/imgs/103.png');width: 0%;height: 100%;float: left;position: absolute; left: 0;"> |
| | | <span style="position: absolute;left: 0;color:white;font-size: small;height: 100%;width: 100%;">0/50</span> |
| | | </div> --> |
| | | </div> |
| | | <div> |
| | | {{items['0_id']}} |
| | | </div> |
| | | </div> |
| | | <!-- <el-progress |
| | | width="80" |
| | | percentage="50" |
| | | :color="customColors" |
| | | :format="setItemText" |
| | | ></el-progress> --> |
| | | |
| | | |
| | | <div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div id="left" style="width: 19.5%;height:80%;float: left;padding: 0; margin-right: 0.5%;"> |
| | | <div style="width:100%;height: 20%;"> |
| | | <transition name="el-fade-in"> |
| | | <div v-show="show" |
| | | style="float: left;width: 100%;height: 20%;margin-top: 4%;"> |
| | | |
| | | <div |
| | | style="background-image:url('../js/static/imgs/101.png');height: 20px;width: 20px;padding: 0%;float: left;" |
| | | > |
| | | </div> |
| | | <p style="float: left;margin: 0;margin-left: 1.3%;">{{showGlassType}}</p> |
| | | |
| | | </div> |
| | | </transition> |
| | | <!-- <div style="float: left;width: 100%;height: 46%;margin-top: 4%;"> |
| | | |
| | | <el-alert style="width: 80%;margin-left: 10%;background-color: transparent;" |
| | | title="24å·æ¶å空æ¶ï¼åè£
空é²" |
| | | type="warning" |
| | | :closable="false" |
| | | show-icon> |
| | | <el-button @click="show1" type="warning" style="float: left;">è°ç¨åè£
ä½</el-button> |
| | | </el-alert> |
| | | |
| | | </div> --> |
| | | |
| | | </div> |
| | | |
| | | <div id="picture" style="width:100%;height: 40%;"></div> |
| | | <div id="Histogram1" style="width:100%;height: 40%;"></div> |
| | | </div> |
| | | <div id="main" style="width: 80%;height:80%;float: right;padding: 0;background-color: white;"> |
| | | <el-date-picker style="float: left;margin-bottom: 0.3%;" |
| | | v-model="selectdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | |
| | | <el-button type="primary" icon="el-icon-search" |
| | | style="float: left;margin-left: 0.2%;margin-bottom: 0.3%;" |
| | | @click="selectSub(1)" |
| | | >æç´¢</el-button> |
| | | |
| | | <el-table |
| | | :data="tableData" |
| | | height="92%" |
| | | |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | v-for="(item,keys,index) in tableHead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | > |
| | | <el-table-column |
| | | :prop="keys" |
| | | > |
| | | <template slot="header" slot-scope="scope" > |
| | | <el-input v-model="selectstorage[index]" @keyup.enter.native="selectSub(1)" type="text" size="mini" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | |
| | | </el-table> |
| | | |
| | | </div> |
| | | </div> |
| | | <screen-photo :id="1" :intime="this.global.timer" |
| | | v-show="this.global.pollingIndex==1" |
| | | > |
| | | </screen-photo> |
| | | |
| | | </div> |
| | | </body> |
| | | |
| | | |
| | | <script > |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | machineElectric:[{}], |
| | | storage:null, |
| | | glassNumGraph:{ |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | top: '5%', |
| | | left: 'center' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'æ°é', |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | avoidLabelOverlap: true, |
| | | itemStyle: { |
| | | borderRadius: 10, |
| | | borderColor: '#fff', |
| | | borderWidth: 2 |
| | | }, |
| | | label: { |
| | | formatter:null, |
| | | fontSize: 20, |
| | | fontWeight: 'bold',show: true, |
| | | position: 'center' |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | formatter:null, |
| | | show: true, |
| | | fontSize: 20, |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true |
| | | }, |
| | | data:[ |
| | | { value: null, name: 'æªä½¿ç¨',itemStyle: {color:'#409EFF'} }, |
| | | { value: null, name: '计åä¸',itemStyle: {color:'#67C23A'} }, |
| | | { value: null, name: '已使ç¨',itemStyle: {color:'#C0C4CC'} } |
| | | ], |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | tableHead:[{}], |
| | | tableData:null, |
| | | show:true, |
| | | showGlassType:'', |
| | | showGlassIndex:0, |
| | | storageNum:null, |
| | | selectstorage:["","","","","","","","","",""],//çéåæ° |
| | | selectdate:["",""],//æ¥æåæ° |
| | | loading:true, |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | echarsInit(){ |
| | | let a = this.$echarts.init( document.getElementById('picture')) |
| | | this.glassNumGraph.series[0].data[0]['value']=this.storageNum[0]['2_weishiyong'] |
| | | this.glassNumGraph.series[0].data[1]['value']=this.storageNum[0]['1_jihuashuliang'] |
| | | this.glassNumGraph.series[0].data[2]['value']=this.storageNum[0]['0_yishiyong'] |
| | | |
| | | this.glassNumGraph.series[0].label.formatter=this.storageNum[0]['2_weishiyong']+'/' |
| | | +this.storageNum[0]['1_jihuashuliang']+'/' |
| | | +this.storageNum[0]['0_yishiyong'] |
| | | console.log(this.glassNumGraph.series[0].data); |
| | | a.setOption(this.glassNumGraph) |
| | | }, |
| | | |
| | | showGlass(){ |
| | | this.showGlassIndex=this.showGlassIndex<this.storage.length?this.showGlassIndex+1:1 |
| | | this.show=false |
| | | this.showGlassType=this.storage[this.showGlassIndex-1]['0_id']+ |
| | | 'å·æ¶ï¼'+ |
| | | this.storage[this.showGlassIndex-1]['2_raw_thickness']+ |
| | | this.storage[this.showGlassIndex-1]['3_color']+' '+ |
| | | this.storage[this.showGlassIndex-1]['4_raw_width']+ |
| | | '*'+ |
| | | this.storage[this.showGlassIndex-1]['5_raw_height'] |
| | | this.show=true |
| | | |
| | | }, |
| | | async selectSub(type){//è¾å
¥æ¡çé |
| | | let arrObj={} |
| | | for(let i in this.selectstorage){ |
| | | |
| | | arrObj[i]=this.selectstorage[i]==''?"n*":this.selectstorage[i] |
| | | } |
| | | if(this.selectdate!=null){ |
| | | arrObj.starttime=this.selectdate[0] |
| | | arrObj.endtime=this.selectdate[1] |
| | | }else{ |
| | | arrObj.starttime='' |
| | | arrObj.endtime='' |
| | | } |
| | | arrObj.types=type |
| | | let sql="{call AXJ_a_largeScreen_storageLog_select(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj) |
| | | this.loading=true |
| | | await this.loadAjxss('è®¢åæ¥è¯¢',sql,2,"tableData") |
| | | |
| | | this.loading=false |
| | | }, |
| | | echarsInit1() { |
| | | |
| | | let HisArr=[] |
| | | HisArr[0] = this.$echarts.init(document.getElementById('Histogram1')); |
| | | let val=this.global.val |
| | | val.yAxis[0].name="çµè"; |
| | | val.series[0].name='çµè(kw·h)' |
| | | for(let i in this.machineElectric){ |
| | | val.title.text=this.machineElectric[i]["0_machine_name"]+"(kw·h)" |
| | | val.series[0].itemStyle.color='rgb(84,112,198)' |
| | | val.xAxis[0].data=this.machineElectric[i]["6_shijian"].split(','); |
| | | val.series[0].data=this.machineElectric[i]["5_jiqidianliang"].split(','); |
| | | HisArr[i].setOption(val); |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | watch:{ |
| | | storageNum(){ |
| | | this.loading=false, |
| | | this.echarsInit() |
| | | }, |
| | | machineElectric(){ |
| | | this.echarsInit1() |
| | | } |
| | | }, |
| | | |
| | | async mounted() { |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_a_largeScreen_storageLog__headselect()}" |
| | | await this.loadAjxss('大屿¾ç¤ºä»å¨è¡¨å¤´',sql,flag,"tableHead") |
| | | |
| | | let timer1=await setInterval(()=>{ |
| | | sql="{call AXJ_a_largeScreen_storageRack_select()}" |
| | | this.interValLoadAjxs('大屿¾ç¤ºä»å¨æ¶å',sql,flag,"storage",timer1) |
| | | },3000) |
| | | let timer2=await setInterval(() => { |
| | | sql="{call AXJ_a_largeScreen_storageGlassNum_select()}" |
| | | this.interValLoadAjxs('大屿¾ç¤ºä»å¨å©ä½æ°é',sql,flag,"storageNum",timer2) |
| | | this.showGlass() |
| | | }, 3000); |
| | | await this.selectSub(0) |
| | | await this.getMachineElectric('ä»å¨','1') |
| | | this.onmouseMove() |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('å å·¥ä¸å¿')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('å å·¥ä¸å¿')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('磨边åè§')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('磨边åè§')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('æ°´å')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('æ°´å')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | type:'', |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | let type='' |
| | | let machineLocal=<%= request.getParameter("local")%> |
| | | if (machineLocal==0) { |
| | | type='ä¸å°1' |
| | | }else{ |
| | | type='ä¸å°2' |
| | | } |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('è´´è')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('è´´è')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | type:'', |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | let type='' |
| | | let machineLocal=<%= request.getParameter("local")%> |
| | | if (machineLocal==0) { |
| | | type='ççµ1' |
| | | }else if(machineLocal==1){ |
| | | type='ççµ2' |
| | | }else if(machineLocal==2){ |
| | | type='ççµ3' |
| | | } |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | |
| | | <html> |
| | | <head> |
| | | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | <style> |
| | | html,body{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | #header1 { |
| | | width: 100%; |
| | | height: 7%; |
| | | background-color: white; |
| | | display: inline-block; |
| | | text-align: center; |
| | | font-size: 50px; |
| | | } |
| | | #header { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: white; |
| | | margin-top: 2%; |
| | | } |
| | | #footer { |
| | | width: 100%; |
| | | height: 70%; |
| | | |
| | | } |
| | | #main1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | display: flex; |
| | | } |
| | | #main3 { |
| | | width: 100%; |
| | | height: 70%; |
| | | display: flex; |
| | | } |
| | | #main2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main1-1 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 40px; |
| | | } |
| | | #main1-2 { |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 50px; |
| | | } |
| | | #main3-1 { |
| | | width: 50%; |
| | | height: 100%; |
| | | } |
| | | #main3-2 { |
| | | width: 50%; |
| | | height: 100%; |
| | | |
| | | } |
| | | #main4-1 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-2 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main4-3 { |
| | | width: 100%; |
| | | height: 30%; |
| | | |
| | | } |
| | | #main1-1-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main1-2-1 { |
| | | font-size: 50px; |
| | | margin-top: 2%; |
| | | } |
| | | #main3-1-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-1-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | #main3-2-1 { |
| | | width: 100%; |
| | | height: 20%; |
| | | } |
| | | #main3-2-2 { |
| | | width: 100%; |
| | | height: 80%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | <title>大屿¾ç¤º</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" style="width: 99%;height: 99%;background-color: white;"> |
| | | <div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}å·¥åº</span></div> |
| | | <div id="header"> |
| | | <div id="main1" v-for='items1 in shuzu1'> |
| | | <div id="main1-1">å½å订åå·ï¼ |
| | | <div id="main1-1-1" >{{items1['0_order_id']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½å产åå·ï¼ |
| | | <div id="main1-2-1">{{items1['1_recipe_no']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½çè®¡åæ°éï¼ |
| | | <div id="main1-2-1">{{items1['8_smallglass_sum']}}</div> |
| | | </div> |
| | | <div id="main1-2">å½ç宿æ°éï¼ |
| | | <div id="main1-2-1">{{items1['2_smallglass_completed']}} </div> |
| | | </div> |
| | | </div> |
| | | <div id="main3"> |
| | | <div id="main4"></div> |
| | | <div id="main2"></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/echarts.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$echarts = echarts; |
| | | Vue.prototype.$http= axios; |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[{}], |
| | | shuzu1:[{}], |
| | | shuzu2:[{}], |
| | | machineElectric:[{}], |
| | | machineWater:[{}], |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | val1: { |
| | | borderColor:'#082352', |
| | | title: { |
| | | // text: 'æååºå', |
| | | // left: '290px', |
| | | // top: '0px' |
| | | text:'åæ ¼ç',//主æ é¢ææ¬ |
| | | left:'center', |
| | | top:'45%', |
| | | left:'50%', |
| | | textStyle:{ |
| | | color:'#454c5c', |
| | | align:'center' |
| | | }, |
| | | subtextStyle:{ |
| | | fontFamily : "微软é
é»", |
| | | color:'#6c7a89', |
| | | } |
| | | |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'item', |
| | | textStyle:{ |
| | | } |
| | | }, |
| | | legend: { |
| | | // orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | |
| | | type: 'pie', |
| | | radius : ['40%','70%'], |
| | | center: ['50%', '50%'], |
| | | minAngle:'15', |
| | | label: { |
| | | // position: 'inside', |
| | | show: true, |
| | | formatter(param) { |
| | | // correct the percentage |
| | | return param.name + ' (' + param.percent + '%)'; |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 300, name: 'æå',itemStyle:{color:'#53a2ff'} }, |
| | | { value: 700, name: '次å',itemStyle:{color:'darkseagreen'} } |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | label:{ |
| | | show:true, |
| | | //formatter: "{b} :\n {c} \n ({d}%)", |
| | | formatter: "{b} :\n ({d}%)", |
| | | position:"inner" |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | dingdanxiangqing(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main2')); |
| | | let a = { |
| | | value: this.shuzu1[0]['6_qualified'], |
| | | |
| | | name: "æå", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['7_qualified_not'], |
| | | name: "次å", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="åæ ¼ç" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | |
| | | |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | dingdanxiangqing1(){ |
| | | let HisArr=""; |
| | | HisArr = this.$echarts.init(document.getElementById('main4')); |
| | | let a = { |
| | | value: this.shuzu1[0]['2_smallglass_completed'], |
| | | |
| | | name: "已宿", |
| | | itemStyle: { color: '#53a2ff' }, |
| | | label:{fontSize:30} |
| | | |
| | | |
| | | } |
| | | let b = { |
| | | value: this.shuzu1[0]['3_smallglass_processing'], |
| | | name: "æªå®æ", |
| | | itemStyle: { color: 'darkseagreen' }, |
| | | label:{fontSize:30} |
| | | |
| | | } |
| | | this.val1.title.text="订åå å·¥" |
| | | this.val1.title.top="45%" |
| | | this.val1.title.left="45%" |
| | | this.val1.title.textStyle.fontSize=30 |
| | | this.val1.series[0].data[0]=a |
| | | this.val1.series[0].data[1]=b |
| | | HisArr.setOption(this.val1); |
| | | this.loading=false |
| | | }, |
| | | |
| | | }, |
| | | watch:{ |
| | | |
| | | shuzu1(){ |
| | | this.dingdanxiangqing(), |
| | | this.dingdanxiangqing1() |
| | | } |
| | | |
| | | }, |
| | | async mounted(){ |
| | | |
| | | let sql="" |
| | | let flag=2 |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('ä¸ç')}" |
| | | this.loadAjxss('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call AXJ_dapingxianshi_dingdanshuju2('ä¸ç')}" |
| | | this.interValLoadAjxs('大屿»è®¢åæ°æ®',sql,flag,"shuzu1") |
| | | },5000) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | Vue.component('show-table', { |
| | | // 声æ props |
| | | props: ['tablehead','tabledata'], |
| | | // åæ ·ä¹å¯ä»¥å¨ vm å®ä¾ä¸å "this.message" è¿æ ·ä½¿ç¨ |
| | | template: `<el-table |
| | | :data="tabledata" |
| | | height="100%" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | v-if='index!=4' |
| | | v-for="(item,keys,index) in tablehead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | :prop="keys.toString()" |
| | | > |
| | | <template v-slot="scope" v-if=" keys=='6_parts_change' "> |
| | | <el-button |
| | | :style="tabledata[scope.$index]['6_parts_change']==1?textColor:null" |
| | | type="text" |
| | | size="small" |
| | | @click='openParts(scope.$index,tabledata)' |
| | | > |
| | | æ´æ¢ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table>` |
| | | , |
| | | data() { |
| | | return { |
| | | textColor:{ |
| | | color:'orange' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods:{ |
| | | openParts(index,machineData){ |
| | | this.$parent.$emit('dialogvisible', |
| | | { |
| | | 'show':true, |
| | | 'machineid':machineData[index]['10_id'] |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | |
| | | }) |
| | | Vue.component('parts-change', { |
| | | // 声æ props |
| | | props: ['machine'], |
| | | // åæ ·ä¹å¯ä»¥å¨ vm å®ä¾ä¸å "this.message" è¿æ ·ä½¿ç¨ |
| | | template: `<el-dialog |
| | | title="æ´æ¢è®¾å¤é¶é¨ä»¶å表" |
| | | :visible.sync="centerDialogVisible" |
| | | width="55%" |
| | | center |
| | | > |
| | | <el-table :data="machineChange" width="100%" height='100%'> |
| | | <el-table-column |
| | | v-for="(item,keys,index) in machineChangeHead[0]" |
| | | :prop="keys" |
| | | :label="item" |
| | | |
| | | > |
| | | <template v-slot="scope" v-if="keys=='5_surpass' && Object.keys(machineChange[0]).length!=0"> |
| | | <el-button |
| | | :style="machineChange[scope.$index]['5_surpass']==1?textColor:null" |
| | | type="text" |
| | | size="small" |
| | | v-preventreclick |
| | | @click="partsChange(scope.$index, machineChange,0)" |
| | | > |
| | | æ´æ¢ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" v-if="Object.keys(machineChange[0]).length!=0" v-preventreclick @click="partsChange(0,0,1)">ä¸é®æ´æ¢</el-button> |
| | | </span> |
| | | </el-dialog>` |
| | | , |
| | | mixins: [mixin], |
| | | data(){ |
| | | return{ |
| | | centerDialogVisible:false, |
| | | machineChange:[{}], |
| | | machineChangeHead:[{}], |
| | | machineId:null, |
| | | textColor:{ |
| | | color:'orange' |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods:{ |
| | | partsChange(index,data,type){//ä¿®æ¹é¶é¨ä»¶æ´æ¢å¨æï¼typeï¼ 0代表å个é¶é¨ä»¶ï¼1ä»£è¡¨æ¤æºå¨ææé¶é¨ä»¶ |
| | | |
| | | let para |
| | | if(type==0){ |
| | | para={ |
| | | id:data[index]['7_id'], |
| | | machineId:data[index]['6_machine_id'], |
| | | type:type |
| | | } |
| | | }else{ |
| | | para={ |
| | | id:0, |
| | | machineId:this.machineId, |
| | | type:type |
| | | } |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_machinePartsChange_update(?,?,?,?)}~"+JSON.stringify(para); |
| | | this.connects("æ´æ°èæï¼",sql,1,1); |
| | | this.centerDialogVisible = false |
| | | } |
| | | }, |
| | | watch: { |
| | | async machineId(){ |
| | | let machine={ |
| | | id:this.machineId |
| | | } |
| | | let canshu={ |
| | | gongneng:'大屿´æ¢å¨ææºå¨é¶é¨ä»¶æ¥è¯¢ï¼æºå¨å·ï¼'+this.machineId, |
| | | sql:"{call AXJ_a_largeScreen_machinePartsChange_select(?,?)}~"+JSON.stringify(machine), |
| | | flag:2, |
| | | vals:"machineChange" |
| | | } |
| | | this.machineChange=await this.returnloadAjxss(canshu) |
| | | } |
| | | }, |
| | | async mounted() { |
| | | let parameter={ |
| | | gongneng:'大屿´æ¢å¨æè¡¨å¤´æ¥è¯¢', |
| | | sql:"{call AXJ_a_largeScreen_machinePartsChangeHead_select()}", |
| | | flag:2, |
| | | vals:"machineChangeHead" |
| | | } |
| | | this.machineChangeHead=await this.returnloadAjxss(parameter) |
| | | |
| | | this.$parent.$on("dialogvisible",val=>{ |
| | | //è¿æ¯äºä»¶å½æ° 䏿¦changeBgcäºä»¶è¢«è§¦å,就伿§è¡è¿éç代ç |
| | | this.centerDialogVisible = val.show |
| | | this.machineId=val.machineid |
| | | |
| | | |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | Vue.component('screen-order', {//é¢åè´´èä¸ç订åç»ä»¶ |
| | | // 声æ props |
| | | props: ['tablehead','tabledata'], |
| | | // åæ ·ä¹å¯ä»¥å¨ vm å®ä¾ä¸å "this.message" è¿æ ·ä½¿ç¨ |
| | | template: `<el-table |
| | | :data="tabledata" |
| | | height="100%" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | |
| | | v-for="(item,keys,index) in tablehead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | :prop="keys.toString()" |
| | | > |
| | | <template v-slot="scope" v-if=" keys=='3_ratio' && Object.keys(tabledata[0]).length!=0"> |
| | | <el-progress :text-inside="true" :stroke-width="26" |
| | | :percentage="tabledata[scope.$index]['3_ratio']==null?0*1:tabledata[scope.$index]['3_ratio']*1" |
| | | > |
| | | </el-progress> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table>` |
| | | |
| | | |
| | | }) |
| | | |
| | | Vue.component('screen-photo', {//ç°åºä½ä¸å¾è½®æ¢ |
| | | // 声æ props |
| | | props: ['id','intime'], |
| | | // åæ ·ä¹å¯ä»¥å¨ vm å®ä¾ä¸å "this.message" è¿æ ·ä½¿ç¨ |
| | | template: `<div style='width:100%;height:100%;max-width=100%;max-height=100%;position: relative;'> |
| | | <img style="width:100%;height:100%;" class="imgCenter" :src="url"/> |
| | | </div>`, |
| | | mixins: [mixin], |
| | | data(){ |
| | | return{ |
| | | photoList:[{}], |
| | | indexs:-1, |
| | | url:null |
| | | } |
| | | }, |
| | | watch:{ |
| | | photoList(newVal){ |
| | | if(Object.keys(this.photoList[0]).length==0){ |
| | | return |
| | | } |
| | | |
| | | this.url=newVal[0]['0_route'] |
| | | setInterval(()=>{ |
| | | |
| | | this.indexs>=newVal.length-1?this.indexs=0:this.indexs++ |
| | | this.url=newVal[this.indexs]['0_route'] |
| | | },parseInt(this.intime/newVal.length)) |
| | | } |
| | | }, |
| | | async mounted() { |
| | | let para={ |
| | | id:this.id |
| | | } |
| | | let canshu={ |
| | | gongneng:'ç»ä»¶å¾çæ¥è¯¢ï¼', |
| | | sql:"{call AXJ_a_largeScreen_phtot_select(?,?)}~"+JSON.stringify(para), |
| | | flag:2, |
| | | vals:"photoList" |
| | | } |
| | | this.photoList=await this.returnloadAjxss(canshu) |
| | | |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | Vue.component('parts-change-all', { |
| | | // 声æ props |
| | | props: ['machinetype'], |
| | | // åæ ·ä¹å¯ä»¥å¨ vm å®ä¾ä¸å "this.message" è¿æ ·ä½¿ç¨ |
| | | template: ` |
| | | <el-table :data="machineChange" width="100%" height='100%'> |
| | | <el-table-column |
| | | v-for="(item,keys,index) in machineChangeHead[0]" |
| | | :prop="keys" |
| | | :label="item" |
| | | |
| | | > |
| | | <template v-slot="scope" v-if="keys=='5_surpass' && Object.keys(machineChange[0]).length!=0"> |
| | | <el-button |
| | | :style="machineChange[scope.$index]['5_surpass']==1?textColor:null" |
| | | type="text" |
| | | size="small" |
| | | v-preventreclick |
| | | @click="partsChange(scope.$index, machineChange,0)" |
| | | > |
| | | æ´æ¢ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table>` |
| | | , |
| | | mixins: [mixin], |
| | | data(){ |
| | | return{ |
| | | centerDialogVisible:true, |
| | | machineChange:[{}], |
| | | machineChangeHead:[{}], |
| | | machineId:null, |
| | | textColor:{ |
| | | color:'orange' |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods:{ |
| | | partsChange(index,data,type){//ä¿®æ¹é¶é¨ä»¶æ´æ¢å¨æï¼typeï¼ 0代表å个é¶é¨ä»¶ï¼1ä»£è¡¨æ¤æºå¨ææé¶é¨ä»¶ |
| | | |
| | | let para |
| | | if(type==0){ |
| | | para={ |
| | | id:data[index]['7_id'], |
| | | machineId:data[index]['6_machine_id'], |
| | | type:type |
| | | } |
| | | }else{ |
| | | para={ |
| | | id:0, |
| | | machineId:this.machineId, |
| | | type:type |
| | | } |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_machinePartsChange_update(?,?,?,?)}~"+JSON.stringify(para); |
| | | this.connects("æ´æ°èæï¼",sql,1,1); |
| | | this.centerDialogVisible = false |
| | | } |
| | | }, |
| | | watch: { |
| | | async machineId(){ |
| | | |
| | | } |
| | | }, |
| | | async mounted() { |
| | | let parameter={ |
| | | gongneng:'大屿´æ¢å¨æè¡¨å¤´æ¥è¯¢', |
| | | sql:"{call AXJ_a_largeScreen_machinePartsChangeHead_select()}", |
| | | flag:2, |
| | | vals:"machineChangeHead" |
| | | } |
| | | this.machineChangeHead=await this.returnloadAjxss(parameter) |
| | | |
| | | let machine={ |
| | | type:this.machinetype |
| | | } |
| | | let canshu={ |
| | | gongneng:'大屿´æ¢å¨ææºå¨é¶é¨ä»¶æ¥è¯¢ï¼æºå¨ç±»åï¼'+this.machinetype, |
| | | sql:"{call AXJ_a_largeScreen_machinePartsChange_type_select(?,?)}~"+JSON.stringify(machine), |
| | | flag:2, |
| | | vals:"machineChange" |
| | | } |
| | | //this.machineChange= |
| | | await setInterval(async () => { |
| | | this.machineChange= await app.returnloadAjxss(canshu); |
| | | },5000) |
| | | |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| New file |
| | |
| | | Vue.prototype.global={ |
| | | polling:null, |
| | | pollingIndex:0, |
| | | timer:10000,//触å宿¶å¨æ¶é´ |
| | | errorFlag:0, |
| | | val: { |
| | | title:{ |
| | | text:'', |
| | | left:'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | data: [], |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'rgb(30, 144, 255)' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgb(30, 144, 255)' |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgb(30, 144, 255)', |
| | | type: 'dashed' |
| | | } |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: "value", |
| | | name: "è½è", |
| | | nameTextStyle: { |
| | | color: "rgb(30, 144, 255)", |
| | | fontSize: 12, |
| | | padding: [0, 0, 0, -30], //nameæåä½ç½® å¯¹åº ä¸å³ä¸å·¦ |
| | | }, |
| | | splitLine: { |
| | | // ç½æ ¼çº¿ |
| | | show: false, |
| | | lineStyle: { //åå²çº¿ |
| | | color: "rgb(180, 180, 180)", |
| | | width: 1, |
| | | type: "dashed" //dottedï¼è线 solid:å®çº¿ |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | // è½´æå |
| | | color: "rgb(30, 144, 255)", |
| | | fontSize: 12, |
| | | }, |
| | | }, |
| | | |
| | | ], |
| | | series: [{ |
| | | name: 'çµè', |
| | | type: 'bar', |
| | | barWidth: '80%', |
| | | data: [220, 152, 200, 334, 390, 330, 220], |
| | | itemStyle: { |
| | | color: 'rgb(180, 180, 180)' |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | } |
| | | // getMachineElectricTimer:null, |
| | | // getTableDataTimer:null, |
| | | // getMachineWaterTimer:null, |
| | | |
| | | } |
| New file |
| | |
| | | with(document){ |
| | | write('<link rel="shortcut icon" href="../img/3.ico" />'); |
| | | write('<link rel="stylesheet" href="../js/static/css/element.css">'); |
| | | write('<link rel="stylesheet" href="../js/static/css/style.css">'); |
| | | |
| | | write('<script src="../js/static/js/vue.js"></script>'); |
| | | write('<script src="../js/global.js"></script>'); |
| | | write('<script src="../js/jquery-3.4.1.min.js"></script>'); |
| | | write('<script src="../js/axios.min.js"></script>'); |
| | | |
| | | |
| | | write('<script src="../js/mixins.js"></script>'); |
| | | |
| | | write('<script src="../js/components.js"></script>'); |
| | | write('<script src="../js/static/js/element.js"></script>'); |
| | | write('<script src="../js/static/js/echarts.min.js"></script>'); |
| | | write('<script >Vue.prototype.$echarts = echarts;Vue.prototype.$http= axios</script>'); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | |
| | | |
| | | let str = window.location.href.substr(window.location.href.indexOf('?') + 1) |
| | | let json = new Object() |
| | | const arr = str.split('&') |
| | | for(let i = 0; i < arr.length; i++) { |
| | | let item = arr[i].split('=') |
| | | json[item[0]] = item[1] |
| | | } |
| | | |
| | | var mixin={ |
| | | methods:{ |
| | | onmouseMove(){//å±å¹é¼ æ ç§»å¨å¾ªç¯ææ¾ |
| | | clearInterval(this.global.polling); |
| | | |
| | | this.global.polling=setInterval(()=>{ |
| | | |
| | | this.global.pollingIndex>=1?this.global.pollingIndex=0:this.global.pollingIndex++ |
| | | this.$forceUpdate(); |
| | | },this.global.timer)//æ ¹æ®èªå®ä¹Vueå
¨å±åéè¿è¡æä½ |
| | | }, |
| | | onmouseMove2(){//å±å¹é¼ æ ç§»å¨å¾ªç¯ææ¾ |
| | | clearInterval(this.global.polling); |
| | | this.global.polling=setInterval(()=>{ |
| | | this.global.pollingIndex>=2?this.global.pollingIndex=0:this.global.pollingIndex++ |
| | | this.$forceUpdate(); |
| | | },this.global.timer)//æ ¹æ®èªå®ä¹Vueå
¨å±åéè¿è¡æä½ |
| | | }, |
| | | async connects(gongneng,sql,flag,num){ |
| | | let param = new URLSearchParams(); |
| | | param.append("gongneng",gongneng); |
| | | param.append("sql",sql); |
| | | param.append("flag",flag); |
| | | param.append("anquanma","anquanma1"); |
| | | |
| | | await this.$http.post( '../mysqlInsert/mysql.jsp',param) |
| | | .then(function (response) { |
| | | if(num==1){ |
| | | result=response.data; |
| | | index = result.indexOf("[["); |
| | | if(index>-1){ |
| | | if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | }else{ |
| | | result=result.substring(index).trim() |
| | | alert(result); |
| | | window.location.reload(); |
| | | } |
| | | }else{ |
| | | alert(gongneng+"æåï¼") |
| | | window.location.reload(); |
| | | } |
| | | } |
| | | }) |
| | | .catch(function (error) { |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | }); |
| | | |
| | | }, |
| | | async loadAjxss(gongneng,sql,flag,vals){ |
| | | let param = new URLSearchParams(); |
| | | param.append("yemian","123"); |
| | | param.append("gongneng",gongneng); |
| | | param.append("sql",sql); |
| | | param.append("flag",flag); |
| | | param.append("anquanma","anquanma1"); |
| | | await this.$http.post( '../mysqlInsert/mysql.jsp',param) |
| | | .then(function (response) { |
| | | if(flag==2){ |
| | | let result=response.data; |
| | | let index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | app.$data[vals]=JSON.parse(result); |
| | | console.log(vals+":"); |
| | | console.log(app.$data[vals]); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | } |
| | | } |
| | | }) |
| | | .catch(function (error) { |
| | | if(this.global.errorFlag==0){ |
| | | this.global.errorFlag=1 |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼") |
| | | } |
| | | }); |
| | | }, |
| | | async returnloadAjxss(parameter){//fa |
| | | let param = new URLSearchParams(); |
| | | param.append("yemian","123"); |
| | | param.append("gongneng",parameter.gongneng); |
| | | param.append("sql",parameter.sql); |
| | | param.append("flag",parameter.flag); |
| | | param.append("anquanma","anquanma1"); |
| | | |
| | | let results='' |
| | | await this.$http.post( '../mysqlInsert/mysql.jsp',param) |
| | | .then(function (response) { |
| | | let result=response.data; |
| | | let index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | results=JSON.parse(result); |
| | | console.log(parameter.vals+":"); |
| | | console.log(results); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | } |
| | | }) |
| | | .catch(function (error) { |
| | | if(this.global.errorFlag==0){ |
| | | this.global.errorFlag=1 |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼") |
| | | } |
| | | }); |
| | | |
| | | return results |
| | | }, |
| | | async interValLoadAjxs(gongneng,sql,flag,vals,timer){//宿¶å¨æ¿æ°æ®æ¥é忏
é¤å®æ¶å¨ |
| | | let param = new URLSearchParams(); |
| | | param.append("yemian","å¾ªç¯æ°æ®"); |
| | | param.append("gongneng",gongneng); |
| | | param.append("sql",sql); |
| | | param.append("flag",flag); |
| | | param.append("anquanma","anquanma1"); |
| | | await this.$http.post( '../mysqlInsert/mysql.jsp',param) |
| | | .then(function (response) { |
| | | if(flag==2){ |
| | | let result=response.data |
| | | let index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | app.$data[vals]=JSON.parse(result); |
| | | //console.log(vals+":"); |
| | | //console.log(app.$data[vals]); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | } |
| | | } |
| | | }) |
| | | .catch( (error)=> { |
| | | clearInterval(timer) |
| | | if(this.global.errorFlag==0){ |
| | | this.global.errorFlag=1 |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼") |
| | | window.location.reload() |
| | | } |
| | | // if(this.global.getTableDataTimer){ |
| | | // clearInterval(this.global.getTableDataTimer) |
| | | // } |
| | | // if(this.global.getMachineElectricTimer){ |
| | | // clearInterval(this.global.getMachineElectricTimer) |
| | | // } |
| | | // if(this.global.getMachineWaterTimer){ |
| | | // clearInterval(this.global.getMachineWaterTimer) |
| | | // } |
| | | //alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼") |
| | | }); |
| | | }, |
| | | |
| | | |
| | | async getTableData(machineType){//大屿¾ç¤º æ¥è¯¢è®¢åæ°æ® |
| | | //this.global.getTableDataTimer= |
| | | let getTableDataTimer=await setInterval(()=>{ |
| | | let canshu={ |
| | | machineType:machineType,//æºå¨ç±»å |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_order_machineType_select(?,?)}~"+JSON.stringify(canshu); |
| | | this.interValLoadAjxs('è¡¨æ°æ®æ¥è¯¢',sql,2,"tableData",getTableDataTimer) |
| | | },5000) |
| | | }, |
| | | async getMachineElectric(machineType,group){//大屿¾ç¤º æ¥è¯¢æºå¨ç¨çµé |
| | | //this.global.getMachineElectricTimer= |
| | | let getMachineElectricTimer=await setInterval(()=>{ |
| | | let canshu={ |
| | | machineType:machineType,//æºå¨ç±»å |
| | | group:group //çµè¡¨ç»å« |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_electric_select(?,?,?)}~"+JSON.stringify(canshu); |
| | | this.interValLoadAjxs('大屿¾ç¤ºé»åæ¥è¯¢',sql,2,"machineElectric",getMachineElectricTimer) |
| | | },5000) |
| | | }, |
| | | async getMachineWater(machineType,group){ |
| | | //this.global.getMachineWaterTimer= |
| | | let getMachineWaterTimer=await setInterval(()=>{ |
| | | let canshu={ |
| | | machineType:machineType,//æºå¨ç±»å |
| | | group:group //水表ç»å« |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_water_select(?,?,?)}~"+JSON.stringify(canshu); |
| | | this.interValLoadAjxs('大屿¾ç¤ºé»å水表æ¥è¯¢',sql,2,"machineWater",getMachineWaterTimer) |
| | | },5000) |
| | | } |
| | | } |
| | | } |
| | | //gongneng:èªå®ä¹ï¼sqlåå¨è¿ç¨ï¼flagæ å¿(0,æ¯ç¨å¼ å·¥ä¹ååè½æå
¥ï¼1åå¨è¿ç¨æ¥è¯¢ï¼2åå¨è¿ç¨æå
¥)ï¼valsï¼vueédataåæ° |
| | | function loadAjxs(gongneng,sql,flag,vals){ |
| | | $.post("../mysqlInsert/mysql.jsp", |
| | | {"yemian":"123","gongneng":gongneng,"sql":sql,'flag':flag,'anquanma':"anquanma1"}, |
| | | function(result){ |
| | | if(flag==2){ |
| | | result=$(result).text(); |
| | | index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | app.$data[vals]=JSON.parse(result); |
| | | console.log(vals+":"); |
| | | console.log(app.$data[vals]); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | } |
| | | } |
| | | |
| | | }) |
| | | .fail(function(response) { |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | Vue.prototype.global={ |
| | | polling:null, |
| | | pollingIndex:0, |
| | | timer:30000 |
| | | } |
| | | |
| | | |
| | | let str = window.location.href.substr(window.location.href.indexOf('?') + 1) |
| | | let json = new Object() |
| | | const arr = str.split('&') |
| | | for(let i = 0; i < arr.length; i++) { |
| | | let item = arr[i].split('=') |
| | | json[item[0]] = item[1] |
| | | } |
| | | |
| | | var mixin={ |
| | | methods:{ |
| | | connects1:function(gongneng,sql,flag,num){ |
| | | $.post("../mysqlInsert/mysql.jsp", |
| | | {"gongneng":gongneng,"sql":sql,'flag':flag,'anquanma':json["anquanma"]}, |
| | | function(result){ |
| | | if(num==1){ |
| | | result=$(result).text(); |
| | | index = result.indexOf("[["); |
| | | if(index>-1){ |
| | | if(result.indexOf("[[å®å
¨ç å¼å¸¸]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | }else{ |
| | | result=result.substring(index).trim() |
| | | alert(result); |
| | | } |
| | | |
| | | }else{ |
| | | alert(gongneng+"æåï¼") |
| | | window.location.reload(); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | .fail(function(response) { |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | return false; |
| | | }); |
| | | }, |
| | | connects:function(gongneng,sql,flag,num){ |
| | | $.ajax({ |
| | | url :'../mysqlInsert/mysql.jsp', |
| | | type : "post",//ä¸å±éäºget |
| | | data:{"gongneng":gongneng,"sql":sql,'flag':flag,'anquanma':json["anquanma"]}, |
| | | async : true, |
| | | success : function(result) { |
| | | if(num==1){ |
| | | result=$(result).text(); |
| | | index = result.indexOf("[["); |
| | | if(index>-1){ |
| | | if(result.indexOf("[[å®å
¨ç å¼å¸¸]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | }else{ |
| | | result=result.substring(index).trim() |
| | | alert(result); |
| | | } |
| | | |
| | | }else{ |
| | | alert(gongneng+"æåï¼") |
| | | window.location.reload(); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | error : function(data) { |
| | | alert( 'Error: ' + "æå¡å¨æ°æ®åçé误ï¼"+data); |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | //gongneng:èªå®ä¹ï¼sqlåå¨è¿ç¨ï¼flagæ å¿(0,æ¯ç¨å¼ å·¥ä¹ååè½æå
¥ï¼1åå¨è¿ç¨æ¥è¯¢ï¼2åå¨è¿ç¨æå
¥)ï¼valsï¼vueédataåæ° |
| | | function loadAjxs1(gongneng,sql,flag,vals){ |
| | | $.post("../mysqlInsert/mysql.jsp", |
| | | {"yemian":"123","gongneng":gongneng,"sql":sql,'flag':flag,'anquanma':json["anquanma"]}, |
| | | function(result){ |
| | | if(flag==2){ |
| | | result=$(result).text(); |
| | | index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | app.$data[vals]=JSON.parse(result); |
| | | console.log(app.$data[vals]); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | event.preventDefault() |
| | | } |
| | | } |
| | | }) |
| | | .fail(function(response) { |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | event.preventDefault() |
| | | }); |
| | | } |
| | | |
| | | function loadAjxs(gongneng,sql,flag,vals){ |
| | | $.ajax({ |
| | | url :'../mysqlInsert/mysql.jsp', |
| | | type : "GET",//ä¸å±éäºget |
| | | data:{"yemian":"123","gongneng":gongneng,"sql":sql,'flag':flag,'anquanma':json["anquanma"]}, |
| | | async : true, |
| | | success : function(result) { |
| | | result=$(result).text(); |
| | | index = result.indexOf("[{"); |
| | | if(index>-1){ |
| | | result=result.substring(index).trim(); |
| | | app.$data[vals]=JSON.parse(result); |
| | | console.log(app.$data[vals]); |
| | | }else if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | event.preventDefault() |
| | | } |
| | | |
| | | }, |
| | | error : function(data) { |
| | | alert( 'Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <title>设置æé</title> |
| | | <%-- <link rel="stylesheet" href="${ctx}/pp/css/baobiaoyangshi.css"> --%> |
| | | <script src="../../js/jquery-3.4.1.min.js"></script> |
| | | <link rel="stylesheet" href="../../css/quanxiang.css"> |
| | | |
| | | <style> |
| | | body,html{ |
| | | width:99%; |
| | | height:95% |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | | </head> |
| | | <%@include file="../mysqlconnect.jsp"%> |
| | | <body style='background-color:#D5EAFF'> |
| | | |
| | | <input id="erjibianhao" name='erjibianhao' type="text" style="display:none;" value=""> |
| | | |
| | | <div class='menu' id='menu' > |
| | | <% |
| | | String id1=request.getParameter("adminid"); |
| | | |
| | | String anquanma=request.getParameter("anquanma"); |
| | | System.out.println(id1); |
| | | String cn="cn"; |
| | | int mid=0; |
| | | //è¿æ¥æ°æ®åº |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | //éè¿connectionæ°æ®åºé¾æ¥å¯¹è±¡ å建ä¸ä¸ªstatementå¯¹è±¡æ°æ®åºæä½å¯¹è±¡ |
| | | Statement stmts=con.createStatement(); |
| | | //æ§è¡sqlè¯å¥ |
| | | String anquan="select * from anquanbiao where anquanma = '"+request.getParameter("anquanma")+"' "; |
| | | ResultSet rss = stmts.executeQuery(anquan); |
| | | int coun=0; |
| | | while(rss.next()) |
| | | { |
| | | coun++; |
| | | } |
| | | if(coun==0){ |
| | | |
| | | out.print("<script type='text/javascript'>alert('请å
ç»å½åæä½');window.parent.location.href='../index.jsp'; </script>"); |
| | | } |
| | | con.close(); |
| | | } |
| | | |
| | | |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | CallableStatement cs = con.prepareCall("{call mokuaichaxun()}"); |
| | | ResultSet rs = cs.executeQuery(); |
| | | while(rs.next()) |
| | | { |
| | | mid=rs.getInt(1); |
| | | String mokuainame=rs.getString(2); |
| | | out.println("<div class='menu_title'>"+mokuainame+"<span class='indicator' id='indicator'>â¼</span></div><ul class='test'>"); |
| | | |
| | | CallableStatement css = con.prepareCall("{call quanxiancaidanchaxun(?,?)}"); |
| | | |
| | | css.setInt(1, mid); |
| | | css.setString(2, cn); |
| | | ResultSet rss = css.executeQuery(); |
| | | while(rss.next()){ |
| | | String caidanname=rss.getString(1); |
| | | String yemian=rss.getString(2); |
| | | String caidanid=rss.getString(3); |
| | | |
| | | //out.println("<li><a onclick='tiaoz('"+yemian+"')' >"+caidanname+"</a></li>"); |
| | | |
| | | |
| | | /* out.println("<li onclick='goUrl('shezhi2.jsp?erjibianhao="+caidanid+"')' >"+caidanname+"</li>"); */ |
| | | |
| | | out.print("<li class='admin' id='admin' onclick='goUrl(\"shezhi2.jsp?adminid="+request.getParameter("adminid")+"&yuyan="+request.getParameter("yuyan")+"&anquanma="+request.getParameter("anquanma")+"&erjibianhao1="+caidanid+"\",this)'>"+caidanname+" </li>"); |
| | | out.println("<li class='item_divider'></li>"); |
| | | } |
| | | out.println("</ul>"); |
| | | |
| | | /* */ |
| | | } |
| | | con.close(); |
| | | |
| | | |
| | | } |
| | | %> |
| | | |
| | | |
| | | |
| | | <script> |
| | | //帮å©è·³è½¬ |
| | | |
| | | //æé跳转 |
| | | /* function goUrl(url, str,e) { |
| | | $('.test li').css('color','black'); |
| | | $(e).css('color','white'); |
| | | window.parent.document.getElementById("gongneng").src = url; |
| | | $("#toptitile").html(str); |
| | | } |
| | | */ |
| | | //å±ç¤ºæ¨¡åå表å¨ç»ææ |
| | | $(function() { |
| | | //1.è·åèåå
ç´ |
| | | var dv = $(".menu div"); |
| | | dv.click(function() { |
| | | |
| | | var die = $(this); |
| | | //2.è·åspançidåç§° |
| | | var jiantou = $(this).children("span").attr("id"); |
| | | if (die.next("ul").is(":hidden")) { |
| | | $("ul").hide(500); |
| | | die.next("ul").show(500); |
| | | $('#' + jiantou + '').animate({}, function() { |
| | | $(this).css({ |
| | | //æè½¬è§åº¦ |
| | | /* 'transform': 'rotate(90deg)' */ |
| | | }); |
| | | }) |
| | | } else { |
| | | //3.ç¹å»éèèå |
| | | die.next("ul").hide(500); |
| | | $('#' + jiantou + '').animate({}, function() { |
| | | $(this).css({ |
| | | 'transform': 'rotate(0deg)' |
| | | }); |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | function goUrl(obj) { |
| | | |
| | | window.parent.document.getElementById("gongneng").src = obj; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="javax.swing.text.html.HTML"%> |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html > |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <title>æé设置</title> |
| | | |
| | | <style> |
| | | |
| | | body,html{ |
| | | width:99%; |
| | | height:95% |
| | | } |
| | | |
| | | |
| | | #shangpin { |
| | | width: 99%; |
| | | margin-left: 10px; |
| | | |
| | | margin-right: 10px; |
| | | border-collapse:separate; |
| | | border-spacing: 0px; |
| | | } |
| | | |
| | | #shangpin input { |
| | | width: 97%; |
| | | height: 20px; |
| | | text-align: center; |
| | | outline: none; |
| | | |
| | | |
| | | } |
| | | #tbody1 input |
| | | { |
| | | height:20px; width:100%; overflow:hidden; border: 0; |
| | | outline: 0;readyOnly:readyOnly; |
| | | |
| | | } |
| | | |
| | | #menu{ |
| | | position:absolute; |
| | | top:55px; |
| | | } |
| | | |
| | | |
| | | #shangpin{ |
| | | left:190px; |
| | | position:absolute; |
| | | top:55px; |
| | | } |
| | | |
| | | #xinzeng{ |
| | | right:290px; |
| | | position:absolute; |
| | | top:55px; |
| | | } |
| | | |
| | | |
| | | #fanhui{ |
| | | right:100px; |
| | | position:absolute; |
| | | top:55px; |
| | | } |
| | | </style> |
| | | <script src="../../js/jquery-3.4.1.min.js"></script> |
| | | <link rel="stylesheet" href="../../css/quanxiang.css"> |
| | | <link rel="shortcut icon" href="../../img/3.ico" /> |
| | | |
| | | </head> |
| | | |
| | | |
| | | <%@include file="../mysqlconnect.jsp"%> |
| | | <body style='background-color:#D5EAFF'> |
| | | |
| | | |
| | | <form action="" method="post" > |
| | | |
| | | <!--主页é¢å·¦ä¾§èåæ å®ç°--> |
| | | |
| | | <div class='menu' id='menu' > |
| | | <% |
| | | String adminid=request.getParameter("adminid"); |
| | | String erjibianhao=request.getParameter("erjibianhao1"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | System.out.println(adminid); |
| | | String cn="cn"; |
| | | int mid=0; |
| | | //è¿æ¥æ°æ®åº |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | //éè¿connectionæ°æ®åºé¾æ¥å¯¹è±¡ å建ä¸ä¸ªstatementå¯¹è±¡æ°æ®åºæä½å¯¹è±¡ |
| | | Statement stmts=con.createStatement(); |
| | | //æ§è¡sqlè¯å¥ |
| | | String anquan="select * from anquanbiao where anquanma = '"+request.getParameter("anquanma")+"' "; |
| | | ResultSet rss = stmts.executeQuery(anquan); |
| | | int coun=0; |
| | | while(rss.next()) |
| | | { |
| | | coun++; |
| | | } |
| | | if(coun==0){ |
| | | |
| | | out.print("<script type='text/javascript'>alert('请å
ç»å½åæä½');window.parent.location.href='../index.jsp'; </script>"); |
| | | } |
| | | con.close(); |
| | | } |
| | | |
| | | |
| | | |
| | | %> |
| | | |
| | | |
| | | </form> |
| | | |
| | | </div> |
| | | <form action="" method="post" > |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <div id="chuanshu" style="display:none;"> |
| | | <input type="text" > |
| | | <input type="text" name="id2"> |
| | | <input type="text" name='mid'> |
| | | <input type="text" name='caidanid'> |
| | | <input type="text" name='gongnengid' > |
| | | <input type="text" name='zhuangtai' > |
| | | |
| | | |
| | | </div> |
| | | <div id="data" class='data' align="center"> |
| | | |
| | | <table style='width:50%;' id="shangpin" border="1" align="center" class='shangpin'> |
| | | <thead> |
| | | <tr> |
| | | <th style="width:2px;">åºå·</th> |
| | | |
| | | <th style="width:2px;display:none;">ç¨æ·åid</th> |
| | | <th style="width:30px;display:none;">模åid</th> |
| | | <th style="width:30px;display:none;">èåid</th> |
| | | <th style="width:30px;display:none;">åè½id</th> |
| | | <th style="width:30px;" >éæ© <input style="width:15px;right:500px;position:absolute;" type="checkbox" id='all' > </th> |
| | | <th style="width:30px;">ç¨æ·å</th> |
| | | <th style="width:30px;">åè½</th> |
| | | <th style="width:30px;display:none;">ç¶æ</th> |
| | | |
| | | |
| | | </tr> |
| | | </thead> |
| | | |
| | | <tbody id='tbody1'> |
| | | |
| | | <% |
| | | |
| | | String erjibianhao1=request.getParameter("erjibianhao1"); |
| | | String caidanid=request.getParameter("erjibianhao1"); |
| | | |
| | | |
| | | //è£
è½½ä¸ä¸ªç±»å¹¶ä¸å¯¹å
¶è¿è¡å®ä¾åçæä½ |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | //è°ç¨åå¨è¿ç¨ |
| | | CallableStatement cs = con.prepareCall("{call quanxiangongengchaxun(?,?)}"); |
| | | |
| | | /* if(erjibianhao1==""){ |
| | | cs.setString(2, erjibianhao1); |
| | | |
| | | }else{ |
| | | cs.setString(2, erjibianhao1); |
| | | |
| | | } */ |
| | | cs.setString(1, adminid); |
| | | cs.setString(2, erjibianhao1); |
| | | //å¤æè®¢åæ¥ææ¯å¦ä¸ºnull |
| | | ResultSet rs = cs.executeQuery(); |
| | | |
| | | int i=1; |
| | | while(rs.next()) |
| | | { |
| | | if(i%2!=0){ |
| | | out.println("<tr class='one1' >"); |
| | | } |
| | | else |
| | | { |
| | | out.println("<tr class='double1' >"); |
| | | } |
| | | out.print("<td style='text-align:center;'><input type='text' readOnly='readOnly' style=' background:#D5EAFF;border:none;' value='"+i+"'></td>"); |
| | | out.print("<td style='display:none;'><input type='text' value='"+adminid+"'></td>"); |
| | | out.print("<td style='display:none;'><input type='text' value='"+rs.getString(5)+"'></td>"); |
| | | out.print("<td style='display:none;'><input type='text' value='"+caidanid+"'></td>"); |
| | | out.print("<td style='display:none;'><input type='text' value='"+rs.getString(1)+"'></td>"); |
| | | out.print("<td><input type='checkbox' onclick='join(this)'Â class='checkbox_1' id='' value='0' ></td>"); |
| | | out.print("<td><input type='text' readOnly='readOnly' style=' background:#D5EAFF;border:none;' value='"+rs.getString(3)+"'></td>"); |
| | | out.print("<td ><input type='text' readOnly='readOnly' style=' background:#D5EAFF;border:none;' value='"+rs.getString(2)+"'></td>"); |
| | | out.print("<td style='display:none;'><input type='text' class='zhuangtai' value='"+rs.getString(4)+"'></td>"); |
| | | out.println("</tr>"); |
| | | i++; |
| | | |
| | | } |
| | | |
| | | con.close(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | %> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <% |
| | | |
| | | try{ |
| | | String id3 =request.getParameter("id2"); |
| | | String mid2 =request.getParameter("mid"); |
| | | String gongnengid2 =request.getParameter("gongnengid"); |
| | | String caidanid1 =request.getParameter("caidanid"); |
| | | String zhuangtai2 =request.getParameter("zhuangtai"); |
| | | if(request.getParameter("tj")!=null){ |
| | | //è£
è½½ä¸ä¸ªç±»å¹¶ä¸å¯¹å
¶è¿è¡å®ä¾åçæä½ |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | |
| | | CallableStatement cs = con.prepareCall("{call shezhiquanxian(?,?,?,?,?,?,?,?)}"); |
| | | |
| | | cs.setString(1, id3); |
| | | |
| | | cs.setString(2, mid2); |
| | | cs.setString(3, caidanid1); |
| | | cs.setString(4, gongnengid2); |
| | | cs.setString(5, zhuangtai2); |
| | | cs.setString(6, request.getRemoteAddr()); |
| | | cs.setString(7, request.getParameter("adminid")); |
| | | |
| | | cs.registerOutParameter(8 , java.sql.Types.INTEGER); |
| | | cs.execute(); |
| | | int fanhui=cs.getInt(8); |
| | | if(fanhui==5000){ |
| | | out.print("<script type='text/javascript'>alert('设置æéæå!');window.history.back(-1); </script>"); |
| | | |
| | | }else{ |
| | | out.print("<script type='text/javascript'>alert('设置æé失败!');window.history.back(-1); </script>"); |
| | | } |
| | | con.close(); |
| | | } |
| | | } |
| | | }catch(Exception e){ |
| | | out.print("<script type='text/javascript'>alert('设置æé失败,åºç°æªç¥é误ï¼'); console.log(\""+ e.toString() +"\")</script>"); |
| | | } |
| | | |
| | | %> |
| | | |
| | | |
| | | <tbody> |
| | | </table> |
| | | <div id="bc"> |
| | | <button type="submit" name="tj" style="float: right;width: 10%; height: 30px;;outline: 0;border: 0; background-color:#5CADFE;" id="xinzeng" onclick="zhenghe()" value='0' >ç¡®å®</button> |
| | | </div> |
| | | |
| | | |
| | | <div id="fh"> |
| | | <button id='fanhui' type="button" style="float: right;width: 10%; height: 30px;;outline: 0;border: 0; background-color:#5CADFE;" onClick="window.history.back(-1);" value='0' >è¿å</button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <script> |
| | | |
| | | |
| | | |
| | | window.onload=function() |
| | | { |
| | | |
| | | |
| | | |
| | | var btn = document.getElementById("all"); |
| | | btn.onclick = function() { |
| | | var flag = this.checked; |
| | | var items = document.getElementsByClassName("checkbox_1"); |
| | | for (var i = 0; i < items.length; i++) { |
| | | items[i].checked = flag; |
| | | items[i].value=1; |
| | | //å°ææitemçç¶æè®¾ä¸ºå
¨éæé®çç¶æ |
| | | if(items[i].checked==false){ |
| | | items[i].value=0; |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | var items = document.getElementsByClassName("checkbox_1"); |
| | | for (var i = 0; i < items.length; i++) { |
| | | items[i].onclick = function() {//对æ¯ä¸ªitem设置ç¹å» |
| | | var number = 0;//è®°å½éä¸çä¸ªæ° |
| | | for (var j = 0; j < items.length; j++) { |
| | | if (items[j].checked) { |
| | | number++; |
| | | items[j].value=1; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | for (var j = 0; j < items.length; j++) { |
| | | if(items[j].checked==false){ |
| | | items[j].value=0; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | document.getElementById("all").checked = (items.length == number); |
| | | } |
| | | } |
| | | |
| | | |
| | | var cells=$('#shangpin').find('tr'); |
| | | for(var i=1;i<cells.length;i++) |
| | | { |
| | | |
| | | var zhuangtai= $('#shangpin').find("tr").eq(i).find("input[class='zhuangtai']").val(); |
| | | const check=$('#shangpin').find('tr').eq(i).find('.checkbox_1'); |
| | | const lls=($('#shangpin').find("tr").eq(i).find("input[class='checkbox_1']").val()); |
| | | if(zhuangtai == 1){ |
| | | check[0].checked=true; |
| | | check[0].value=1; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /* $('#all').click(function(){ |
| | | ãããã $('.shangpin input').prop('checked',$(this).prop('checked')); |
| | | |
| | | }); |
| | | $('.shangpin input').click(function(){ |
| | | //each ä¾¿å©æ¯ä¸ä¸ªå
ç´ ï¼è®©å
¶æ§è¡è¯¥å½æ° |
| | | $('.shangpin input').each(function(){ |
| | | if(!$(this).prop('checked')){ |
| | | $('#all').prop('checked',false); |
| | | |
| | | //æä¸ä¸ªä¸æ»¡è¶³å°± è·³åºè¯¥å¾ªç¯ï¼é¿å
æ§è¡ä¸é¢ |
| | | return false; |
| | | } |
| | | }) |
| | | }) */ |
| | | |
| | | |
| | | /* |
| | | var cksAll=document.getElementById('all'); |
| | | var cks = document.getElementById('shangpin').getElementsByClassName("checkbox_1"); |
| | | cksAll.onclick=function() { |
| | | for (var i = 0; i < cks.length; i++) { |
| | | cks[i].checked=this.checked; |
| | | cks[i].value=1; |
| | | } |
| | | }; |
| | | var cks = document.getElementById('shangpin').getElementsByClassName("checkbox_1"); |
| | | for(var i=0;i<cks.length;i++){ |
| | | |
| | | |
| | | cks[i].onclick=function(){ |
| | | |
| | | |
| | | var flag=true; |
| | | for(var j=0;j<cks.length;j++){ |
| | | |
| | | cks[j].value=0; |
| | | if(!cks[j].checked){ |
| | | flag=false; |
| | | |
| | | |
| | | break; |
| | | } |
| | | } |
| | | cksAll.checked=flag; |
| | | |
| | | }; |
| | | } */ |
| | | |
| | | |
| | | |
| | | function zhenghe() |
| | | { |
| | | var tiaoshu=$('#data').find('tr').length; |
| | | |
| | | var lieshu=$("#data").find('th').length ; |
| | | var cars = []; |
| | | cars[0]=1; |
| | | var value1=document.getElementById('shangpin'); |
| | | |
| | | for(var i=0;i<lieshu;i++) |
| | | { |
| | | cars[i]=''; |
| | | |
| | | for(var j=1;j<tiaoshu;j++) |
| | | { |
| | | |
| | | |
| | | /* alert(value1.rows[j].cells[i].getElementsByTagName("input")[0].value); */ |
| | | var value2=value1.rows[j].cells[i].getElementsByTagName("input")[0].value; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | cars[i]+=value2+'~'; |
| | | |
| | | /* alert('i:'+i+'j:'+j); */ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | var chuanshu_count=$("#chuanshu").find('input'); |
| | | for(p=0;p<chuanshu_count.length;p++) |
| | | { |
| | | chuanshu_count[p].value=cars[p]; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | function join(e){ |
| | |     if(e.checked==true ){ |
| | | Â Â Â Â Â Â Â Â e.value=1; |
| | | Â Â Â Â Â Â Â Â }else{ |
| | | e.value=0; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /* function tiaoz(n){ |
| | | n=n+window.parent.location.search.substr(1); |
| | | window.open(n);} */ |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <% |
| | | request.setCharacterEncoding("UTF-8"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html; charset=utf-8"); |
| | | %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <title>åç»</title> |
| | | <link rel="shortcut icon" href="../img/3.ico" /> |
| | | <style> |
| | | #top { |
| | | background-image: linear-gradient(to right, #C6E2FF, #C6E2FF); |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | #left { |
| | | background-image: linear-gradient(#e5ecf7, #beceea); |
| | | border-radius: 0px 2px 2px 0px; |
| | | } |
| | | html,body{ |
| | | |
| | | height:99%; |
| | | width:100%; |
| | | margin:0; |
| | | padding:0 |
| | | } |
| | | |
| | | |
| | | </style> |
| | | </head> |
| | | <body style='background-color:#D5EAFF' > |
| | | <%@include file="mysqlconnect.jsp"%> |
| | | <% |
| | | |
| | | String xingming=request.getParameter("xingming"); |
| | | String dengji=request.getParameter("dengji"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | String adminid=request.getParameter("adminid"); |
| | | String yuyan=request.getParameter("yuyan"); |
| | | //è¿æ¥æ°æ®åº |
| | | |
| | | //è£
è½½ä¸ä¸ªç±»å¹¶ä¸å¯¹å
¶è¿è¡å®ä¾åçæä½ |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | //éè¿connectionæ°æ®åºé¾æ¥å¯¹è±¡ å建ä¸ä¸ªstatementå¯¹è±¡æ°æ®åºæä½å¯¹è±¡ |
| | | Statement stmts=con.createStatement(); |
| | | //æ§è¡sqlè¯å¥ |
| | | String anquan="select * from anquanbiao where anquanma = '"+anquanma+"' "; |
| | | ResultSet rss = stmts.executeQuery(anquan); |
| | | int coun=0; |
| | | while(rss.next()) |
| | | { |
| | | coun++; |
| | | } |
| | | /* if(true){ */ |
| | | if(coun!=0){ |
| | | out.println("<iframe id='top' height='10%' width='100%' src='shuoming.jsp?adminid="+adminid+"&xingming="+xingming+"&dengji="+dengji+"&anquanma="+anquanma+"&yuyan="+yuyan+"' frameborder='0'></iframe>"); |
| | | out.println("<iframe id='left' height='90%' width='13%' style='float: left;overflow-y: hidden;' src='quanxian.jsp?adminid="+adminid+"&anquanma="+anquanma+"&yuyan="+yuyan+"' frameborder='0'></iframe>"); |
| | | |
| | | } |
| | | else{ |
| | | out.print("<script type='text/javascript'>alert('请å
ç»å½åæä½');window.parent.location.href='index.jsp';</script>"); |
| | | } |
| | | |
| | | } |
| | | |
| | | %> |
| | | <iframe id='main' src='machinelistcontent.jsp?adminid="+adminid+"&xingming="+xingming+"&dengji="+dengji+"&anquanma="+anquanma+"&yuyan="+yuyan+"' style="width:87%;height:90%" frameborder='0'></iframe> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="ng.db.DBHelper"%> |
| | | <%@page import="javax.swing.text.html.HTML"%> |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <% |
| | | request.setCharacterEncoding("UTF-8"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html; charset=utf-8"); |
| | | %> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <style type="text/css"> |
| | | .btn{ |
| | | margin-top: -50px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <title>åç»ç»å½</title> |
| | | <link rel="stylesheet" href="../css/login.css"> |
| | | <link rel="shortcut icon" href="../img/3.ico" /> |
| | | </head> |
| | | |
| | | <%@include file="mysqlconnect.jsp"%> |
| | | <% |
| | | String yuyan1="cn"; |
| | | String yuyan2=request.getParameter("yuyan"); |
| | | if(yuyan2==""||yuyan2==null){ |
| | | |
| | | }else{ |
| | | yuyan1=yuyan2; |
| | | } |
| | | String yemian="index.jsp"; |
| | | String[] group=new String[6]; |
| | | //è¿æ¥æ°æ®åº |
| | | |
| | | //è£
è½½ä¸ä¸ªç±»å¹¶ä¸å¯¹å
¶è¿è¡å®ä¾åçæä½ |
| | | Class.forName(driverClass);{ |
| | | Connection con1=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | CallableStatement cs = con1.prepareCall("{call yuyan(?,?)}"); |
| | | cs.setString(1, yemian); |
| | | cs.setString(2, yuyan1); |
| | | ResultSet rs = cs.executeQuery(); |
| | | int i=0; |
| | | while(rs.next()) |
| | | { |
| | | group[i]=rs.getString(1); |
| | | i++; |
| | | } |
| | | } |
| | | %> |
| | | |
| | | <body style='background-color:#D5EAFF' onkeypress="handleKey()" onload="document.form1.userName.focus()"> |
| | | |
| | | <div class="content"> |
| | | <div align="center"> |
| | | <img src='../img/2.ico' style='top:8px;left:2px;width:150px; height:100px;' /> |
| | | </div> |
| | | <form method="post" action="" name="form1"> |
| | | <!-- <img src="../img/2.ico" style="align:middle; top:10;left:10;width:100px; height: 60px;" /> --> |
| | | <!--ç»å½é¡µé¢ä¸æéæ©è¯è¨åè½çå®ç°--> |
| | | |
| | | <div id="box"> |
| | | |
| | | <div style="width: 650px;height: 30px;background-color:white; "> |
| | | |
| | | <div style="float: left; height: 30px;line-height: 30px; width:100px;background-color: white;text-align: center;"> |
| | | |
| | | <%-- <a href='#'><% out.println(group[2]); %></a> --%> |
| | | </div> |
| | | <div style="height:30px;width:550px;line-height: 30px; "> |
| | | <%-- <a href="#" style="margin-left: 20px;color: white;"> |
| | | <% out.println(group[3]); %> |
| | | </a> --%> |
| | | <SELECT NAME="language" name="language" id="language" onchange="changeLanguage()"> |
| | | <option value="cn">Chinese</option> |
| | | <option value="en">English</option> |
| | | </SELECT> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <h1> |
| | | åç»èªå¨åMES管çç³»ç» |
| | | <%-- <% out.println(group[4]); %> --%> |
| | | </h1> |
| | | </div> |
| | | <div> |
| | | |
| | | <table> |
| | | <tr> |
| | | <td> |
| | | <%-- <% out.println(group[0]); %> --%> |
| | | </td> |
| | | <td> |
| | | <img src="../img/user.png" width="20" height="20" alt=""/> |
| | | <input style="height: 32px; width: 280px;line-height: 20px;" type="text" placeholder='请è¾å
¥æ¨çè´¦å·' name="userName" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <%-- <% out.println(group[1]); %> --%> |
| | | </td> |
| | | <td> |
| | | <img src="../img/pwd.png" width="18" height="20" alt=""/> |
| | | <input style="height: 32px; width: 280px;line-height: 20px;" clearable placeholder='请è¾å
¥æ¨çå¯ç ' type="password" name="pwd" /> |
| | | <!-- <div class="inline label account"> |
| | | <img src="../img/account.png"> |
| | | </div> --> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td> |
| | | |
| | | </td> |
| | | <td> |
| | | <input style="display:none; height: 10px;line-height: 10px;" type="text" name="yuyan" value="cn" /> |
| | | <!-- <div class="custom-control custom-checkbox small"> |
| | | <input type="checkbox" class="custom-control-input" id="customCheck"> |
| | | <label class="custom-control-label" for="customCheck">è®°ä½å¯ç </label> |
| | | |
| | | </div> --> |
| | | </td> |
| | | |
| | | </tr> |
| | | <tr> |
| | | <td></td> |
| | | <td><input id="boxcip" style="display:none;height: 10px;line-height: 10px;" type="text" name="cip" /></td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | |
| | | </td> |
| | | <td> |
| | | |
| | | <button type='submit' class='btn' name='dl' style='border:none;width: 60px;height: 30px;line-height: 15px;background-color:rgb(100, 184, 236) ;color: white;' /><% out.println(group[2]); %></button> |
| | | |
| | | <button type='button' name='zc' class='btn' onclick="zhuce()" style='border:none;width: 60px;height: 30px;line-height: 15px;background-color:rgb(100, 184, 236) ;color: white;' /><% out.println(group[3]); %></button> |
| | | </td> |
| | | <td> |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | |
| | | <script type="text/javascript"> |
| | | function changeLanguage(){ |
| | | var what=document.getElementById("language").value; |
| | | window.location.href="index.jsp?yuyan="+what+""; |
| | | } |
| | | window.onload=function(){ |
| | | function GetQueryString(yuyan) { |
| | | var reg = new RegExp("(^|&)" + yuyan + "=([^&]*)(&|$)","i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r!=null){ |
| | | var a = unescape(r[2]); |
| | | if(a=="en"){ |
| | | var what=document.getElementById("language"); |
| | | var opts=what.getElementsByTagName("option"); |
| | | opts[1].selected=true; |
| | | } |
| | | }else{ |
| | | return null; |
| | | } |
| | | } |
| | | GetQueryString("yuyan"); |
| | | } |
| | | |
| | | function zhuce() { |
| | | |
| | | window.open("./admin/register.jsp"); |
| | | } |
| | | </script> |
| | | |
| | | <% |
| | | |
| | | String uname=request.getParameter("userName"); |
| | | String pwd=request.getParameter("pwd"); |
| | | String yuyan=request.getParameter("yuyan"); |
| | | String ym="Login.jsp"; |
| | | String tip=request.getLocalAddr() ; |
| | | int fanhui=0; |
| | | int fanhui1=0; |
| | | String xingming=""; |
| | | String aid=""; |
| | | String anquanma=""; |
| | | String dengji=""; |
| | | String bumen=""; |
| | | |
| | | |
| | | |
| | | //è£
è½½ä¸ä¸ªç±»å¹¶ä¸å¯¹å
¶è¿è¡å®ä¾åçæä½ |
| | | Class.forName(driverClass);{ |
| | | if(uname!=null&&pwd!=null){ |
| | | if(uname!=""&&pwd!=""){ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | CallableStatement cs = con.prepareCall("{call denglu(?,?,?,?,?,?,?,?)}"); |
| | | cs.setString(1, uname); |
| | | cs.setString(2, pwd); |
| | | cs.setString(3, ym); |
| | | cs.setString(4, tip); |
| | | cs.registerOutParameter( 5 , java.sql.Types.INTEGER); |
| | | cs.registerOutParameter( 6 , java.sql.Types.INTEGER); |
| | | cs.registerOutParameter( 7 , java.sql.Types.INTEGER); |
| | | cs.registerOutParameter( 8 , java.sql.Types.INTEGER); |
| | | |
| | | cs.execute(); |
| | | fanhui=cs.getInt(5); |
| | | xingming=cs.getString(6); |
| | | aid=cs.getString(7); |
| | | bumen=cs.getString(8); |
| | | |
| | | |
| | | |
| | | |
| | | if(fanhui==5000){ |
| | | CallableStatement css = con.prepareCall("{call anquan(?,?,?,?,?,?)}"); |
| | | css.setString(1, aid); |
| | | css.setString(2, tip); |
| | | css.setString(3, ym); |
| | | css.registerOutParameter( 4 , java.sql.Types.INTEGER); |
| | | css.registerOutParameter( 5 , java.sql.Types.INTEGER); |
| | | css.registerOutParameter( 6 , java.sql.Types.INTEGER); |
| | | css.execute(); |
| | | fanhui1=css.getInt(4); |
| | | anquanma=css.getString(5); |
| | | dengji=css.getString(6); |
| | | if(fanhui1==5000){ |
| | | out.print("<script type='text/javascript'>localStorage.clear();window.location.href='bdg.jsp?loginname="+uname+"&xingming="+xingming+"&bumen="+bumen+"&dengji="+dengji+"&anquanma="+anquanma+"&adminid="+aid+"&yuyan="+yuyan+"';</script>"); |
| | | } |
| | | else{ |
| | | out.print("<script type='text/javascript'>alert('å®å
¨ç æ æ')</script>"); |
| | | } |
| | | } |
| | | else{ |
| | | out.print("<script type='text/javascript'>alert('ç¨æ·åæè
å¯ç é误')</script>"); |
| | | } |
| | | //å
³éè¿æ¥ |
| | | |
| | | con.close(); |
| | | } |
| | | |
| | | else{ |
| | | out.print("<script type='text/javascript'>alert('ä¸è½ä¸ºç©º')</script>"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | %> |
| | | |
| | | </html> |
| New file |
| | |
| | | <%@page import="builder.Manager"%> |
| | | <%@page import="ng.db.*"%> |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| | | <script src="../js/main.js"></script> |
| | | <style type="text/css"> |
| | | <style> |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: oldlace; |
| | | } |
| | | </style> |
| | | |
| | | </style> |
| | | <title>Insert title here</title> |
| | | </head> |
| | | <body> |
| | | <% |
| | | String a=null; |
| | | try{ |
| | | a=Manager.getDevice().toString(); |
| | | } |
| | | catch(Exception e){ |
| | | a="[{}]"; |
| | | } |
| | | |
| | | |
| | | %> |
| | | <div id="app" style="width:100%"> |
| | | <el-table border |
| | | :data="machine" |
| | | height='100%' |
| | | style="width: 100%;" |
| | | :cell-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | label="设å¤"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ip" |
| | | label="IP"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="port" |
| | | label="port"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="st" |
| | | label="ç¶æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="count" |
| | | label="è°ç¨æ¬¡æ°"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <script type="text/javascript"> |
| | | Vue.prototype.$echarts = echarts |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | machine:<%= a%>, |
| | | }, |
| | | methods:{ |
| | | tableRowClassName({row,column,rowIndex,columnIndex}) { |
| | | |
| | | if (row['st'] == 'æªè¿æ¥' && columnIndex==3 ) { |
| | | return 'success-row'; |
| | | }else{ |
| | | return ''; |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | // console.log(app.$data.machine); |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="builder.Manager"%> |
| | | <%@page import="ng.db.*"%> |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| | | <script src="../static/js/ng/tb-2.0.js"></script> |
| | | |
| | | <title>Insert title here</title> |
| | | </head> |
| | | <body> |
| | | <div id="tab" style="display:width:100%"> |
| | | </div> |
| | | <script type="text/javascript"> |
| | | var a= |
| | | <% |
| | | // Manager.appStart(null); |
| | | out.print( Manager.getDevice().toString()); |
| | | |
| | | %>; |
| | | console.log(a); |
| | | |
| | | var opt={ |
| | | table:{ |
| | | trStyles:["background-color:none","background-color:lightblue"], |
| | | style:"width:100%", |
| | | border:1, |
| | | notify:function(message){ |
| | | if(message.data.st!="å·²è¿æ¥"){ |
| | | |
| | | message.tr.children[3].style["color"]="red"; |
| | | } |
| | | } |
| | | }, |
| | | columns:[ |
| | | { |
| | | name:"设å¤å", |
| | | binding:"name" |
| | | |
| | | }, |
| | | |
| | | { |
| | | name:"IP", |
| | | binding:"ip" |
| | | |
| | | }, |
| | | { |
| | | name:"port", |
| | | binding:"port", |
| | | } |
| | | |
| | | , |
| | | { |
| | | name:"ç¶æ", |
| | | binding:"st" |
| | | } |
| | | , |
| | | { |
| | | name:"è°ç¨æ¬¡æ°", |
| | | binding:"count" |
| | | } |
| | | |
| | | |
| | | ] |
| | | }; |
| | | |
| | | var tab=createTable(document.getElementById("tab"),opt); |
| | | tab.update(a); |
| | | tab.notify(); |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html > |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| | | <title>åç»</title> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <link rel="stylesheet" href="../css/quanxiang.css"> |
| | | <link rel="shortcut icon" href="../img/3.ico" /> |
| | | <script> |
| | | //å±ç¤ºæ¨¡åå表å¨ç»ææ |
| | | $(function() { |
| | | //1.è·åèåå
ç´ |
| | | var dv = $(".menu div"); |
| | | dv.click(function() { |
| | | |
| | | var die = $(this); |
| | | //2.è·åspançidåç§° |
| | | var jiantou = $(this).children("span").attr("id"); |
| | | if (die.next("ul").is(":hidden")) { |
| | | $("ul").hide(500); |
| | | die.next("ul").show(500); |
| | | $('#' + jiantou + '').animate({}, function() { |
| | | $(this).css({ |
| | | //æè½¬è§åº¦ |
| | | /* 'transform': 'rotate(90deg)' */ |
| | | }); |
| | | }) |
| | | } else { |
| | | //3.ç¹å»éèèå |
| | | die.next("ul").hide(500); |
| | | $('#' + jiantou + '').animate({}, function() { |
| | | $(this).css({ |
| | | 'transform': 'rotate(0deg)' |
| | | }); |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | </script> |
| | | </head> |
| | | |
| | | |
| | | <%@include file="mysqlconnect.jsp"%> |
| | | <body style='background-color:#D5EAFF;overflow-y:hidden'> |
| | | <!--主页é¢å·¦ä¾§èåæ å®ç°--> |
| | | |
| | | <div class="menu" > |
| | | <% |
| | | String id=request.getParameter("adminid"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | System.out.println(id); |
| | | String cn=request.getParameter("yuyan"); |
| | | int mid=0; |
| | | //è¿æ¥æ°æ®åº |
| | | |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | CallableStatement cs = con.prepareCall("{call mokuai(?,?,?)}"); |
| | | id=request.getParameter("adminid"); |
| | | cn="cn"; |
| | | cs.setString(1, id); |
| | | cs.setString(2, cn); |
| | | cs.setString(3, request.getRemoteAddr()); |
| | | ResultSet rs = cs.executeQuery(); |
| | | while(rs.next()) |
| | | { |
| | | |
| | | mid=rs.getInt(1); |
| | | String mokuainame=rs.getString(2); |
| | | out.println("<div class='menu_title'>"+mokuainame+"<span class='indicator' id='indicator'>â¼</span></div><ul class='test'>"); |
| | | |
| | | CallableStatement css = con.prepareCall("{call caidan(?,?,?,?)}"); |
| | | css.setString(1, id); |
| | | css.setInt(2, mid); |
| | | css.setString(3, cn); |
| | | css.setString(4, request.getRemoteAddr()); |
| | | ResultSet rss = css.executeQuery(); |
| | | while(rss.next()){ |
| | | String caidanname=rss.getString(1); |
| | | String yemian=rss.getString(2); |
| | | //out.println("<li><a onclick='tiaoz('"+yemian+"')' >"+caidanname+"</a></li>"); |
| | | out.println("<li onclick="+"tiaoz('"+yemian+"',"+mid+")"+" >"+caidanname+"</li>"); |
| | | out.println("<li class='item_divider'></li>"); |
| | | } |
| | | out.println("</ul>"); |
| | | |
| | | |
| | | } |
| | | con.close(); |
| | | |
| | | |
| | | } |
| | | %> |
| | | |
| | | </div> |
| | | <script> |
| | | window.onload=function(){ |
| | | if(localStorage.getItem("newPage")!=null){ |
| | | let url=localStorage.getItem("newPage"); |
| | | url=url+'&'+window.parent.location.search.substr(1); |
| | | window.parent.document.getElementById("main").src = url; |
| | | } |
| | | |
| | | } |
| | | function tiaoz(n,mid){ |
| | | if(mid!=90){ |
| | | localStorage.setItem("newPage",n); |
| | | } |
| | | |
| | | n=n+'&'+window.parent.location.search.substr(1); |
| | | |
| | | |
| | | if (mid==90) { |
| | | window.open(n, '_blank'); // 卿°çªå£ä¸æå¼æå® URL |
| | | }else{ |
| | | window.parent.document.getElementById("main").src = n; |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="builder.Manager"%> |
| | | <%@page import="builder.ThreadHttpServer"%> |
| | | <%@page import="toTcp.TcpMain"%> |
| | | <%@include file="../mysqlInsert/mysql_connect.jsp"%> |
| | | <% |
| | | ThreadHttpServer.mains(); |
| | | //TcpMain.getElectric(); |
| | | //Manager.appStart(new String[]{url,user,password }); |
| | | |
| | | //response.sendRedirect("bdg.jsp"); |
| | | %> |
| New file |
| | |
| | | <%@page import="ng.db.*,java.util.LinkedHashMap,java.util.ArrayList,java.util.LinkedList"%> |
| | | <%@page import="com.alibaba.fastjson.JSON,com.alibaba.fastjson.JSONObject,com.alibaba.fastjson.JSONArray,com.alibaba.fastjson.parser.Feature"%> |
| | | <% |
| | | if(request.getParameter("ip")!=null ){ |
| | | |
| | | try{ |
| | | ArrayList<String> result=getFtpData.getImg(request.getParameter("ip")); |
| | | LinkedHashMap<String, String> results = new LinkedHashMap<String, String>(); |
| | | results.put("A0", String.valueOf(result.get(0))); |
| | | results.put("A1", String.valueOf(result.get(1))); |
| | | LinkedList<String> resultss = new LinkedList<String>(); |
| | | resultss.add(JSON.toJSONString(results)); |
| | | out.print(resultss); |
| | | }catch(Exception e){ |
| | | out.print("[{}]"); |
| | | } |
| | | } |
| | | %> |
| New file |
| | |
| | | <%@ page language="java" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <% |
| | | request.setCharacterEncoding("UTF-8"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html; charset=utf-8"); |
| | | response.setHeader("Access-Control-Allow-Origin","*"); |
| | | %> |
| | | <%@include file="mysql_connect.jsp"%> |
| | | <%@page import="java.util.LinkedHashMap"%> |
| | | <%@page import="java.util.HashMap"%> |
| | | <%@page import="java.util.LinkedList"%> |
| | | <%@page import="com.alibaba.fastjson.JSON,com.alibaba.fastjson.JSONObject,com.alibaba.fastjson.JSONArray,com.alibaba.fastjson.parser.Feature"%> |
| | | <%@ page import="java.text.SimpleDateFormat,java.util.Date" %> |
| | | |
| | | <% |
| | | String gongneng = request.getParameter("gongneng"); |
| | | String yemian = request.getParameter("yemian"); |
| | | String sltcSql =request.getParameter("sql"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | try{ |
| | | Class.forName(driverClass);{ |
| | | /* Connection conAnquan=DriverManager.getConnection( urlglass,user,password); |
| | | Statement stmts=conAnquan.createStatement(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS"); |
| | | Date time = new Date(); |
| | | long timestamp = time.getTime() / 1000L; |
| | | String anquan="select * from anquanbiao where anquanma = '"+anquanma+"' and cip='"+request.getLocalAddr()+"' and now()<=xiugaitime and now()>=jianlitime; "; |
| | | ResultSet rss = stmts.executeQuery(anquan); |
| | | int coun=0; |
| | | while(rss.next()) |
| | | { |
| | | coun++; |
| | | } |
| | | rss.close(); |
| | | stmts.close(); |
| | | conAnquan.close(); */ |
| | | //coun>0 |
| | | if(true){ |
| | | Connection con=DriverManager.getConnection( url,user,password); |
| | | |
| | | //éè¿connectionæ°æ®åºé¾æ¥å¯¹è±¡ å建ä¸ä¸ªstatementå¯¹è±¡æ°æ®åºæä½å¯¹è±¡ |
| | | String flag=""; |
| | | flag=request.getParameter("flag"); |
| | | if(!flag.equals("0")){ |
| | | String[] sql=sltcSql.split("~"); |
| | | CallableStatement cs = con.prepareCall(sql[0]); |
| | | if(sql.length>1){ |
| | | HashMap<String ,String> hp = JSON.parseObject(sql[1], LinkedHashMap.class,Feature.OrderedField); |
| | | int indexNum=1; |
| | | for(String key : hp.keySet()) { |
| | | cs.setString(indexNum, String.valueOf(hp.get(key))); |
| | | //out.print("cs.setString("+indexNum+", "+String.valueOf(hp.get(key))+")"); |
| | | indexNum++; |
| | | } |
| | | cs.registerOutParameter( indexNum , java.sql.Types.LONGNVARCHAR); |
| | | } |
| | | |
| | | |
| | | if(flag.equals("2")){ |
| | | ResultSet rs = cs.executeQuery(); |
| | | ResultSetMetaData rsmd = rs.getMetaData(); |
| | | String[] arr; |
| | | LinkedList<String> results = new LinkedList<String>(); |
| | | |
| | | while(rs.next()){ |
| | | LinkedHashMap<String, String> result = new LinkedHashMap<String, String>(); |
| | | for(int i=0;i<rsmd.getColumnCount();i++){ |
| | | // out.println(rsmd.getColumnName(i+1));String.valueOf(i) |
| | | String val=rs.getString(i+1)!=null?String.valueOf(rs.getString(i+1)):""; |
| | | result.put(String.valueOf(i+"_"+rsmd.getColumnName(i+1)),val); |
| | | } |
| | | String jsonStr = JSON.toJSONString(result); |
| | | results.add(jsonStr); |
| | | } |
| | | if(results.size()<1){ |
| | | results.add("{}"); |
| | | } |
| | | out.print(results); |
| | | |
| | | }else{ |
| | | cs.execute(); |
| | | String fanhui=(String) cs.getString("fanhui"); |
| | | // out.print("[["+cs.getString("fanhui").length()+","+cs.getString("fanhui")+"]]"); |
| | | if(cs.getString("fanhui")!=null){ |
| | | if(fanhui.length()>0 && !fanhui.equals("null")){ |
| | | out.print("[["+cs.getString("fanhui")+"]]"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | cs.close(); |
| | | }else{ |
| | | Statement stmtss=con.createStatement(); |
| | | |
| | | //stmtss.execute(sltcSql); |
| | | //stmtss.close(); |
| | | } |
| | | |
| | | con.close(); |
| | | }else{ |
| | | out.print("[[anquanmaerr]]"); |
| | | } |
| | | } |
| | | }catch(Exception e){ |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection(url,user,password); |
| | | CallableStatement bs =con.prepareCall("{call AXJ_err(?,?,?)}"); |
| | | bs.setString(1, e.toString()); |
| | | bs.setString(2, gongneng); |
| | | bs.setString(3, sltcSql); |
| | | bs.execute(); |
| | | bs.close(); |
| | | con.close(); |
| | | } |
| | | out.print("[['åçæªç¥é误ï¼è¯·èç³»ç¸å
³äººå']]"); |
| | | } |
| | | %> |
| New file |
| | |
| | | <%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8" |
| | | pageEncoding="UTF-8"%> |
| | | <c:set var="ctx" value="${pageContext.request.contextPath}"/> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| | | <title>Insert title here</title> |
| | | </head> |
| | | <body> |
| | | |
| | | <% |
| | | //è¿æ¥æ°æ®åº |
| | | String ip="localhost:3306"; |
| | | String driverClass = "com.mysql.cj.jdbc.Driver"; |
| | | String url="jdbc:mysql://"+ip+"/gmms?serverTimezone=GMT%2B8"; |
| | | String user = "root"; |
| | | String password = "beibo.123/"; |
| | | String url1 = "jdbc:mysql://"+ip+"/gmms"; |
| | | |
| | | String urlglass="jdbc:mysql://"+ip+"/mesgglass?serverTimezone=GMT%2B8"; |
| | | String url3="jdbc:mysql://"+ip+"/glog?serverTimezone=GMT%2B8"; |
| | | System.out.println(11); |
| | | |
| | | /* localhost:3307 */ |
| | | /* 192.168.20.42 */ |
| | | %> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | |
| | | <%@include file="mysql_connect.jsp"%> |
| | | <%@page import="java.util.LinkedHashMap"%> |
| | | <%@page import="java.util.HashMap"%> |
| | | <%@page import="java.util.LinkedList"%> |
| | | <%@page import="com.alibaba.fastjson.JSON,com.alibaba.fastjson.JSONObject,com.alibaba.fastjson.JSONArray,com.alibaba.fastjson.parser.Feature"%> |
| | | <%@ page import="java.text.SimpleDateFormat,java.util.Date" %> |
| | | <%@page import="druidConnect.JDBCUtils.*,java.sql.Connection"%> |
| | | |
| | | <% |
| | | String gongneng = request.getParameter("gongneng"); |
| | | String yemian = request.getParameter("yemian"); |
| | | String sltcSql =request.getParameter("sql"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | Connection con = druidConnect.JDBCUtils.getConnection(); |
| | | CallableStatement cs =null; |
| | | try{ |
| | | |
| | | if(true){ |
| | | String flag=""; |
| | | //sltcSql="{call AXJ_a_largeScreen_glassCut_select()}"; |
| | | flag=request.getParameter("flag"); |
| | | String[] sql=sltcSql.split("~"); |
| | | cs = con.prepareCall(sql[0]); |
| | | if(sql.length>1){ |
| | | HashMap<String ,String> hp = JSON.parseObject(sql[1], LinkedHashMap.class,Feature.OrderedField); |
| | | int indexNum=1; |
| | | for(String key : hp.keySet()) { |
| | | cs.setString(indexNum, String.valueOf(hp.get(key))); |
| | | //out.print("cs.setString("+indexNum+", "+String.valueOf(hp.get(key))+")"); |
| | | indexNum++; |
| | | } |
| | | cs.registerOutParameter( indexNum , java.sql.Types.LONGNVARCHAR); |
| | | } |
| | | |
| | | |
| | | if(flag.equals("2")){ |
| | | ResultSet rs = cs.executeQuery(); |
| | | ResultSetMetaData rsmd = rs.getMetaData(); |
| | | String[] arr; |
| | | LinkedList<String> results = new LinkedList<String>(); |
| | | |
| | | while(rs.next()){ |
| | | LinkedHashMap<String, String> result = new LinkedHashMap<String, String>(); |
| | | for(int i=0;i<rsmd.getColumnCount();i++){ |
| | | // out.println(rsmd.getColumnName(i+1));String.valueOf(i) |
| | | String val=rs.getString(i+1)!=null?String.valueOf(rs.getString(i+1)):""; |
| | | result.put(String.valueOf(i+"_"+rsmd.getColumnName(i+1)),val); |
| | | } |
| | | String jsonStr = JSON.toJSONString(result); |
| | | results.add(jsonStr); |
| | | } |
| | | if(results.size()<1){ |
| | | results.add("{}"); |
| | | } |
| | | out.print(results); |
| | | |
| | | }else{ |
| | | cs.execute(); |
| | | String fanhui=(String) cs.getString("fanhui"); |
| | | // out.print("[["+cs.getString("fanhui").length()+","+cs.getString("fanhui")+"]]"); |
| | | if(cs.getString("fanhui")!=null){ |
| | | if(fanhui.length()>0 && !fanhui.equals("null")){ |
| | | out.print("[["+cs.getString("fanhui")+"]]"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | }catch(Exception e){ |
| | | cs =con.prepareCall("{call AXJ_err(?,?,?)}"); |
| | | cs.setString(1, e.toString()); |
| | | cs.setString(2, gongneng); |
| | | cs.setString(3, sltcSql+','+anquanma); |
| | | cs.execute(); |
| | | |
| | | out.print("[['åçæªç¥é误ï¼è¯·èç³»ç¸å
³äººå']]"); |
| | | }finally { |
| | | druidConnect.JDBCUtils.close(cs, con); |
| | | } |
| | | %> |
| New file |
| | |
| | | <%@page import="builder.Manager"%> |
| | | <%@page import="ng.devices.HexUtil"%> |
| | | <%@page import="ng.db.sendOptFile"%> |
| | | <% |
| | | |
| | | String zt=request.getParameter("zt"); |
| | | String peifanhao=request.getParameter("peifanhao"); |
| | | String changpinghao=request.getParameter("changpinghao"); |
| | | |
| | | String way_of_working=request.getParameter("way_of_working"); |
| | | String thickness=request.getParameter("thickness"); |
| | | String glass_type=request.getParameter("glass_type"); |
| | | String production_type=request.getParameter("production_type"); |
| | | |
| | | int zts =Integer.valueOf(zt); |
| | | int peifanhaos =Integer.valueOf(peifanhao); |
| | | |
| | | |
| | | String a=HexUtil.intTo2ByteHex(peifanhaos)+HexUtil.intTo2ByteHex(0); |
| | | String as=HexUtil.intTo2ByteHex(peifanhaos)+HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0); |
| | | String b=HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(1); |
| | | String bs=HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(1); |
| | | |
| | | String ganghua=HexUtil.intTo2ByteHex(Integer.valueOf(way_of_working)) |
| | | +HexUtil.intTo2ByteHex(Integer.valueOf(thickness))+HexUtil.intTo2ByteHex(Integer.valueOf(glass_type)) |
| | | +HexUtil.intTo2ByteHex(Integer.valueOf(production_type)); |
| | | |
| | | String ganghuas=HexUtil.intTo2ByteHex(0) |
| | | +HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0) |
| | | +HexUtil.intTo2ByteHex(0); |
| | | /* Manager.sendtoPLC(76,20,4,new byte[]{0,(byte)(peifanhaos&0xff),0,zt},0); |
| | | Manager.sendtoPLC(77,20,4,new byte[]{0,1,0,zt},0); */ |
| | | |
| | | |
| | | |
| | | |
| | | if(zts==2){ |
| | | /* Manager.sendtoPLC(6,88,4,a,0); |
| | | Manager.sendtoPLC(45,88,4,a,0); |
| | | Manager.sendtoPLC(46,88,4,a,0); |
| | | Manager.sendtoPLC(47,88,4,a,0); |
| | | Manager.sendtoPLC(48,88,4,a,0); |
| | | Manager.sendtoPLC(49,88,4,a,0); |
| | | Manager.sendtoPLC(50,88,4,a,0); |
| | | Manager.sendtoPLC(51,88,4,a,0); |
| | | Manager.sendtoPLC(52,88,4,a,0); |
| | | Manager.sendtoPLC(53,88,4,a,0); */ |
| | | //Manager.dayin(1,changpinghao); |
| | | //æ°çæº |
| | | Manager.sendtoPLC(5,88,4,a,0); |
| | | //æºæ¢°æ |
| | | |
| | | //ç£¨è¾¹æº |
| | | Manager.sendtoPLC(7,6088,4,a,0); |
| | | //åè§æº |
| | | Manager.sendtoPLC(9,13360,4,a,0); |
| | | |
| | | //é»åæº |
| | | Manager.sendtoPLC(11,88,4,a,0); |
| | | Manager.sendtoPLC(31,88,4,a,0); |
| | | Manager.sendtoPLC(32,88,4,a,0); |
| | | Manager.sendtoPLC(33,88,4,a,0); |
| | | //æ°´å |
| | | Manager.sendtoPLC(12,176,6,as,0); |
| | | Manager.sendtoPLC(34,176,6,as,0); |
| | | Manager.sendtoPLC(35,176,6,as,0); |
| | | Manager.sendtoPLC(36,176,6,as,0); |
| | | //å å·¥ä¸å¿ |
| | | Manager.sendtoPLC(14,88,4,a,0); |
| | | Manager.sendtoPLC(37,88,4,a,0); |
| | | Manager.sendtoPLC(38,88,4,a,0); |
| | | Manager.sendtoPLC(39,88,4,a,0); |
| | | //æ¯çº¿åçå° |
| | | Manager.sendtoPLC(13,236,4,a,0); |
| | | //ä¸å°çå¹² |
| | | Manager.sendtoPLC(19,10088,4,a,0); |
| | | Manager.sendtoPLC(20,10088,4,a,0); |
| | | Manager.sendtoPLC(21,10088,4,a,0); |
| | | Manager.sendtoPLC(22,10088,4,a,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(23,88,4,a,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(24,26,8,ganghua,0); |
| | | Manager.sendtoPLC(24,2,2,"0001",0); |
| | | //é¢å |
| | | Manager.sendtoPLC(25,88,4,a,0); |
| | | //è´´è |
| | | //Manager.sendtoPLC(26,88,4,a,0); |
| | | //Manager.sendtoPLC(76,88,4,a,0); |
| | | //Manager.sendtoPLC(77,88,4,a,0); |
| | | //sendOptFile.sendOpt("\\\\192.168.10.25\\optfile/", "file://192.168.20.42/d/optfile/"); |
| | | |
| | | }else if(zts==3){ |
| | | |
| | | /* Manager.sendtoPLC(6,88,4,b,0); |
| | | Manager.sendtoPLC(45,88,4,b,0); |
| | | Manager.sendtoPLC(46,88,4,b,0); |
| | | Manager.sendtoPLC(47,88,4,b,0); |
| | | Manager.sendtoPLC(48,88,4,b,0); |
| | | Manager.sendtoPLC(49,88,4,b,0); |
| | | Manager.sendtoPLC(50,88,4,b,0); |
| | | Manager.sendtoPLC(51,88,4,b,0); |
| | | Manager.sendtoPLC(52,88,4,b,0); |
| | | Manager.sendtoPLC(53,88,4,b,0); */ |
| | | |
| | | |
| | | |
| | | |
| | | //Manager.dayin(2,changpinghao); |
| | | //æ°çæº |
| | | Manager.sendtoPLC(5,88,4,b,0); |
| | | //æºæ¢°æ |
| | | //ç£¨è¾¹æº |
| | | Manager.sendtoPLC(7,6088,4,b,0); |
| | | //åè§æº |
| | | Manager.sendtoPLC(9,13360,4,b,0); |
| | | |
| | | //é»åæº |
| | | Manager.sendtoPLC(11,88,4,b,0); |
| | | Manager.sendtoPLC(31,88,4,b,0); |
| | | Manager.sendtoPLC(32,88,4,b,0); |
| | | Manager.sendtoPLC(33,88,4,b,0); |
| | | //æ°´å |
| | | Manager.sendtoPLC(12,176,6,bs,0); |
| | | Manager.sendtoPLC(34,176,6,bs,0); |
| | | Manager.sendtoPLC(35,176,6,bs,0); |
| | | Manager.sendtoPLC(36,176,6,bs,0); |
| | | //å å·¥ä¸å¿ |
| | | Manager.sendtoPLC(14,88,4,b,0); |
| | | Manager.sendtoPLC(37,88,4,b,0); |
| | | Manager.sendtoPLC(38,88,4,b,0); |
| | | Manager.sendtoPLC(39,88,4,b,0); |
| | | //æ¯çº¿åçå° |
| | | Manager.sendtoPLC(13,236,4,b,0); |
| | | //ä¸å°çå¹² |
| | | Manager.sendtoPLC(19,10088,4,b,0); |
| | | Manager.sendtoPLC(20,10088,4,b,0); |
| | | Manager.sendtoPLC(21,10088,4,b,0); |
| | | Manager.sendtoPLC(22,10088,4,b,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(23,88,4,b,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(24,26,8,ganghuas,0); |
| | | Manager.sendtoPLC(24,2,2,"0000",0); |
| | | //é¢å |
| | | Manager.sendtoPLC(25,88,4,b,0); |
| | | //è´´è |
| | | /* Manager.sendtoPLC(26,88,4,b,0); |
| | | Manager.sendtoPLC(76,88,4,b,0); |
| | | Manager.sendtoPLC(77,88,4,b,0); */ |
| | | } else if(zts==98){ |
| | | /* Manager.sendtoPLC(6,88,4,a,0); |
| | | Manager.sendtoPLC(45,88,4,a,0); |
| | | Manager.sendtoPLC(46,88,4,a,0); |
| | | Manager.sendtoPLC(47,88,4,a,0); |
| | | Manager.sendtoPLC(48,88,4,a,0); |
| | | Manager.sendtoPLC(49,88,4,a,0); |
| | | Manager.sendtoPLC(50,88,4,a,0); |
| | | Manager.sendtoPLC(51,88,4,a,0); |
| | | Manager.sendtoPLC(52,88,4,a,0); |
| | | Manager.sendtoPLC(53,88,4,a,0); */ |
| | | |
| | | //æ°çæº |
| | | Manager.sendtoPLC(5,88,4,a,0); |
| | | //æºæ¢°æ |
| | | //ç£¨è¾¹æº |
| | | Manager.sendtoPLC(7,6088,4,a,0); |
| | | //åè§æº |
| | | Manager.sendtoPLC(9,13400,4,a,0); |
| | | |
| | | //é»åæº |
| | | Manager.sendtoPLC(11,88,4,a,0); |
| | | Manager.sendtoPLC(31,88,4,a,0); |
| | | Manager.sendtoPLC(32,88,4,a,0); |
| | | Manager.sendtoPLC(33,88,4,a,0); |
| | | //æ°´å |
| | | Manager.sendtoPLC(12,176,6,as,0); |
| | | Manager.sendtoPLC(34,176,6,as,0); |
| | | Manager.sendtoPLC(35,176,6,as,0); |
| | | Manager.sendtoPLC(36,176,6,as,0); |
| | | //å å·¥ä¸å¿ |
| | | Manager.sendtoPLC(14,88,4,a,0); |
| | | Manager.sendtoPLC(37,88,4,a,0); |
| | | Manager.sendtoPLC(38,88,4,a,0); |
| | | Manager.sendtoPLC(39,88,4,a,0); |
| | | //æ¯çº¿åçå° |
| | | Manager.sendtoPLC(13,236,4,a,0); |
| | | //ä¸å°çå¹² |
| | | Manager.sendtoPLC(19,10088,4,a,0); |
| | | Manager.sendtoPLC(20,10088,4,a,0); |
| | | Manager.sendtoPLC(21,10088,4,a,0); |
| | | Manager.sendtoPLC(22,10088,4,a,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(23,88,4,a,0); |
| | | //é¢å |
| | | Manager.sendtoPLC(24,26,8,ganghua,0); |
| | | Manager.sendtoPLC(24,2,2,"0001",0); |
| | | //é¢å |
| | | Manager.sendtoPLC(25,88,4,a,0); |
| | | //è´´è |
| | | /* Manager.sendtoPLC(26,88,4,a,0); |
| | | Manager.sendtoPLC(76,88,4,a,0); |
| | | Manager.sendtoPLC(77,88,4,a,0); */ |
| | | |
| | | } |
| | | else if(zts==99){ |
| | | Manager.dayin(1,changpinghao); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | %> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Document</title> |
| | | <script src="../js/main.js"></script> |
| | | </head> |
| | | <body> |
| | | <div id="app"> |
| | | <el-container> |
| | | <el-header> |
| | | <el-date-picker |
| | | v-model="dateSelect" |
| | | type="datetimerange" |
| | | :picker-options="pickerOptions" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | align="right" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | > |
| | | |
| | | </el-date-picker> |
| | | |
| | | <el-input style="width: 175px;" |
| | | placeholder="请è¾å
¥æºå¨ID" |
| | | v-model="machineid" |
| | | clearable> |
| | | </el-input> |
| | | </el-header> |
| | | <el-main style="height: 90vh;"> |
| | | <show-table :tablehead="tableHead" :tabledata="tableData"></show-table> |
| | | |
| | | </el-main> |
| | | </el-container> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | let app= new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | return{ |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | | text: 'æè¿ä¸å¨', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: 'æè¿ä¸ä¸ªæ', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: 'æè¿ä¸ä¸ªæ', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }] |
| | | }, |
| | | dateSelect:["",""], |
| | | machineid:"", |
| | | tableData:[{}], |
| | | tableHead:[{ |
| | | "0_machine_id":'æºå¨ID', |
| | | "1_machine_name":'æºå¨åç§°', |
| | | "2_jishu":'产é', |
| | | "3_tingji":'åæºæ¶é´' |
| | | }] |
| | | |
| | | } |
| | | |
| | | }, |
| | | methods:{ |
| | | }, |
| | | async mounted() { |
| | | let timer1=await setInterval(()=>{ |
| | | let arrObj={ |
| | | machineid:this.machineid, |
| | | stateData:this.dateSelect[0], |
| | | endeData:this.dateSelect[1] |
| | | } |
| | | sql="{call glog.datetimeMachineGlassSum(?,?,?,?)}~"+JSON.stringify(arrObj) |
| | | this.interValLoadAjxs('äº§éæ¥è¯¢',sql,2,"tableData",timer1) |
| | | },5000) |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Document</title> |
| | | <script src="../js/main.js"></script> |
| | | </head> |
| | | <body> |
| | | <div id="app"> |
| | | <button type="button" @click="test0()" class="btn btn-primary " |
| | | style="height:30px;width:90px;background-color: #5CADFE;">导åºè¡¨æ ¼</button> |
| | | |
| | | <el-container> |
| | | |
| | | <el-main style="height: 90vh;"> |
| | | <show-table :id="table" :tablehead="tableHead" :tabledata="tableData"></show-table> |
| | | |
| | | </el-main> |
| | | </el-container> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | let app= new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | return{ |
| | | |
| | | |
| | | machineid:"", |
| | | table:"table1", |
| | | tableData:[{}], |
| | | tableHead:[{ |
| | | "0_riqi":'æ¶é´æ®µ', |
| | | "1_baipianchangliang":'æ°ç产é', |
| | | "2_baipiantingji":'æ°çåæº', |
| | | "3_qingxichangliang":'æ¸
æ´äº§é', |
| | | "4_qingxitingji":'æ¸
æ´åæº', |
| | | "5_siyinchangliang1":'ä¸å°1产é', |
| | | "6_siyintingji1":'ä¸å°1åæº', |
| | | "7_siyinchangliang2":'ä¸å°2产é', |
| | | "8_siyintingji2":'ä¸å°2åæº', |
| | | "9_zuankongchangliang":'é»å1产é', |
| | | "10_zuankongtingji":'é»å1åæº', |
| | | "11_shuidaochangliang":'æ°´å1产é', |
| | | "12_shuidaotingji":'æ°´å1åæº', |
| | | "13_jiagongzhongxinchangliang":'å å·¥ä¸å¿1产é', |
| | | "14_jiagongzhongxintingji":'å å·¥ä¸å¿1åæº' |
| | | }] |
| | | |
| | | } |
| | | |
| | | }, |
| | | methods:{ |
| | | //æ¶é´æ ¼å¼å |
| | | formatDate(objDate,fmt) { |
| | | var o = { |
| | | ãããã"M+" : objDate.getMonth()+1, //æä»½ |
| | | ãããã"d+" : objDate.getDate(), //æ¥ |
| | | ãããã"h+" : objDate.getHours()%12 == 0 ? 12 : objDate.getHours()%12, //å°æ¶ |
| | | ãããã"H+" : objDate.getHours(), //å°æ¶ |
| | | ãããã"m+" : objDate.getMinutes(), //å |
| | | ãããã"s+" : objDate.getSeconds(), //ç§ |
| | | ãããã"q+" : Math.floor((objDate.getMonth()+3)/3), //å£åº¦ |
| | | ãããã"S" : objDate.getMilliseconds() //æ¯«ç§ |
| | | ãã}; |
| | | ããif(/(y+)/.test(fmt)) |
| | | ããããfmt=fmt.replace(RegExp.$1, (objDate.getFullYear()+"").substr(4 - RegExp.$1.length)); |
| | | ããfor(var k in o) |
| | | ããããif(new RegExp("("+ k +")").test(fmt)) |
| | | ããfmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); |
| | | ããreturn fmt; |
| | | |
| | | }, |
| | | //å¯¼åºæ¹æ³ |
| | | test0:function() { |
| | | let exportFileContent = document.getElementById('table1').outerHTML; |
| | | let blob = new Blob([exportFileContent], { type: 'text/plain;charset=utf-8' }); // è§£å³ä¸æä¹±ç é®é¢ |
| | | blob = new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type }); |
| | | // è®¾ç½®é¾æ¥ |
| | | let link = window.URL.createObjectURL(blob); |
| | | let a = document.createElement('a'); // å建aæ ç¾ |
| | | a.download = ""+this.formatDate(new Date(),"yyyy-MM-dd")+"äº§éæ¥è¡¨.xls"; // 设置被ä¸è½½çè¶
龿¥ç®æ ï¼æä»¶åï¼ |
| | | a.href = link; // 设置aæ ç¾ç龿¥ |
| | | document.body.appendChild(a); // aæ ç¾æ·»å å°é¡µé¢ |
| | | a.click(); // 设置aæ ç¾è§¦ååå»äºä»¶ |
| | | document.body.removeChild(a); // ç§»é¤aæ ç¾ |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | | watch:{ |
| | | tableData(){ |
| | | for(item of this.tableData){ |
| | | |
| | | } |
| | | } |
| | | }, |
| | | async mounted(){ |
| | | sql="{call chanliangchaxungroup()}"; |
| | | this.loadAjxss('äº§éæ¥è¯¢',sql,2,"tableData"); |
| | | |
| | | await setInterval(()=>{ |
| | | |
| | | sql="{call chanliangchaxungroup()}"; |
| | | this.loadAjxss('äº§éæ¥è¯¢',sql,2,"tableData"); |
| | | },5000) |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" |
| | | pageEncoding="ISO-8859-1"%> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| | | <title>Insert title here</title> |
| | | </head> |
| | | <body> |
| | | <div id="app" > |
| | | <p>{{orderData}}</p>+1 |
| | | </div> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <!-- import CSS --> |
| | | <link rel="stylesheet" href="../js/static/css/element.css"> |
| | | <link rel="stylesheet" href="../js/static/css/style.css"> |
| | | <style > |
| | | .page-scroll { |
| | | height: 100%; |
| | | } |
| | | |
| | | .page-scroll .el-scrollbar__wrap { |
| | | overflow-x: hidden; |
| | | } |
| | | img{ |
| | | width: auto; |
| | | height: auto; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="app" > |
| | | <el-container v-loading="loading" style="width:100%;height:100%" > |
| | | <el-header style="margin-top: 3%;height: 3%;"> |
| | | <el-button @click="showFlagFuc" type="primary" round style="float:right;">{{showFlag==false?'è¿å订å':'æ°å¢è®¢å'}}</el-button> |
| | | <el-date-picker v-show="showFlag" style="float: left;margin-bottom: 0.3%;" |
| | | v-model="selectdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | |
| | | <el-button @click="selectTimeOrder" v-show="showFlag" type="primary" icon="el-icon-search" |
| | | style="float: left;margin-left: 0.2%;margin-bottom: 0.3%;" |
| | | >æç´¢ |
| | | </el-button> |
| | | |
| | | </el-header> |
| | | <el-main style="width:100%;height:97%"> |
| | | <el-table v-show="showFlag" |
| | | :data="orderData" |
| | | height="95%" |
| | | style="width: 100%;"> |
| | | |
| | | |
| | | <el-table-column |
| | | v-for="(item,keys,index) in tableHead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | > |
| | | <el-table-column :prop="keys" v-if="index==0" width=130> |
| | | <template slot-scope="scope" v-if="Object.keys(orderData[0]).length!=0"> |
| | | |
| | | <el-button v-if="orderData[scope.$index]['11_order_status']<2" |
| | | @click.native.prevent="updateOrderState(scope.$index, orderData)" |
| | | type="text" |
| | | size="small" |
| | | v-preventReClick |
| | | > |
| | | {{orderData[scope.$index]['11_order_status']==0?'å®¡æ ¸':'å审'}} |
| | | </el-button> |
| | | |
| | | <el-button v-if="orderData[scope.$index]['11_order_status']*1===0" |
| | | @click.native.prevent="updateRow(scope.$index, orderData)" |
| | | type="text" |
| | | size="small"> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | <el-button |
| | | v-if="orderData[scope.$index]['11_order_status']==2" |
| | | @click.native.prevent="open(scope.$index, orderData)" |
| | | type="text" |
| | | size="small"> |
| | | æ¬¡ç ´ |
| | | </el-button> |
| | | |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column :prop="keys" v-if="index>0"> |
| | | <template slot="header" slot-scope="scope" > |
| | | <el-input v-model="slectOrder[index-1]" @keyup.enter.native="selectSub" type="text" size="mini" /> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- æ°å¢ä¿®æ¹ --> |
| | | |
| | | <el-form v-show="!showFlag" :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" style="width: 25%;margin: auto;"> |
| | | <el-form-item> |
| | | <el-button v-show="updateShowFlag" type="primary" @click="updateGlassSub('ruleForm')" v-preventReClick >ä¿®æ¹</el-button> |
| | | <el-button v-show="!updateShowFlag" type="primary" @click="submitForm('ruleForm')" v-preventReClick >æäº¤</el-button> |
| | | <el-button @click="resetForm('ruleForm')">éç½®</el-button> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="å°çæ°é" prop="glassNum"> |
| | | <el-input v-model="ruleForm.glassNum" autocomplete="off" ></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="é
æ¹å·" prop="produceid"> |
| | | <template> |
| | | <el-select v-model="ruleForm.produceid" placeholder="è¯·éæ©" clearable filterable> |
| | | <el-option |
| | | v-for="item in orderProduce" |
| | | :key="item['0_id']" |
| | | :label="item['1_val']" |
| | | :value="item['0_id']"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | </el-form> |
| | | <el-dialog |
| | | title="åºç ´" |
| | | :visible.sync="wornGlassFLAG" |
| | | width="30%" |
| | | center> |
| | | <span style="text-align: center;"> |
| | | <el-form :model="wornGlass" ref="wornGlass" :rules="rules"> |
| | | <el-form-item label="æ¬¡ç ´æ°é:" prop="wornNum"> |
| | | <el-input for="a" style="width: 50%;" v-model.number="wornGlass.wornNum" autocomplete="off" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¬¡ç ´åå :" > |
| | | <el-input for="b" style="width: 50%;" v-model.number="wornGlass.reason" autocomplete="off" ></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button @click="resetForm('wornGlass');wornGlassFLAG = false">å æ¶</el-button> |
| | | <el-button v-show="!updateShowFlag" type="primary" @click="wornSub('wornGlass')" v-preventReClick>æäº¤</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | </span> |
| | | <!-- <span slot="footer" class="dialog-footer"> |
| | | |
| | | <el-button type="primary" @click="wornSub">ç¡® å®</el-button> |
| | | </span> --> |
| | | </el-dialog> |
| | | </el-main> |
| | | <!-- <el-footer style="background-color: azure;"></el-footer> --> |
| | | </el-container> |
| | | </div> |
| | | </body> |
| | | <!-- import Vue before Element --> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | |
| | | <script src="../js/static/js/vue.js"></script> |
| | | <script src="../js/global.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <!-- import JavaScript --> |
| | | <script src="../js/static/js/element.js"></script> |
| | | <script src="../js/static/js/echarts.min.js"></script> |
| | | <script > |
| | | //import * as echarts from '../js/echarts.min.js'; |
| | | Vue.prototype.$echarts = echarts |
| | | Vue.prototype.$http= axios |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | var checkNum = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]{1,4}(\.[0-9]{0,2})?$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥0.01-9999.99çæ°å')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | var checkString = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | if (value.length>255) { |
| | | callback(new Error('æå¤§é¿åº¦255')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | }, 1000); |
| | | }; |
| | | var checkInt = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©ºæè
0')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]*[1-9][0-9]*$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£æ´æ°')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | return { |
| | | loading:true,//页é¢å è½½flag |
| | | ruleForm: { |
| | | produceid:"", |
| | | glassNum:"", |
| | | creator:'', |
| | | }, |
| | | rules: { |
| | | produceid: [ |
| | | { validator: checkInt, trigger: 'blur' } |
| | | ], |
| | | glassNum: [ |
| | | { validator: checkInt, trigger: 'blur' } |
| | | ], |
| | | wornNum: [ |
| | | { validator: checkInt, trigger: 'blur' } |
| | | ], |
| | | |
| | | }, |
| | | tableHead:[], |
| | | orderData:[], |
| | | showFlag:true, |
| | | updateShowFlag:false, |
| | | updateOrder:{ |
| | | id:'' |
| | | }, |
| | | orderProduce:[], |
| | | fileList:[], |
| | | slectOrder:["","","","","","","","","",""],//çéåæ° |
| | | selectdate:["",""],//æ¥æåæ° |
| | | wornGlassFLAG: false,//æ¬¡ç ´ç颿¾ç¤ºæ è®° |
| | | wornGlass:{//ç ´ææäº¤åæ° |
| | | glassID:'', |
| | | wornNum:'', |
| | | reason:'' |
| | | } |
| | | |
| | | |
| | | }; |
| | | |
| | | }, |
| | | methods: { |
| | | submitForm(formName) {//æ°å¢è®¢å |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | this.ruleForm.creator='<%= request.getParameter("xingming")%>'; |
| | | let sql="{call AXJ_a_order_add(?,?,?,?)}~"+JSON.stringify(this.ruleForm); |
| | | this.connects("è®¢åæ°å¢",sql,1,1); |
| | | }); |
| | | }, |
| | | resetForm(formName) {//æ¸
餿°å¢éç½® |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | showFlagFuc(){//æ¾ç¤ºè®¢åæ°å¢çé¢ |
| | | Object.keys(this.ruleForm).forEach((key) => (this.ruleForm[key] = '')); |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=false; |
| | | }, |
| | | updateRow(index,row){//ä¿®æ¹äº§åæ°æ®æ¾ç¤º |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=true; |
| | | let rowObj=row[index] |
| | | this.ruleForm.glassNum=rowObj["5_smallglass_no"] |
| | | this.ruleForm.produceid=rowObj["12_id"] |
| | | this.updateOrder.id=rowObj["0_id"] |
| | | |
| | | }, |
| | | updateGlassSub(formName){//订åä¿®æ¹æäº¤ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | this.ruleForm.creator='<%= request.getParameter("xingming")%>'; |
| | | let updateGlassObj=this.ruleForm |
| | | updateGlassObj.id=this.updateOrder.id |
| | | |
| | | let sql="{call AXJ_a_order_update(?,?,?,?,?)}~"+JSON.stringify(updateGlassObj); |
| | | this.connects("订åä¿®æ¹",sql,1,1); |
| | | }); |
| | | |
| | | }, |
| | | updateOrderState(index,row){//å®¡æ ¸è®¢å |
| | | let updateState={} |
| | | updateState.id=row[index]['0_id'] |
| | | updateState.state=row[index]['11_order_status']*1===0?1:0 |
| | | let sql="{call AXJ_a_order_updateState(?,?,?)}~"+JSON.stringify(updateState); |
| | | this.connects("订åç¶æå®¡æ ¸ä¿®æ¹",sql,1,1); |
| | | }, |
| | | async selectSub(){ |
| | | let arrObj={} |
| | | let arrFlag=0 |
| | | for(let i in this.slectOrder){ |
| | | if(this.slectOrder[i]!=''){ |
| | | arrFlag=1 |
| | | } |
| | | arrObj[i]=this.slectOrder[i]==''?"n*":this.slectOrder[i] |
| | | } |
| | | if(this.selectdate!=null){ |
| | | arrObj.starttime=this.selectdate[0] |
| | | arrObj.endtime=this.selectdate[1] |
| | | }else{ |
| | | arrObj.starttime='' |
| | | arrObj.endtime='' |
| | | } |
| | | |
| | | let sql="{call AXJ_a_order_select(?,?,?,?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj) |
| | | if(arrFlag==0){ |
| | | sql="{call AXJ_a_order_select_into()}" |
| | | } |
| | | this.loading=true |
| | | await this.loadAjxss('è®¢åæ¥è¯¢',sql,2,"orderData") |
| | | this.loading=false |
| | | }, |
| | | async selectTimeOrder(){ |
| | | let arrObj={} |
| | | for(let i in this.slectOrder){ |
| | | arrObj[i]='n*' |
| | | } |
| | | let sql='' |
| | | if(this.selectdate!=null){ |
| | | arrObj.starttime=this.selectdate[0] |
| | | arrObj.endtime=this.selectdate[1] |
| | | sql="{call AXJ_a_order_select(?,?,?,?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj) |
| | | }else{ |
| | | arrObj.starttime='' |
| | | arrObj.endtime='' |
| | | sql="{call AXJ_a_order_select_into()}" |
| | | } |
| | | this.loading=true |
| | | await this.loadAjxss('è®¢åæ¥è¯¢',sql,2,"orderData") |
| | | this.loading=false |
| | | |
| | | }, |
| | | open(index,row) {//æå¼åºç ´çé¢ |
| | | this.wornGlassFLAG= true |
| | | this.wornGlass.glassID=row[index]['0_id'] |
| | | //wornGlass.wornNum:'', |
| | | //wornGlass.reason:'' |
| | | }, |
| | | wornSub(formName){//åºç ´æäº¤ |
| | | |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | this.wornGlassFLAG = false |
| | | let sql="{call AXJ_a_order_glassWorn(?,?,?,?)}~"+JSON.stringify(this.wornGlass); |
| | | this.connects("订åå°çç ´æ",sql,1,1); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | computed:{ |
| | | |
| | | }, |
| | | async mounted() { |
| | | let sql="{call AXJ_a_order_select_into()}" |
| | | let flag=2; |
| | | await this.loadAjxss('订ååå§æ¥è¯¢',sql,flag,"orderData") |
| | | |
| | | /* loadAjxs('订ååå§æ¥è¯¢',sql,flag,"orderData") */ |
| | | |
| | | sql="{call AXJ_a_orderHeader_select()}" |
| | | await this.loadAjxss('订å表头',sql,flag,"tableHead") |
| | | |
| | | sql="{call AXJ_a_order_produce_select()}" |
| | | await this.loadAjxss('订åäº§åæ¥è¯¢',sql,flag,"orderProduce") |
| | | this.loading=false |
| | | }, |
| | | |
| | | }) |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <!-- import CSS --> |
| | | <link rel="stylesheet" href="../js/static/css/element.css"> |
| | | <!-- <link rel="stylesheet" href="../js/static/css/style.css"> --> |
| | | <style > |
| | | html,body{ |
| | | width: 99%; |
| | | height: 99%; |
| | | background-color: #D5EAFF; |
| | | padding: 0%; |
| | | margin: auto; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | #app{ |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | #divHead,#left,#main,.shelf{ |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); |
| | | } |
| | | input::-webkit-outer-spin-button, |
| | | input::-webkit-inner-spin-button { |
| | | -webkit-appearance: none; |
| | | } |
| | | *{ |
| | | text-align: center; |
| | | } |
| | | #mains{ |
| | | height: 100%; |
| | | width: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | .page-scroll { |
| | | height: 100%; |
| | | } |
| | | |
| | | .page-scroll .el-scrollbar__wrap { |
| | | overflow-x: hidden; |
| | | } |
| | | img{ |
| | | width: auto; |
| | | height: auto; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="app" > |
| | | <el-container style="width:100%;height:100%" > |
| | | <el-header style="height: 3%;"> |
| | | <el-button @click="showFlagFuc" type="primary" round style="float:left;">{{showFlag==false?'è¿å产å':'æ·»å 产å'}}</el-button> |
| | | </el-header> |
| | | <el-main style="width:100%;height:97%" > |
| | | <el-table v-show="showFlag" |
| | | :data="produceData" |
| | | height="100%" |
| | | style="width: 100%;"> |
| | | |
| | | |
| | | <el-table-column |
| | | v-for="(item,keys,index) in tableHead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | > |
| | | <el-table-column :prop="keys" v-if="index==0" > |
| | | <template slot-scope="scope" v-if="Object.keys(produceData[0]).length!=0"> |
| | | <el-button |
| | | @click.native.prevent="updateRow(scope.$index, produceData)" |
| | | type="text" |
| | | size="small"> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column :prop="keys" v-if="index>0"> |
| | | <template slot="header" slot-scope="scope" > |
| | | <el-input v-model="selectGlass[index-1]" @keyup.enter.native="selectSub" type="text" size="mini" /> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- æ°å¢ä¿®æ¹ --> |
| | | <div v-show="updateShowFlag" style="width: 30%;height: 50vh;float: left;margin-top: 10%;margin-left: 10%; "> |
| | | <img :src="ruleForm.route" > |
| | | </div> |
| | | |
| | | <el-form v-show="!showFlag" :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" style="width: 25%;float: right;margin-right: 20%;"> |
| | | <el-form-item> |
| | | <el-button v-show="updateShowFlag" type="primary" @click="updateGlassSub('ruleForm')" v-preventReClick ='3000'>ä¿®æ¹</el-button> |
| | | <el-button v-show="!updateShowFlag" type="primary" @click="submitForm('ruleForm')" v-preventReClick='3000'>æäº¤</el-button> |
| | | <el-button @click="resetForm('ruleForm')">éç½®</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="产åç¼å·" prop="produceid"> |
| | | <el-input v-model="ruleForm.produceid" autocomplete="off" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="宽" prop="width"> |
| | | <el-input v-model="ruleForm.width" autocomplete="off" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é«" prop="height"> |
| | | <el-input v-model="ruleForm.height" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å度" prop="thickness"> |
| | | <el-input v-model.number="ruleForm.thickness"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="é¢è²" prop="color"> |
| | | <el-input v-model.number="ruleForm.color"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="optæä»¶ç¼å·" prop="optNum"> |
| | | <template> |
| | | <el-select v-model="ruleForm.optNum" placeholder="è¯·éæ©" clearable filterable> |
| | | <el-option |
| | | v-for="item in optList" |
| | | :key="item['0_id']" |
| | | :label="item['1_val']" |
| | | :value="item['0_id']"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æä»¶ä¸ä¼ " > |
| | | <el-upload |
| | | :limit="1" |
| | | :on-change="changeFile" |
| | | class="upload-demo" |
| | | ref="upload" |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :file-list="fileList" |
| | | :auto-upload="false"> |
| | | <el-button slot="trigger" size="small" type="primary" >éåæä»¶</el-button> |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ jpg/pngæä»¶ï¼ä¸ä¸è¶
è¿5m</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | </el-main> |
| | | <!-- <el-footer style="background-color: azure;"></el-footer> --> |
| | | </el-container> |
| | | </div> |
| | | </body> |
| | | <!-- import Vue before Element --> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/static/js/vue.js"></script> |
| | | <script src="../js/global.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <!-- import JavaScript --> |
| | | <script src="../js/static/js/element.js"></script> |
| | | <script src="../js/static/js/echarts.min.js"></script> |
| | | |
| | | <script > |
| | | //import * as echarts from '../js/echarts.min.js'; |
| | | Vue.prototype.$echarts = echarts |
| | | Vue.prototype.$http= axios |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | var checkNum = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]{1,4}(\.[0-9]{0,2})?$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥0.01-9999.99çæ°å')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | var checkString = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | if (value.length>255) { |
| | | callback(new Error('æå¤§é¿åº¦255')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | }, 1000); |
| | | }; |
| | | var checkThickness = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©ºæè
0')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]*[1-9][0-9]*$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£æ´æ°çå度')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | return { |
| | | ruleForm: { |
| | | produceid:'', |
| | | width: '', |
| | | height: '', |
| | | thickness: '', |
| | | color:'', |
| | | optNum:'', |
| | | creator:'<%= request.getParameter("xingming") %>', |
| | | route:'' |
| | | }, |
| | | rules: { |
| | | produceid: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | height: [ |
| | | { validator: checkNum, trigger: 'blur' } |
| | | ], |
| | | width: [ |
| | | { validator: checkNum, trigger: 'blur' } |
| | | ], |
| | | thickness: [ |
| | | { validator: checkThickness, trigger: 'blur' } |
| | | ], |
| | | color: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | optNum: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | route: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | |
| | | }, |
| | | tableHead:[], |
| | | produceData:[], |
| | | showFlag:true, |
| | | updateShowFlag:false, |
| | | updateGlass:{ |
| | | id:'' |
| | | }, |
| | | optList:[], |
| | | fileList:[], |
| | | selectGlass:["","","","","","","",""] |
| | | |
| | | |
| | | }; |
| | | |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | this.ruleForm.creator='<%= request.getParameter("xingming") %>'; |
| | | let sql="{call AXJ_a_produce_insert(?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(this.ruleForm); |
| | | this.connects("æ°å¢äº§å",sql,1,1); |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | showFlagFuc(){ |
| | | Object.keys(this.ruleForm).forEach((key) => (this.ruleForm[key] = '')); |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=false; |
| | | }, |
| | | updateRow(index,row){//ä¿®æ¹äº§åæ°æ®æ¾ç¤º |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=true; |
| | | let rowObj=row[index] |
| | | this.ruleForm.produceid=rowObj["1_recipe_no"] |
| | | this.ruleForm.width=rowObj["3_width"] |
| | | this.ruleForm.height=rowObj["4_height"] |
| | | this.ruleForm.thickness=rowObj["5_thickness"] |
| | | this.ruleForm.color=rowObj["6_color"] |
| | | this.ruleForm.optNum=rowObj["2_optfile_no"] |
| | | this.ruleForm.creator=rowObj["7_recipe_maker"] |
| | | this.ruleForm.route=rowObj["9_route"] |
| | | this.updateGlass.id=rowObj["0_id"] |
| | | console.log( row[index]); |
| | | }, |
| | | updateGlassSub(formName){ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | let updateGlassObj=this.ruleForm |
| | | updateGlassObj.id=this.updateGlass.id |
| | | let sql="{call AXJ_a_produce_update(?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(updateGlassObj); |
| | | this.connects("产åä¿®æ¹",sql,1,1); |
| | | }); |
| | | |
| | | }, |
| | | changeFile(file){//æ·»å æä»¶è§¦åçæbase64æä»¶ |
| | | const isJPG = file.raw.type === 'image/jpeg' || file.raw.type === 'image/png' ; |
| | | const isLt2M = file.size / 1024 / 1024 < 5; |
| | | |
| | | if (!isJPG) { |
| | | this.$message.error('ä¸ä¼ 头åå¾çåªè½æ¯ JPGæè
PNG æ ¼å¼!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | if (!isLt2M) { |
| | | this.$message.error('ä¸ä¼ 头åå¾ç大å°ä¸è½è¶
è¿ 5MB!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | let reader = new FileReader(); |
| | | reader.readAsDataURL(file.raw); |
| | | reader.onload = (e) => { |
| | | resolve(e.target.result); |
| | | this.ruleForm.route=e.target.result; |
| | | }; |
| | | }); |
| | | }, |
| | | selectSub:function(){ |
| | | let arrObj={} |
| | | for(let i in this.selectGlass){ |
| | | arrObj[i]=this.selectGlass[i] |
| | | } |
| | | let sql="{call AXJ_a_produce_select(?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj); |
| | | this.loadAjxss('äº§åæ¥è¯¢',sql,2,"produceData"); |
| | | } |
| | | }, |
| | | computed:{ |
| | | |
| | | }, |
| | | mounted() { |
| | | let sql="{call AXJ_a_produce_select_into()}"; |
| | | let flag=2; |
| | | this.loadAjxss('产ååå§æ¥è¯¢',sql,flag,"produceData"); |
| | | |
| | | sql="{call AXJ_a_produceHeader_select()}"; |
| | | this.loadAjxss('产å表头',sql,flag,"tableHead"); |
| | | |
| | | sql="{call AXJ_a_optFile_select()}"; |
| | | this.loadAjxss('产åoptç¼ç æ¥è¯¢',sql,flag,"optList"); |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <!-- import CSS --> |
| | | <link rel="stylesheet" href="../js/static/css/element.css"> |
| | | <!-- <link rel="stylesheet" href="../js/static/css/style.css"> --> |
| | | <style > |
| | | html,body{ |
| | | width: 99%; |
| | | height: 99%; |
| | | background-color: #D5EAFF; |
| | | padding: 0%; |
| | | margin: auto; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | #app{ |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | #divHead,#left,#main,.shelf{ |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); |
| | | } |
| | | input::-webkit-outer-spin-button, |
| | | input::-webkit-inner-spin-button { |
| | | -webkit-appearance: none; |
| | | } |
| | | *{ |
| | | text-align: center; |
| | | } |
| | | #mains{ |
| | | height: 100%; |
| | | width: 100%; |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | .page-scroll { |
| | | height: 100%; |
| | | } |
| | | |
| | | .page-scroll .el-scrollbar__wrap { |
| | | overflow-x: hidden; |
| | | } |
| | | img{ |
| | | width: auto; |
| | | height: auto; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="app" v-loading="loading" element-loading-background="white" > |
| | | <el-container style="width:100%;height:100%" > |
| | | <el-header style="height: 3%;"> |
| | | <el-button @click="showFlagFuc" type="primary" round style="float:left;">{{showFlag==false?'è¿å':'æ·»å ä½ä¸å¾'}}</el-button> |
| | | </el-header> |
| | | <el-main style="width:100%;height:97%" > |
| | | <el-table v-show="showFlag" |
| | | :data="produceData" |
| | | height="100%" |
| | | style="width: 100%;"> |
| | | |
| | | |
| | | <el-table-column |
| | | v-for="(item,keys,index) in tableHead[0]" |
| | | :key="index" |
| | | :label="item" |
| | | |
| | | > |
| | | <el-table-column :prop="keys" v-if="index==0" > |
| | | <template slot-scope="scope" v-if="Object.keys(produceData[0]).length!=0"> |
| | | <el-button |
| | | @click.native.prevent="updateRow(scope.$index, produceData)" |
| | | type="text" |
| | | size="small"> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | |
| | | <el-button |
| | | @click.native.prevent="updateRow1(scope.$index, produceData)" |
| | | type="text" |
| | | size="small"> |
| | | ä½åº |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column :prop="keys" v-if="index>0"> |
| | | |
| | | </el-table-column> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- æ°å¢ä¿®æ¹ --> |
| | | <div v-show="updateShowFlag" style="width: 30%;height: 50vh;float: left;margin-top: 10%;margin-left: 10%; "> |
| | | <img :src="ruleForm.route" > |
| | | </div> |
| | | |
| | | <el-form v-show="!showFlag" :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" style="width: 25%;float: right;margin-right: 20%;"> |
| | | <el-form-item> |
| | | <el-button v-show="updateShowFlag" type="primary" @click="updateGlassSub('ruleForm')" v-preventReClick ='3000'>ä¿®æ¹</el-button> |
| | | <el-button v-show="!updateShowFlag" type="primary" @click="submitForm('ruleForm')" v-preventReClick='3000'>æäº¤</el-button> |
| | | <el-button @click="resetForm('ruleForm')">éç½®</el-button> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | <el-form-item label="大å±éæ©" prop="optNum"> |
| | | <template> |
| | | <el-select v-model="ruleForm.optNum" placeholder="è¯·éæ©" clearable filterable> |
| | | <el-option |
| | | v-for="item in optList" |
| | | :key="item['0_screen_id']" |
| | | :label="item['2_screen']" |
| | | :value="item['0_screen_id']"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ä½ä¸å¾çä¸ä¼ " prop="route" > |
| | | <el-upload |
| | | :limit="1" |
| | | :on-change="changeFile" |
| | | class="upload-demo" |
| | | ref="upload" |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :file-list="fileList" |
| | | :auto-upload="false"> |
| | | <el-button slot="trigger" size="small" type="primary" >éåæä»¶</el-button> |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ jpg/pngæä»¶ï¼ä¸ä¸è¶
è¿5m</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | </el-main> |
| | | <!-- <el-footer style="background-color: azure;"></el-footer> --> |
| | | </el-container> |
| | | </div> |
| | | </body> |
| | | <!-- import Vue before Element --> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | |
| | | <script src="../js/static/js/vue.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/global.js"></script> |
| | | <!-- import JavaScript --> |
| | | <script src="../js/static/js/element.js"></script> |
| | | <script src="../js/static/js/echarts.min.js"></script> |
| | | |
| | | <script > |
| | | //import * as echarts from '../js/echarts.min.js'; |
| | | Vue.prototype.$echarts = echarts |
| | | Vue.prototype.$http= axios |
| | | let app =new Vue({ |
| | | el: '#app', |
| | | mixins:[mixin], |
| | | data(){ |
| | | var checkNum = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]{1,4}(\.[0-9]{0,2})?$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥0.01-9999.99çæ°å')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | var checkString = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©º')); |
| | | } |
| | | setTimeout(() => { |
| | | // if (value.length>255) { |
| | | // callback(new Error('æå¤§é¿åº¦255')); |
| | | // }else { |
| | | // callback(); |
| | | // } |
| | | callback(); |
| | | }, 1000); |
| | | }; |
| | | var checkThickness = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ä¸è½ä¸ºç©ºæè
0')); |
| | | } |
| | | setTimeout(() => { |
| | | let reg = new RegExp(`^[0-9]*[1-9][0-9]*$`) |
| | | |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£æ´æ°çå度')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | |
| | | }, 1000); |
| | | }; |
| | | return { |
| | | ruleForm: { |
| | | optNum:'', |
| | | route:'', |
| | | photoName:'' |
| | | }, |
| | | rules: { |
| | | optNum: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | route: [ |
| | | { validator: checkString, trigger: 'blur' } |
| | | ], |
| | | |
| | | }, |
| | | tableHead:[], |
| | | produceData:[], |
| | | showFlag:true, |
| | | updateShowFlag:false, |
| | | updateGlass:{ |
| | | id:'' |
| | | }, |
| | | optList:[], |
| | | fileList:[], |
| | | selectGlass:["","","","","","","",""], |
| | | loading:true, |
| | | |
| | | |
| | | }; |
| | | |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false |
| | | } |
| | | let sql="{call AXJ_a_largeScreen_phtot_insert(?,?,?,?)}~"+JSON.stringify(this.ruleForm); |
| | | this.connects("æ°å¢ç°åºä½ä¸å¾",sql,1,1) |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | showFlagFuc(){ |
| | | Object.keys(this.ruleForm).forEach((key) => (this.ruleForm[key] = '')); |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=false; |
| | | }, |
| | | updateRow(index,row){//ä¿®æ¹äº§åæ°æ®æ¾ç¤º |
| | | this.showFlag=!this.showFlag |
| | | this.updateShowFlag=true; |
| | | let rowObj=row[index] |
| | | this.ruleForm.optNum=rowObj["1_screen_id"] |
| | | this.ruleForm.route=rowObj["4_route"] |
| | | this.ruleForm.photoName=rowObj["3_photo_name"] |
| | | this.updateGlass.id=rowObj["0_id"] |
| | | }, |
| | | updateRow1(index,row){//ä¿®æ¹äº§åæ°æ®æ¾ç¤º |
| | | |
| | | if(!confirm("确认ä½åºå¤§å±æä»¶")){ |
| | | return false |
| | | } |
| | | let rowObj=row[index] |
| | | this.updateGlass.id=rowObj["0_id"] |
| | | let sql="{call AXJ_a_largeScreen_phtot_delete(?,?)}~"+JSON.stringify(this.updateGlass); |
| | | this.connects("大å±ä½ä¸å¾ä½åº",sql,1,1); |
| | | }, |
| | | updateGlassSub(formName){ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | let updateGlassObj=this.ruleForm |
| | | updateGlassObj.id=this.updateGlass.id |
| | | |
| | | let sql="{call AXJ_a_largeScreen_phtot_update(?,?,?,?,?)}~"+JSON.stringify(updateGlassObj); |
| | | this.connects("大å±ä½ä¸å¾ä¿®æ¹",sql,1,1); |
| | | }); |
| | | |
| | | }, |
| | | changeFile(file){//æ·»å æä»¶è§¦åçæbase64æä»¶ |
| | | const isJPG = file.raw.type === 'image/jpeg' || file.raw.type === 'image/png' ; |
| | | const isLt2M = file.size / 1024 / 1024 < 5; |
| | | |
| | | if (!isJPG) { |
| | | this.$message.error('ä¸ä¼ 头åå¾çåªè½æ¯ JPGæè
PNG æ ¼å¼!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | if (!isLt2M) { |
| | | this.$message.error('ä¸ä¼ 头åå¾ç大å°ä¸è½è¶
è¿ 5MB!') |
| | | this.$refs.upload.clearFiles() |
| | | return |
| | | } |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | let reader = new FileReader(); |
| | | console.log(file.raw.name); |
| | | reader.readAsDataURL(file.raw); |
| | | reader.onload = (e) => { |
| | | resolve(e.target.result); |
| | | |
| | | this.ruleForm.route=e.target.result; |
| | | this.ruleForm.photoName=file.raw.name; |
| | | }; |
| | | }); |
| | | }, |
| | | selectSub:function(){ |
| | | let arrObj={} |
| | | for(let i in this.selectGlass){ |
| | | arrObj[i]=this.selectGlass[i] |
| | | } |
| | | let sql="{call AXJ_a_produce_select(?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(arrObj); |
| | | this.loadAjxss('äº§åæ¥è¯¢',sql,2,"produceData"); |
| | | } |
| | | }, |
| | | computed:{ |
| | | |
| | | }, |
| | | watch:{ |
| | | produceData(){ |
| | | this.loading=false |
| | | } |
| | | }, |
| | | mounted() { |
| | | let sql="{call AXJ_a_largeScreen_phtotList_select()}"; |
| | | let flag=2; |
| | | this.loadAjxss('产ååå§æ¥è¯¢',sql,flag,"produceData"); |
| | | |
| | | sql="{call AXJ_a_largeScreen_phtotHead_select()}"; |
| | | this.loadAjxss('产å表头',sql,flag,"tableHead"); |
| | | |
| | | sql="{call AXJ_a_largeScreen_phtotScreenList_select()}"; |
| | | this.loadAjxss('ä½ä¸å¾å¤§å±å表',sql,flag,"optList"); |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <%@page import="ng.db.DBHelper"%> |
| | | <c:set var="ctx" value="${pageContext.request.contextPath}" /> |
| | | |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css"> |
| | | <!-- Font Awesome --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css"> |
| | | <!-- Ionicons --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css"> |
| | | <!-- Theme style --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css"> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css"> |
| | | |
| | | <link rel="stylesheet" href="../static/css/element.css"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | |
| | | |
| | | <script type="text/javascript"> |
| | | /* var interval = setInterval('refreshStatus()', 20000); |
| | | $(document).ready(function(){ |
| | | var info = $("#info").attr("info"); |
| | | $("#infos").html(info); |
| | | }); */ |
| | | // 设å¤é¡µé¢èªå¨å·æ° |
| | | /* function refreshStatus() { |
| | | window.location.reload(); |
| | | } |
| | | // 忢页é¢èªå¨å·æ° |
| | | function disableAutoRefresh() { |
| | | clearInterval(interval); |
| | | } */ |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | <style> |
| | | .box table tr th,.box table tr td{ |
| | | text-align:center; |
| | | } |
| | | </style> |
| | | <title>ä»»å¡</title> |
| | | </head> |
| | | <body style="padding: 20px;background-color:#D5EAFF;height:100%"> |
| | | <div id='app'> |
| | | <!-- <div style='height:20px;width:300px;background-color:#3C8DBC;float:right;'><span style = 'color:#fff;' >æ
éæ
åµ:</span><span id='infos'></span></div> --> |
| | | <section class="content-header" style="padding: 0px 15px 0 15px;"> |
| | | <h1 @dblclick="dangqianpeifang()">订åä»»å¡ </h1> |
| | | |
| | | <ol class="breadcrumb"> |
| | | |
| | | |
| | | </a></li> |
| | | </ol> |
| | | </section> |
| | | |
| | | <div id = "allstatu" ></div> |
| | | <div id = "info" ></div> |
| | | <!-- Main content --> |
| | | <input style="display:none" type="text" name="groups" value="${groups}" /> |
| | | <section class="content container-fluid" style="padding: 0px;"> |
| | | <div> |
| | | </div> |
| | | |
| | | <div class="box" style="height: 600px; overflow: auto;margin-top: 10px;"> |
| | | <table class="table table-striped table-hover" |
| | | style="overflow-x: auto;font-size: 12px;"> |
| | | <thead> |
| | | <tr> |
| | | <th>项ç®åç§°</th> |
| | | <th>åç宽度</th> |
| | | <th>åçé«åº¦</th> |
| | | <th>å°ç宽度</th> |
| | | <th>å°çé«åº¦</th> |
| | | <th>å度</th> |
| | | <th>åçæ»æ°é</th> |
| | | <th>åçå·²å å·¥æ°é</th> |
| | | <th>å°çæ»æ°é</th> |
| | | <th>å°çå·²å å·¥æ°é</th> |
| | | <th>订åç¶æ</th> |
| | | <th>å¶å人</th> |
| | | <th>æä½</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="item in shuzu" style="height: 51px;"> |
| | | <td>{{item['1_order_id']}}</td> |
| | | <td>{{item['2_original_width']}}</td> |
| | | <td>{{item['3_original_height']}}</td> |
| | | <td>{{item['4_width']}}</td> |
| | | <td>{{item['5_height']}}</td> |
| | | <td>{{item['6_thickness']}}</td> |
| | | <td>{{item['7_largeglass_no']}}</td> |
| | | <td>{{item['8_largeglass_completed']}}</td> |
| | | <td>{{item['9_smallglass_no']}}</td> |
| | | <td>{{item['10_smallglass_completed']}}</td> |
| | | <td v-if="item['11_order_status']==1"> |
| | | å·²ä¸å |
| | | </td> |
| | | <td v-else-if="item['11_order_status']==2"> |
| | | å·²é¢å |
| | | </td> |
| | | <td v-else-if="item['11_order_status']==3"> |
| | | 已宿 |
| | | </td> |
| | | <td v-else-if="item['11_order_status']==4"> |
| | | æå¨å®æ |
| | | </td> |
| | | <td v-else> |
| | | |
| | | |
| | | </td> |
| | | <td>{{item['12_order_maker']}}</td> |
| | | <td v-if="item['11_order_status']==1"> |
| | | <button @click="dainjishijian('é¢åä»»å¡',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >é¢åä»»å¡</button> |
| | | |
| | | <button @click="dainjishijian('æå¨å®æ',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >æå¨å®æ</button> |
| | | </td> |
| | | <td v-else-if="item['11_order_status']==2"> |
| | | |
| | | <button @click="dainjishijian('ç»æä»»å¡',item['0_id'])" style='background-color: red' class='btn btn-large btn-success' >ç»æä»»å¡</button> |
| | | |
| | | <button @click="dainjishijian('åæ¶ä»»å¡',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >åæ¶ä»»å¡</button> |
| | | </td> |
| | | <!-- <td v-else-if="item[11]==2"> |
| | | <button @click="dainjishijian('éæ°ä¸å',item[0])" style='background-color: #5CADFE' class='btn btn-large btn-success' >éæ°ä¸å</button> |
| | | </td> --> |
| | | <td v-else> |
| | | |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | <div class="modal fade" id="modify-info" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <input type='hidden' id = "lineprint"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true">×</button> |
| | | <h3 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h1>请è¿è¡äººè¸è¯å«ï¼æææä¸¤åé</h1> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" @click='renwuguanliquxiao' class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button id="dianjishijian" @click='getMSg' type="button" class="btn btn-primary btn-lg" |
| | | id="surefinish">æå·²è¯å«ï¼ç¡®è®¤</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | |
| | | <div class="modal fade" id="modify-infos" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true" style="height: 800px;"> |
| | | |
| | | <div class="modal-dialog" style="width: 800px;" > |
| | | <div class="modal-content" > |
| | | <table class="table table-striped table-hover" |
| | | style="overflow-x: auto;font-size: 12px;"> |
| | | <thead> |
| | | <tr> |
| | | <th>æºå¨ç¼å·</th> |
| | | <th>æºå¨åç§°</th> |
| | | <th>é
æ¹ç±»å</th> |
| | | <th>å½åé
æ¹å¼</th> |
| | | <th>åéé
æ¹å¼</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="item in shuzu2"> |
| | | <td>{{item['0_id']}}</td> |
| | | <td>{{item['1_machine_name']}}</td> |
| | | <td>{{item['2_class_html']}}</td> |
| | | <td>{{item['3_content_value']}}</td> |
| | | <td>{{item['4_content_value1']}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button v-if="peifanhao[0]['0_recipe_no']!=null" id="tiebiaoji" @click="peifangxiafa(1)" type="button" class="btn btn-primary btn-lg" |
| | | id="tiebiaoji">è´´æ æºæ°æ®ä¸å</button> |
| | | <button v-if="peifanhao[0]['0_recipe_no']!=null" id="peifangxiafa" @click="peifangxiafa(2)" type="button" class="btn btn-primary btn-lg" |
| | | id="peifangxiafa">é
æ¹ä¸å</button> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </section> |
| | | <!-- /.content --> |
| | | </div> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$http= axios |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[], |
| | | shuzu1:[], |
| | | shuzu2:[], |
| | | lines:<%= request.getParameter("id") %>, |
| | | peifanhao:[{}], |
| | | subval:{ |
| | | id:'', |
| | | type:'' |
| | | } |
| | | }, |
| | | methods:{ |
| | | dangqianpeifang(){ |
| | | |
| | | this.shuzu2=""; |
| | | let sql="{call AXJ_a_get_machine_recipe_select()}"; |
| | | let flag=2; |
| | | this.loadAjxss('任塿¥è¯¢æå',sql,flag,"shuzu2"); |
| | | let sql1="{call AXJ_qiegeguanli_peifanghao_cahxun1()}"; |
| | | this.loadAjxss('é
æ¹å·æ¥è¯¢',sql1,2,"peifanhao") |
| | | |
| | | $("#modify-infos").modal('show'); |
| | | }, |
| | | dainjishijian(type,id){ |
| | | $("#modify-info").modal('show'); |
| | | if(type=="é¢åä»»å¡"){ |
| | | this.subval.type=2; |
| | | }else if(type=="ç»æä»»å¡"){ |
| | | this.subval.type=3; |
| | | }else if(type=="æå¨å®æ"){ |
| | | this.subval.type=4; |
| | | }else if(type=="åæ¶ä»»å¡"){ |
| | | this.subval.type=1; |
| | | } |
| | | this.subval.id=id |
| | | let para={ |
| | | ids:id |
| | | } |
| | | let sql="{call AXJ_qiegeguanli_peifanghao_cahxun(?,?)}~"+JSON.stringify(para); |
| | | this.loadAjxss('é
æ¹å·æ¥è¯¢',sql,2,"peifanhao") |
| | | }, |
| | | getMSg(){ |
| | | //this.getMSgs(); |
| | | |
| | | this.renwuguanli(); |
| | | }, |
| | | getMSgs(){ |
| | | return new Promise((resolve, reject) => { |
| | | // åé第ä¸ä¸ªè¯·æ±ï¼è·å id |
| | | sql="{call AXJ_qiegeguanli_threelinetask_renwuguanli(?,?,?)}~"+JSON.stringify(this.subval); |
| | | let param = new URLSearchParams(); |
| | | param.append("gongneng",'ä»»å¡ä¿®æ¹'); |
| | | param.append("sql",sql); |
| | | param.append("flag",1); |
| | | param.append("anquanma",json["anquanma"]); |
| | | |
| | | this.$http.post('../mysqlInsert/mysql.jsp',param).then(( datas ) => { |
| | | let result=datas.data; |
| | | index = result.indexOf("[["); |
| | | if(index>-1){ |
| | | if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | | //alert('请å
ç»å½åæä½'); |
| | | window.parent.location.href='../login/index.jsp'; |
| | | }else{ |
| | | result=result.substring(index).trim() |
| | | alert(result); |
| | | reject(); |
| | | window.location.reload(); |
| | | } |
| | | }else{ |
| | | alert("ä»»å¡ä¿®æ¹æåï¼") |
| | | resolve(); |
| | | window.location.reload(); |
| | | |
| | | } |
| | | }).catch(err => { |
| | | console.log(err.msg); |
| | | }); |
| | | }) |
| | | }, |
| | | renwuguanli(){ |
| | | this.getMSgs().then(() => { |
| | | let param = new URLSearchParams(); |
| | | param.append("zt",this.subval.type); |
| | | param.append("peifanhao",this.peifanhao[0]['0_recipe_no']); |
| | | param.append("changpinghao",this.peifanhao[0]['1_changpinghao']); |
| | | param.append("way_of_working",this.peifanhao[0]['2_way_of_working']); |
| | | param.append("thickness",this.peifanhao[0]['3_thickness']); |
| | | param.append("glass_type",this.peifanhao[0]['4_glass_type']); |
| | | param.append("production_type",this.peifanhao[0]['5_production_type']); |
| | | this.$http.post( '../mysqlInsert/toPlc.jsp',param) |
| | | .then(function (response) { |
| | | console.log(response); |
| | | }) |
| | | |
| | | .catch(function (error) { |
| | | alert('Error: ' + "æå¡å¨æºå¨è¿æ¥åçé误ï¼"); |
| | | }); |
| | | }) |
| | | }, |
| | | peifangxiafa(leixing){ |
| | | if(leixing==1){ |
| | | let param = new URLSearchParams(); |
| | | param.append("zt",98); |
| | | param.append("peifanhao",this.peifanhao[0]['0_recipe_no']); |
| | | this.$http.post( '../mysqlInsert/toPlc.jsp',param) |
| | | .then(function (response) { |
| | | console.log(response); |
| | | }) |
| | | |
| | | .catch(function (error) { |
| | | alert('Error: ' + "æå¡å¨æºå¨è¿æ¥åçé误ï¼"); |
| | | }); |
| | | }else if(leixing==2){ |
| | | let param = new URLSearchParams(); |
| | | param.append("zt",99); |
| | | param.append("peifanhao",this.peifanhao[0]['0_recipe_no']); |
| | | param.append("changpinghao",this.peifanhao[0]['1_changpinghao']); |
| | | param.append("way_of_working",this.peifanhao[0]['2_way_of_working']); |
| | | param.append("thickness",this.peifanhao[0]['3_thickness']); |
| | | param.append("glass_type",this.peifanhao[0]['4_glass_type']); |
| | | param.append("production_type",this.peifanhao[0]['5_production_type']); |
| | | this.$http.post( '../mysqlInsert/toPlc.jsp',param) |
| | | .then(function (response) { |
| | | console.log(response); |
| | | }) |
| | | |
| | | .catch(function (error) { |
| | | alert('Error: ' + "æå¡å¨æºå¨è¿æ¥åçé误ï¼"); |
| | | }); |
| | | } |
| | | |
| | | |
| | | }, |
| | | renwuguanliquxiao:function(){ |
| | | this.subval=''; |
| | | } |
| | | |
| | | }, |
| | | mounted:function(){ |
| | | let canshu={ |
| | | line:<%= request.getParameter("id") %> |
| | | } |
| | | this.shuzu=""; |
| | | let sql="{call AXJ_qiegeguanli_threelinetask_list1()}"; |
| | | let flag=2; |
| | | this.loadAjxss('任塿¥è¯¢æå',sql,flag,"shuzu"); |
| | | /* sql="{call AXJ_qiegeguanli_peifanghao_cahxun()}"; |
| | | loadAjxs('é
æ¹å·æ¥è¯¢',sql,flag,"peifanhao"); */ |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="ng.db.DBHelper"%> |
| | | <%@ page contentType="text/html;charset=UTF-8" %> |
| | | <c:set var="ctx" value="${pageContext.request.contextPath}"/> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css"> |
| | | <!-- Font Awesome --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css"> |
| | | <!-- Ionicons --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css"> |
| | | <!-- Theme style --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css"> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <link href="../static/styles/default.css" type="text/css" rel="stylesheet" /> |
| | | <script src="../static/holder.js" type="text/javascript"></script> |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | |
| | | <title>ä¸çä½</title> |
| | | <script type="text/javascript"> |
| | | var interval = setInterval('refreshStatus()', 10000); |
| | | $(document).ready(function(){ |
| | | var info = $("#info").attr("info"); |
| | | $("#infos").html(info); |
| | | }); |
| | | // 设å¤é¡µé¢èªå¨å·æ° |
| | | /* function refreshStatus() { |
| | | window.location.reload(); |
| | | } */ |
| | | |
| | | // 忢页é¢èªå¨å·æ° |
| | | function disableAutoRefresh() { |
| | | clearInterval(interval); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å åç |
| | | */ |
| | | function addload(loadMachineRackId){ |
| | | disableAutoRefresh() |
| | | $("#add-info").modal('show'); |
| | | $("#addRawPackage").val(loadMachineRackId); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å åºå®ææ¶ä¿¡æ¯ |
| | | */ |
| | | function addinfo(loadMachineRackId){ |
| | | disableAutoRefresh() |
| | | $("#add-fix-info").modal('show'); |
| | | $("#fixrack").val("åºå®ææ¶"+loadMachineRackId); |
| | | $("#add-fix").val(loadMachineRackId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å é¤åºå®ææ¶ä¿¡æ¯ |
| | | */ |
| | | function deleteinfo(loadMachineRackId){ |
| | | disableAutoRefresh() |
| | | $('#deletefixinfo').modal('toggle'); |
| | | $("#fixlinenumber").val(loadMachineRackId); |
| | | } |
| | | /** |
| | | * ä¿®æ¹åç |
| | | */ |
| | | function modifyload(loadMachineRackId){ |
| | | disableAutoRefresh() |
| | | $("#modify-info").modal('show'); |
| | | $("#midifyRawPackage").val(loadMachineRackId); |
| | | } |
| | | |
| | | function tuikuload(loadMachineRackId){ |
| | | disableAutoRefresh(); |
| | | $.ajax({ |
| | | async: false, |
| | | |
| | | type:"GET", |
| | | |
| | | url:"${ctx}/shelfmanager/tuikuinfo/"+loadMachineRackId, |
| | | |
| | | dataType:"text", |
| | | |
| | | success:function(data){ |
| | | window.location.href="${ctx}/cutmanage/loadmachinerack"; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function deleteload(id){ |
| | | disableAutoRefresh(); |
| | | $('#taskFinish').modal('toggle'); |
| | | $("#lineprint").val(id); |
| | | } |
| | | |
| | | $(document).delegate('#surefinish','click',function(){ |
| | | var id = $("#lineprint").val(); |
| | | $.ajax({ |
| | | async: false, |
| | | |
| | | type:"GET", |
| | | |
| | | url:"${ctx}/cutmanage/deleteinfo/"+id, |
| | | |
| | | dataType:"text", |
| | | |
| | | success:function(data){ |
| | | alert(id+"å·ä½ä¿¡æ¯æ¸
é¤å®æï¼"); |
| | | window.location.href="${ctx}/cutmanage/loadmachinerack"; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $(document).delegate('#deletefixinfo','click',function(){ |
| | | var id = $("#fixlinenumber").val(); |
| | | $.ajax({ |
| | | async: false, |
| | | |
| | | type:"GET", |
| | | |
| | | url:"${ctx}/cutmanage/deletefixinfo/"+id, |
| | | |
| | | dataType:"text", |
| | | |
| | | success:function(data){ |
| | | alert(data); |
| | | alert(id+"å·å岿ºåºå®ææ¶ä¿¡æ¯æ¸
é¤å®æï¼"); |
| | | window.location.href="${ctx}/loadmachine/loadmachinerack"; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | </head> |
| | | <body style="padding: 20px;background-color:#D5EAFF;height:100%"> |
| | | <div id="app"> |
| | | <div> |
| | | <section class="content-header"> |
| | | <h1> |
| | | ä¸ç设å¤ä¿¡æ¯ |
| | | <small></small> |
| | | </h1> |
| | | <ol class="breadcrumb"> |
| | | <li><a href="${ctx }/loadmachine/loadmachinerack"><i class="fa fa-reply"></i>ä¸çæºä¿¡æ¯</a></li> |
| | | <li class="active"></li> |
| | | </ol> |
| | | </section> |
| | | <div id = "info" info = "${info}"></div> |
| | | </div> |
| | | <div> |
| | | <!-- Main content --> |
| | | <section class="content container-fluid"> |
| | | <div class="box" style="height: 525px; overflow: auto;"> |
| | | <div class="box-header"> |
| | | </div> |
| | | <!-- /.box-header --> |
| | | <div class="box-body no-padding" style="background-color: aliceblue;"> |
| | | <table class="table table-striped" style="font-size: large;"> |
| | | <thead> |
| | | <tr> |
| | | <th width="15%">ä¸çæº</th> |
| | | <th width="10%">ä¸çä½</th> |
| | | <th width="25%">åçä¿¡æ¯</th> |
| | | <th >缺ç</th> |
| | | <th width="30%">æä½</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for='items in shuzu'> |
| | | <td v-show="items['0_count']!=''" :rowspan="items['0_count']">{{items['1_jiqi']}} {{items['2_connect_state']}}</td> |
| | | <td>{{items['3_shangpianwei']}}</td> |
| | | <td>{{items['4_tishi']}}</td> |
| | | <td></td> |
| | | <td v-if="items['4_tishi']!=''"> |
| | | |
| | | <button @click="updateGlassNum(items['5_id'])" style="background-color: #5CADFE" class="btn btn-large btn-warning" >ä¿®æ¹åç</button> |
| | | |
| | | <button @click="claerMsg(items['7_id'],items['6_id'])" style="background-color: #5CADFE" class="btn btn-large btn-danger" >æ¸
餿¶æ¯</button> |
| | | |
| | | <button @click="tuiku(items['7_id'],items['6_id'])" style="background-color: #5CADFE" class="btn btn-large btn-danger" >éåº</button> |
| | | </td> |
| | | <td v-else> |
| | | <button @click="addGlass(items['7_id'],items['6_id'])" style="background-color: #5CADFE" class="btn btn-large btn-success" >æ·»å åç</button> |
| | | </td> |
| | | </tr> |
| | | |
| | | </tbody> |
| | | </table> |
| | | |
| | | </div> |
| | | |
| | | <div class="box-body no-padding" style="background-color: aliceblue;margin-top: 20px;"> |
| | | <table class="table table-striped" style="font-size: large;"> |
| | | <thead> |
| | | <tr> |
| | | <th width="15%">åè£
ä½</th> |
| | | <th>ææ¶ç¼å·</th> |
| | | <th width="20%">æä½</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for='items in shuzu1'> |
| | | <td>{{items['0_number']}}</td> |
| | | <td>{{items['1_id']}}</td> |
| | | <td v-if="items['1_id']!=''"> |
| | | |
| | | |
| | | <button @click="claerMsg(items['4_id'],items['3_id'])" style="background-color: #5CADFE" class="btn btn-large btn-danger" >æ¸
餿¶æ¯</button> |
| | | <!-- |
| | | <button style="background-color: #5CADFE" class="btn btn-large btn-danger" onclick="tuikuload(1)">éåº</button> --> |
| | | </td> |
| | | <td v-else> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | </tbody> |
| | | </table> |
| | | |
| | | </div> |
| | | </div> |
| | | <%-- <div class="box" style="height: 220px; overflow: auto;"> |
| | | <div class="box-header"> |
| | | </div> |
| | | <!-- /.box-header --> |
| | | <div class="box-body no-padding"> |
| | | <table class="table table-striped" style="font-size: large;"> |
| | | <thead> |
| | | <tr> |
| | | <th width="15%">åºå®ææ¶</th> |
| | | <th width="10%">ç¼å·</th> |
| | | <th>åçä¿¡æ¯</th> |
| | | <th width="20%">æä½</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody>${loadMachineFixHtml}</tbody> |
| | | </table> |
| | | </div> |
| | | </div> --%> |
| | | <div class="modal fade" id="add-info" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">æ·»å åç</h3> |
| | | </div> |
| | | <form class="form-horizontal" role="form" id="category_add" |
| | | action="${ctx}/cutmanage/addAction" method="post"> |
| | | <input type="hidden" id="addRawPackage" name="Ids"> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">ææ¶å· </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" id="shelfRankInput" name="shelfRankNumber" |
| | | style="width: 250px; height: 35px; font-size: 20px" |
| | | readonly="readonly"> |
| | | <div class="btn-group" style="margin-top: -10px"> |
| | | <button class="btn btn-primary dropdown-toggle" |
| | | data-toggle="dropdown"> |
| | | éæ© <span class="caret"></span> |
| | | </button> |
| | | <ul class="dropdown-menu" style="height: 320px; overflow: auto;"> |
| | | <li v-for='items in shelfRack' style="font-size: 20px"> |
| | | <a href="#" onclick="$('#shelfRankInput').val($(this).text())">{{items['0_number']}}</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é¢è²èç³» </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" id="colors" name="color" |
| | | style="width: 250px; height: 35px; font-size: 20px" |
| | | readonly="readonly"> |
| | | <div class="btn-group" style="margin-top: -10px"> |
| | | <button class="btn btn-primary dropdown-toggle" |
| | | data-toggle="dropdown"> |
| | | éæ© <span class="caret"></span> |
| | | </button> |
| | | <ul class="dropdown-menu" style="height: 280px; overflow: auto;background-color:bule"> |
| | | <li v-for='color in colors' style="font-size: 20px;background-color:bule"><a href="#" |
| | | onclick="$('#colors').val($(this).text())">{{color['0_glass_id']}}</a></li> |
| | | </ul> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">宽度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.wid" required="required" type="number" class=" sortNumber form-control" |
| | | value="" name="width" id="width2" |
| | | onclick="app.$data.glass.wid=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é«åº¦ </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.heig" required="required" type="number" class="form-control" id="height2" |
| | | value="" name="height" |
| | | onclick="app.$data.glass.heig=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">å度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.thinkness" required="required" type="number" class=" sortNumber form-control" |
| | | value="" name="thickness" |
| | | id="thickness2" |
| | | onclick="app.$data.glass.thinkness=''" |
| | | style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ°é </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="number" required="required" max="9000" min="0" class=" sortNumber form-control" |
| | | v-model="glass.num" name="pieces1" id="pieces1" |
| | | onclick="app.$data.glass.num=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button @click="addGlassSub()" type="button" class="btn btn-primary btn-lg"> |
| | | æäº¤ |
| | | </button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal fade" id="modify-info" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">ä¿®æ¹åçæ°é</h3> |
| | | </div> |
| | | <form class="form-horizontal" role="form" id="category_add" |
| | | action="${ctx}/cutmanage/modifyAction" method="post"> |
| | | <input type="hidden" id="midifyRawPackage" name="Ids"> |
| | | <div class="modal-body"> |
| | | |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ°é </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" class=" sortNumber form-control" |
| | | v-model="pieces" name="pieces1" id="pieces" |
| | | onclick="app.$data.pieces=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button @click="updateNum" type="button" class="btn btn-primary btn-lg" |
| | | id="addbtnsubmit">æäº¤</button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal fade" id="taskFinish" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <input type='hidden' id = "lineprint"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true">×</button> |
| | | <h3 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h3>æ¨ç¡®å®è¦æ¸
é¤å½åä¸çä½ä¿¡æ¯ä¹ï¼</h3> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button @click="claerMsgSub" type="button" class="btn btn-primary btn-lg" |
| | | id="surefinish">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="modal fade" id="deletefixinfo" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <input type='hidden' id = "fixlinenumber"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true">×</button> |
| | | <h3 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h3>æ¨ç¡®å®è¦å é¤åºå®ææ¶éé¢çä¿¡æ¯ä¹ï¼</h3> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button @click="claerMsgSub()" type="button" class="btn btn-primary btn-lg" |
| | | id="surefinish">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | |
| | | <div class="modal fade" id="tuikuhtml" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <input type='hidden' id = "fixlinenumber"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true">×</button> |
| | | <h3 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h3>æ¨ç¡®å®è¦éåºï¼</h3> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button @click="tuikuSub()" type="button" class="btn btn-primary btn-lg" |
| | | id="surefinish">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | |
| | | </section> |
| | | </div> |
| | | <!-- /.content --> |
| | | </div> |
| | | <!-- /.content-wrapper --> |
| | | </body> |
| | | |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | <script src="../js/axios.min.js"></script> |
| | | <script src="../js/mixins.js"></script> |
| | | <script src="../js/vue.min.js"></script> |
| | | |
| | | <script> |
| | | Vue.prototype.$http= axios |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[], |
| | | shuzu1:[], |
| | | shelfRack:[{}], |
| | | colors:[{}], |
| | | updateGlassId:"", |
| | | pieces:"", |
| | | clearGlassMsg:{ |
| | | shelfid:"", |
| | | loadrackid:"" |
| | | }, |
| | | addGlassVal:{ |
| | | loadrackid:"" |
| | | }, |
| | | glass:{ |
| | | "shelfID":"", |
| | | "loadid":"", |
| | | "color":"", |
| | | "wid":"", |
| | | "heig":"", |
| | | "thinkness":"", |
| | | "num":"", |
| | | } |
| | | }, |
| | | methods:{ |
| | | updateGlassNum:function(glassid){ |
| | | this.updateGlassId=glassid |
| | | $("#modify-info").modal('show'); |
| | | }, |
| | | updateNum:function(){ |
| | | sql="{call AXJ_qiegeguanli_shangpianwei_updatePieces(?,?,?)}~"+"{'packageid':'"+this.updateGlassId+"','pieces':'"+this.pieces+"'}"; |
| | | //console.log(sql); |
| | | this.connects("ä¸çä¿®æ¹åçæ°é",sql,1,1); |
| | | }, |
| | | claerMsg:function(shelfid,loadrackid){ |
| | | disableAutoRefresh(); |
| | | $('#taskFinish').modal('toggle'); |
| | | this.clearGlassMsg.shelfid=shelfid; |
| | | this.clearGlassMsg.loadrackid=loadrackid; |
| | | |
| | | }, |
| | | claerMsgSub:function(){ |
| | | sql="{call AXJ_qiegeguanli_shangpianwei_qingchuxiaoxi(?,?,?)}~"+"{'shelfid':'"+this.clearGlassMsg.shelfid+"','loadrackid':'"+this.clearGlassMsg.loadrackid+"'}"; |
| | | //console.log(sql); |
| | | this.connects("ä¸çæ¸
é¤åçä¿¡æ¯",sql,1,1); |
| | | }, |
| | | addGlass:function(shelfid,loadRackId){ |
| | | disableAutoRefresh() |
| | | $("#add-info").modal('show'); |
| | | this.glass.shelfID=shelfid; |
| | | this.glass.loadid=loadRackId; |
| | | }, |
| | | addGlassSub:function(){ |
| | | let errortext="没æè¾å
¥åç"; |
| | | this.glass.shelfID=$('#shelfRankInput').val(); |
| | | this.glass.color=$('#colors').val(); |
| | | if(this.glass.shelfID==null||this.glass.shelfID==""){ |
| | | errortext+="ææ¶å· "; |
| | | } |
| | | if(this.glass.wid==null||this.glass.wid==""){ |
| | | errortext+="宽度 "; |
| | | } |
| | | if(this.glass.heig==null||this.glass.heig==""){ |
| | | errortext+="é«åº¦ "; |
| | | } |
| | | if(this.glass.thinkness==null||this.glass.thinkness==""){ |
| | | errortext+="å度 "; |
| | | } |
| | | if(this.glass.num==null||this.glass.num==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(this.glass.color==null||this.glass.color==""){ |
| | | errortext+="èç³» "; |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | return false; |
| | | } |
| | | let sql="{call AXJ_qiegeguanli_shangpianwei_tianjiayuanpian(?,?,?,?,?,?,?,?)}~"+JSON.stringify(this.glass); |
| | | this.connects("ä¸ç使·»å åç",sql,1,1); |
| | | }, |
| | | tuiku:function(shelfid,loadrackid){ |
| | | disableAutoRefresh(); |
| | | $('#tuikuhtml').modal('toggle'); |
| | | this.clearGlassMsg.shelfid=shelfid; |
| | | this.clearGlassMsg.loadrackid=loadrackid; |
| | | }, |
| | | tuikuSub:function(){ |
| | | sql="{call AXJ_qiegeguanli_shangpianwei_tuiku(?,?,?)}~"+"{'shelfid':'"+this.clearGlassMsg.shelfid+"','loadrackid':'"+this.clearGlassMsg.loadrackid+"'}"; |
| | | //console.log(sql); |
| | | this.connects("éåºä»»å¡å·²çæ",sql,1,1); |
| | | } |
| | | }, |
| | | mounted:function(){ |
| | | this.shuzu=""; |
| | | this.shuzu1=""; |
| | | let sql="{call AXJ_qiegeguanli_shangpianwei_chaxun()}"; |
| | | let flag=2; |
| | | this.loadAjxss('ä»å¨ä»»å¡ä¸é¢æ¥è¯¢',sql,flag,"shuzu"); |
| | | let sql1="{call AXJ_qiegeguanli_shangpianwei_chaxun1()}"; |
| | | |
| | | this.loadAjxss('ä»å¨ä»»å¡ä¸é¢æ¥è¯¢',sql1,flag,"shuzu1"); |
| | | sql="{call AXJ_liaojiaguanli_colors(?)}"; |
| | | this.loadAjxss('ä¸çä½é¢è²æ¥è¯¢',sql,flag,"colors"); |
| | | sql="{call AXJ_liaojiaguanli_shelfrack_shangpianwei()}"; |
| | | this.loadAjxss('ä¸ç使¶åæ¥è¯¢',sql,flag,"shelfRack"); |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <%@page import="ng.db.DBHelper"%> |
| | | <%@ page language="java" contentType="text/html; charset=utf-8" |
| | | pageEncoding="utf-8"%> |
| | | <c:set var="ctx" value="${pageContext.request.contextPath}" /> |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | <html> |
| | | <head> |
| | | <!-- Font Awesome --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css"> |
| | | <!-- Ionicons --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css"> |
| | | <!-- Theme style --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css"> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css"> |
| | | <link rel="stylesheet" href="..//static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css"> |
| | | <link href="../static/bootstrap/2.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet"/> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <title>ä»å¨ä»»å¡ä¿¡æ¯</title> |
| | | <!-- jQuery 3 --> |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <!-- Bootstrap 3.3.7 --> |
| | | |
| | | <!-- DataTables --> |
| | | <!-- SlimScroll --> |
| | | <!-- FastClick --> |
| | | <script type="text/javascript"> |
| | | /* var interval = setInterval('refreshStatus()', 5000); |
| | | $(document).ready(function(){ |
| | | var info = $("#info").attr("info"); |
| | | $("#infos").html(info); |
| | | }); */ |
| | | // 设å¤é¡µé¢èªå¨å·æ° |
| | | /* function refreshStatus() { |
| | | window.location.reload(); |
| | | } */ |
| | | |
| | | // 忢页é¢èªå¨å·æ° |
| | | function disableAutoRefresh() { |
| | | clearInterval(interval); |
| | | } |
| | | |
| | | |
| | | /* function delAll(type){ |
| | | var checkboxs=document.getElementsByName('id'); |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | var taskid=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"${ctx}/shelfmanager/updateshelftask", |
| | | data:{ |
| | | "taskid":taskid, |
| | | "type":type |
| | | },success:function(data){ |
| | | window.location.href="${ctx}/shelfmanager/shelftask"; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } */ |
| | | </script> |
| | | </head> |
| | | |
| | | <body style="background-color:#D5EAFF;height:100%"> |
| | | <!-- Content Wrapper. Contains page content --> |
| | | <div class="" id='app' style='background-color:#D5EAFF;height:100%'> |
| | | <!-- Content Header (Page header) --> |
| | | <section class="content-header"> |
| | | <h1> |
| | | ä»å¨ä»»å¡ <small>详æ
</small> |
| | | </h1> |
| | | <ol class="breadcrumb"> |
| | | <li><a href="../shelfmanager/taskimport"><i |
| | | class="fa fa-reply"></i>ä»å¨ä»»å¡</a></li> |
| | | <li class="active">详æ
</li> |
| | | </ol> |
| | | </section> |
| | | <div id = "allstatu" ></div> |
| | | <div id = "info" ></div> |
| | | <div> |
| | | |
| | | <!-- Main content --> |
| | | <section class="content container-fluid"> |
| | | <div class="box box-default" style="background-color:#D5EAFF;"> |
| | | <div class="box-header with-border"> |
| | | <h3 class="box-title">ä»å¨</h3> |
| | | <span :class="classname">{{connect[0]['0_connect_state']}}</span> |
| | | </div> |
| | | <!-- /.box-header --> |
| | | <button type="button" @click="delAll('éæ°å¼å§')" class="btn btn-primary ">éæ°å¼å§</button> |
| | | <button type="button" @click="delAll('宿')" class="btn btn-primary ">ä»»å¡å®æ</button> |
| | | <button type="button" @click="delAll('å é¤')" class="btn btn-primary ">å é¤ä»»å¡</button> |
| | | <div class="box-body" style="height:365px;overflow-y:auto;"> |
| | | <table class="table table-striped table-hover" |
| | | style="font-size: 18px;" id="example2"> |
| | | <thead> |
| | | <tr> |
| | | <th>éæ©</th> |
| | | <th>ä»»å¡ç¼å·</th> |
| | | <th>ä»»å¡æè¿°</th> |
| | | <th>ä»»å¡ç¶æ</th> |
| | | <th>ç»çå度</th> |
| | | <th>ç»çèç³»</th> |
| | | <th>å建æ¶é´</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="items in shuzu"> |
| | | <td><input v-model="shelftaskids" type='checkbox' :value="items['0_id']"/></td> |
| | | <td>{{items['0_id']}}</td> |
| | | <td>{{items['1_task_type']}}</td> |
| | | <td>{{items['2_task_state']}}</td> |
| | | <td>{{items['8_raw_thickness']}}</td> |
| | | <td>{{items['9_color']}}</td> |
| | | <td>{{items['6_start_time']}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </section> |
| | | </div> |
| | | <div class="callout callout-warning" style="background-color:#D5EAFF !important; border-left:0px"> |
| | | <div style='text-align: center;color:red;font-size:30px;border-left:0;'>${lackGlassHtml}</div> |
| | | <h4 style="color: black;">æ
éæä½</h4> |
| | | <p style="color: black;">å½å°è½¦åçæ
éæ¶ï¼å¯¼è´æä»¬ç任塿²¡æå®æå°±å¤±è´¥äºãå°è½¦åé¶ç¹ï¼è¿æ ·æä»¬çä»»å¡å°±ä¼ä¸ç´å µå¨åæçé£ä¸ªä»»å¡ï¼å®æä¸å¦æä»¬é½ä¸æ¸
æ¥ï¼éè¦å»æå¨è§£å³ï¼ä»»å¡å®æçè¯ï¼ç¹å»ä»»å¡å®ææé®ï¼æ²¡æå®æç¹å»éæ°å¼å§æé®</p> |
| | | <br> |
| | | <div style='text-align: center;'> |
| | | <!-- <span style='font-size: 30px;color: black;'> |
| | | å½åä»»å¡ï¼{{shuzu[1]["3"]!="æ£å¨å·¥ä½"?"æ ":shuzu[1]["2"].replace("å°","ã"+shuzu[1][4]+"ãå°ã")+shuzu[1][5]+"ã" }} |
| | | </span> |
| | | <br> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- /.content --> |
| | | <!-- /.content-wrapper --> |
| | | <!-- page script --> |
| | | |
| | | <script src="../js/main.js"></script> |
| | | <script |
| | | src="../static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
| | | |
| | | <script> |
| | | let app = new Vue({ |
| | | el:'#app', |
| | | mixins:[mixin], |
| | | data:{ |
| | | shuzu:[], |
| | | connect:"", |
| | | shelftaskids:[], |
| | | classname:'' |
| | | }, |
| | | methods:{ |
| | | delAll:function(types){ |
| | | console.log(this); |
| | | if(this.shelftaskids.length<1){ |
| | | alert("请è³å°éæ©ä¸æ¡ï¼"); |
| | | return false; |
| | | } |
| | | let sql=""; |
| | | for(let taskid of this.shelftaskids){ |
| | | sql="{call AXJ_liaojiaguanli_cangchurenwu_dianji(?,?,?)}~"+"{'taskid':'"+taskid+"','type':'"+types+"'}"; |
| | | this.connects(types,sql,2,1); |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | shuzu(newVal){ |
| | | for(let i=0;i<newVal.length;i++){ |
| | | switch (newVal[i]['1_task_type']) { |
| | | case "ä»ä»ä½å°ä¸çä½": |
| | | newVal[i]['1_task_type']="ä»ã"+newVal[i]['3_shelf_rack']+"ãä»ä½å°ã"+newVal[i]['4_load_rack']+"ãä¸çä½"; |
| | | break; |
| | | case "ä»ä¸çä½å°ä»ä½": |
| | | newVal[i]['1_task_type']="ä»ã"+newVal[i]['4_load_rack']+"ãä¸çä½å°ã"+newVal[i]['3_shelf_rack']+"ãä»ä½"; |
| | | break; |
| | | |
| | | case "ä»ä»ä½å°åè£
ä½": |
| | | newVal[i]['1_task_type']="ä»ã"+newVal[i]['3_shelf_rack']+"ãä»ä½å°ã"+newVal[i]['4_load_rack']+"ãåè£
ä½"; |
| | | break; |
| | | case "ä»åè£
ä½å°ä»ä½": |
| | | newVal[i]['1_task_type']="ä»ã"+newVal[i]['4_load_rack']+"ãåè£
ä½å°ã"+newVal[i]['3_shelf_rack']+"ãä»ä½"; |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | async mounted(){ |
| | | let sql="{call AXJ_liaojiaguanli_cangchurenwuxiangxi(?)}"; |
| | | let flag=2; |
| | | this.loadAjxss('ä»å¨ä»»å¡ä¸é¢æ¥è¯¢',sql,flag,"shuzu"); |
| | | sql="{call AXJ_liaojiaguanli_cangchurenwu_lianjie(?)}"; |
| | | await this.loadAjxss('ä»å¨ä»»å¡è¿æ¥',sql,flag,"connect"); |
| | | this.classname=this.connect[0]['1_classname'] |
| | | } |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <%@page import="ng.db.DBHelper"%> |
| | | <%@ page contentType="text/html;charset=UTF-8"%> |
| | | <%-- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> --%> |
| | | <c:set var="ctx" value="${pageContext.request.contextPath}" /> |
| | | <html> |
| | | <head> |
| | | <title>ææ¶ç®¡ç</title> |
| | | |
| | | <!-- Font Awesome --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css"> |
| | | <!-- Ionicons --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css"> |
| | | <!-- Theme style --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css"> |
| | | <!-- AdminLTE Skins. We have chosen the skin-blue for this starter |
| | | page. However, you can choose any other skin. Make sure you |
| | | apply the skin class to the body tag so the changes take effect. --> |
| | | <link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css"> |
| | | <link rel="stylesheet" href="..//static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css"> |
| | | <style type="text/css"> |
| | | @IMPORT url("../static/global/showtask/showtask.css"); |
| | | </style> |
| | | |
| | | <script> |
| | | var contextPath = "${pageContext.request.contextPath}"; |
| | | </script> |
| | | |
| | | <link type="text/css" rel="stylesheet" |
| | | href="../static/css/dataTables.bootstrap.css" /> |
| | | <link type="text/css" rel="stylesheet" |
| | | href="../static/css/dataTables.tableTools.css" /> |
| | | |
| | | <script src="../js/jquery-3.4.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/jquery.dataTables.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/dataTables.bootstrap.js"></script> |
| | | <script type="text/javascript" src="../static/js/dataTables.tableTools.js"></script> |
| | | <script type="text/javascript" src="../static/js/moment.js"></script> |
| | | <script type="text/javascript" src="../static/js/sucaijiayuan.js"></script> |
| | | <script type="text/javascript" src="../static/laydate/laydate.js"></script> |
| | | <script type="text/javascript" src="../static/util/utilAlert.js"></script> |
| | | |
| | | <style type="text/css"> |
| | | .rank { |
| | | font-weight: bolder; |
| | | margin-left: 10px; |
| | | font-size: 18px; |
| | | vertical-align: bottom; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .btn-lg { |
| | | margin-left: 90px; |
| | | } |
| | | |
| | | #linheight{ |
| | | height: 30px; |
| | | } |
| | | |
| | | #task { |
| | | height: 200px; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .use { |
| | | margin-left: 30px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | #blockdiv { |
| | | width: 400px; |
| | | height: 475px; |
| | | float: left; |
| | | display: none; |
| | | font-size: 35px; |
| | | position: absolute; |
| | | opacity: 1; |
| | | background: Silver; |
| | | z-index: 1; |
| | | /* border: 1px solid #ccc; */ |
| | | color: black; |
| | | pointer-events: none; |
| | | } |
| | | #example tbody { |
| | | display:block; |
| | | height:320px; |
| | | overflow-y:scroll; |
| | | } |
| | | #example thead,#example tbody tr { |
| | | display:table; |
| | | width:100%; |
| | | table-layout:fixed; |
| | | } |
| | | #example thead { |
| | | width: calc(100% - 1em); |
| | | } |
| | | #example thead th { |
| | | background:#ccc; |
| | | } |
| | | td, th { |
| | | padding: 6px; |
| | | } |
| | | </style> |
| | | |
| | | <script type="text/javascript"> |
| | | |
| | | //let interval = setInterval('refreshStatus()', 20000); |
| | | //设å¤é¡µé¢èªå¨å·æ° |
| | | /* function refreshStatus() { |
| | | window.location.reload(); |
| | | } |
| | | //忢页é¢èªå¨å·æ° |
| | | function disableAutoRefresh() { |
| | | clearInterval(interval); |
| | | } |
| | | $(document).ready(function(){ |
| | | var info = $("#info").attr("info"); |
| | | $("#infos").html(info); |
| | | }); |
| | | |
| | | /*å é¤ */ |
| | | function delAll(){ |
| | | var checkboxs=document.getElementsByName('id'); |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | var MachineId=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/rackdelete", |
| | | data:{ |
| | | "MachineId":MachineId |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /*ç¦ç¨å¯ç¨ */ |
| | | function endAll(type){ |
| | | var checkboxs=document.getElementsByName('id'); |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | var MachineId=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/EnableDisablesReset", |
| | | data:{ |
| | | "MachineId":MachineId, |
| | | "type":type |
| | | },success:function(data){ |
| | | |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | function oncheck1(){ |
| | | var a=true; |
| | | var checklist=document.getElementsByName('id'); |
| | | for(var i=0;i<checklist.length;i++){ |
| | | if(checklist[i].checked){ |
| | | a=false; |
| | | |
| | | } |
| | | } |
| | | if(a){ |
| | | alert("请éä¸ä¸è¡"); |
| | | } |
| | | else{ |
| | | var rackid; |
| | | var checkboxs=document.getElementsByName('id'); |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | rackid=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | } |
| | | } |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/deleteAll", |
| | | data:{ |
| | | "rackid":rackid, |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | function ruku1(){ |
| | | var a=true; |
| | | var checklist=document.getElementsByName('id'); |
| | | for(var i=0;i<checklist.length;i++){ |
| | | if(checklist[i].checked){ |
| | | a=false; |
| | | |
| | | } |
| | | } |
| | | if(a){ |
| | | alert("请éä¸ä¸è¡"); |
| | | } |
| | | else{ |
| | | var rackid; |
| | | var checkboxs=document.getElementsByName('id'); |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | rackid=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | } |
| | | } |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/addshelfracks1", |
| | | data:{ |
| | | "rackid":rackid, |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | function ruku(){ |
| | | |
| | | $("#myModal-add-info").modal('show'); |
| | | /* $("#myModal-add-info").attr("class","modal fade in"); |
| | | $("#myModal-add-info").css("display","block"); |
| | | $("#myModal-add-info").css("padding-left","22px"); */ |
| | | disableAutoRefresh() |
| | | |
| | | } |
| | | function updatecount(){ |
| | | |
| | | $("#add-info1").modal('show'); |
| | | disableAutoRefresh() |
| | | } |
| | | |
| | | |
| | | function oncheck(){ |
| | | var a=true; |
| | | var checklist=document.getElementsByName('id'); |
| | | for(var i=0;i<checklist.length;i++){ |
| | | if(checklist[i].checked){ |
| | | a=false; |
| | | |
| | | } |
| | | } |
| | | if(a){ |
| | | alert("请éä¸ä¸è¡"); |
| | | } |
| | | else{ |
| | | $("#add-info").modal('show'); |
| | | disableAutoRefresh() |
| | | } |
| | | |
| | | } |
| | | |
| | | /* function updateAll(){ |
| | | var a=true; |
| | | var checklist=document.getElementsByName('id'); |
| | | for(var i=0;i<checklist.length;i++){ |
| | | if(checklist[i].checked){ |
| | | a=false; |
| | | |
| | | } |
| | | } |
| | | if(a){ |
| | | alert("请éä¸ä¸è¡"); |
| | | } |
| | | else{ |
| | | $("#add-info1").modal('show'); |
| | | disableAutoRefresh() |
| | | |
| | | |
| | | } |
| | | |
| | | } */ |
| | | //æ·»å |
| | | /* function addrack(){ |
| | | var colors=document.getElementById("colors").value; |
| | | var width=document.getElementById("width1").value; |
| | | var heigth=document.getElementById("height1").value; |
| | | var thickness=document.getElementById("thickness1").value; |
| | | var pieces=document.getElementById("pieces1").value; |
| | | var rackid; |
| | | var checkboxs=document.getElementsByName('id'); |
| | | var errortext="没æè¾å
¥åç"; |
| | | |
| | | if(width==null||width==""){ |
| | | errortext+="宽度 "; |
| | | } |
| | | if(heigth==null||heigth==""){ |
| | | errortext+="é«åº¦ "; |
| | | } |
| | | if(thickness==null||thickness==""){ |
| | | errortext+="å度 "; |
| | | } |
| | | if(pieces==null||pieces==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(colors==null||colors==""){ |
| | | errortext+="èç³» ";x |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | }else{ |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | rackid=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | } |
| | | } |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/addshelfrack", |
| | | data:{ |
| | | "rackid":rackid, |
| | | "colors":colors, |
| | | "width":width, |
| | | "heigth":heigth, |
| | | "thickness":thickness, |
| | | "pieces":pieces |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | //ä¿®æ¹æ°é |
| | | function addrack1(){ |
| | | |
| | | var pieces=document.getElementById("pieces7").value; |
| | | var rackid; |
| | | var checkboxs=document.getElementsByName('id'); |
| | | var errortext="没æè¾å
¥åç"; |
| | | if(pieces==null||pieces==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | }else{ |
| | | for(var i=0;i<checkboxs.length;i++){ |
| | | var checkbox=checkboxs[i]; |
| | | if(checkbox.checked){ |
| | | var RowHtml=checkbox.parentNode.parentNode; |
| | | rackid=RowHtml.getElementsByClassName("rankid")[0].innerHTML; |
| | | } |
| | | } |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/updatecount", |
| | | data:{ |
| | | "rackid":rackid, |
| | | "pieces":pieces |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //å
¥åº |
| | | function addracks(){ |
| | | var rackid=document.getElementById("shelfRankInput").value; |
| | | var colors=document.getElementById("colorinput").value; |
| | | var width=document.getElementById("width2").value; |
| | | var heigth=document.getElementById("height2").value; |
| | | var thickness=document.getElementById("thickness2").value; |
| | | var pieces=document.getElementById("pieces2").value; |
| | | var picihao=document.getElementById("picihao").value; |
| | | var production=document.getElementById("production").value; |
| | | var errortext="没æè¾å
¥åç"; |
| | | |
| | | if(width==null||width==""){ |
| | | errortext+="宽度 "; |
| | | } |
| | | if(heigth==null||heigth==""){ |
| | | errortext+="é«åº¦ "; |
| | | } |
| | | if(thickness==null||thickness==""){ |
| | | errortext+="å度 "; |
| | | } |
| | | if(picihao==null||picihao==""){ |
| | | errortext+="æ¹æ¬¡å· "; |
| | | } |
| | | if(production==null||production==""){ |
| | | errortext+="å·¥ç¨å· "; |
| | | } |
| | | if(pieces==null||pieces==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(colors==null||colors==""){ |
| | | errortext+="èç³» ";x |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | }else{ |
| | | |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/addshelfracks", |
| | | data:{ |
| | | "rackid":rackid, |
| | | "colors":colors, |
| | | "width":width, |
| | | "heigth":heigth, |
| | | "thickness":thickness, |
| | | "pieces":pieces, |
| | | "picihao":picihao, |
| | | "production":production |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | function addshelftask111(){ |
| | | $.ajax({ |
| | | cache:false, |
| | | type:"POST", |
| | | dataType : "json", |
| | | url:"../shelfmanager/addshelftask", |
| | | data:{ |
| | | |
| | | },success:function(data){ |
| | | window.location.href="../shelfmanager/rankmanager"; |
| | | } |
| | | |
| | | }); |
| | | |
| | | } */ |
| | | |
| | | </script> |
| | | </head> |
| | | <body> |
| | | |
| | | <div id='app' style='background-color:#D5EAFF;height: 100%;'> |
| | | <!--导èªé¡µ --> |
| | | <section class="content-header" style="padding:0px"> |
| | | <h1> |
| | | ææ¶ç®¡ç <small>管ç</small> |
| | | </h1> |
| | | <ol class="breadcrumb"> |
| | | <li><a href="#"><i class="fa fa-dashboard"></i> ææ¶ç®¡ç</a></li> |
| | | <li class="active">管ç</li> |
| | | </ol> |
| | | </section> |
| | | <div id = "info" info = "${info}"></div> |
| | | <!-- bodyå¼å§ --> |
| | | <section class="content container-fluid"> |
| | | <input type="hidden" id="state" name="working" value="${working}"> |
| | | <input type="hidden" id="status" name="free" value="${free}"> |
| | | |
| | | <input type="hidden" id="glassId" name="glassId" value="${glassId}"> |
| | | <input type="hidden" id="glassThickness" name="glassThickness" |
| | | value="${glassThickness}"> |
| | | |
| | | <!-- ææ¶ä¿¡æ¯ --> |
| | | <div class="blockdiv" id="blockdiv"> |
| | | <table class="table"> |
| | | <tr> |
| | | <td width="55%">æ¶å·</td> |
| | | <td id="num"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>GlassId</td> |
| | | <td id="gla"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>é¿åº¦</td> |
| | | <td id="hei"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>宽度</td> |
| | | <td id="wid"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>å度</td> |
| | | <td id="thi"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ°é</td> |
| | | <td id="pie"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>ææ¶ç¶æ</td> |
| | | <td id="sta"></td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <!-- ææ¶å表--> |
| | | <div id="task" align="center"> |
| | | <table> |
| | | <tr> |
| | | <div> |
| | | <span class="use"><img src="../static/images/101.png">äºå¤©ä»¥å
使ç¨è¿</span> |
| | | <span class="use"><img src="../static/images/104.png">äºå¤©å°å天ä¹å
使ç¨è¿</span> |
| | | <span class="use"><img src="../static/images/102.png">å天以ä¸ä¸å¤©ä»¥ä¸æ²¡æä½¿ç¨è¿</span> |
| | | <span class="use"><img src="../static/images/103.png">ä¸å¤©ä»¥å
没æä½¿ç¨è¿</span> |
| | | </div> |
| | | </tr> |
| | | <br> |
| | | <tr> |
| | | <%-- <td> |
| | | <div> |
| | | <span>${shelfRankInfo}</span> |
| | | </div> |
| | | </td> --%> |
| | | <td v-for="item in shuzu"> |
| | | |
| | | <div :value="item['1_raw_type']" class='progress vertical active' style='width: 30px;background-color: gray;height: 90px;'> |
| | | |
| | | <div :value="item['1_raw_type']" class='progress vertical active' style='width: 30px;background-color: gray;height: 90px;'> |
| | | |
| | | <span style='margin-top: opx'> |
| | | {{item['8_pieces']}} |
| | | </span> |
| | | <div v-show="item['9_rukutime']*1<3" :style="{height:item['10_bfb']}" class='progress-bar progress-bar-primary progress-bar-striped progress-bar-aqua'> |
| | | <span>{{item['5_left_pieces']}}/{{item['8_pieces']}}</span> |
| | | </div> |
| | | <div v-show="2<item['9_rukutime']*1 && item['9_rukutime']*1<8" :style="{height:item['10_bfb']}" class='progress-bar progress-bar-striped progress-bar-green'> |
| | | <span>{{item['5_left_pieces']}}/{{item['8_pieces']}}</span> |
| | | </div> |
| | | <div v-show="item['9_rukutime']*1>7" :style="{height:item['10_bfb']}" class='progress-bar progress-bar-danger progress-bar-striped progress-bar-red'> |
| | | <span>{{item['5_left_pieces']}}/{{item['8_pieces']}}</span> |
| | | </div> |
| | | </div> |
| | | <div>{{item['0_number']}}</div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <!--è¡¨æ ¼ --> |
| | | <select id="dzw" class="btn btn-primary"> |
| | | <option value="98">åè£
ä½1</option> |
| | | <option value="99">åè£
ä½2</option> |
| | | </select> |
| | | <button type="button" onclick="ruku()" class="btn btn-primary ">å
¥åº</button> |
| | | <!-- <button type="button" onclick="ruku1()" class="btn btn-primary ">æ«ç å
¥åº</button> --> |
| | | <button type="button" @click="chuku()" class="btn btn-primary ">åºåº</button> |
| | | <button type="button" @click="addshelftask()" class="btn btn-primary ">åè£
ä½å
¥åº</button> |
| | | <button type="button" onclick="oncheck()" class="btn btn-primary ">æ·»å åç</button> |
| | | <!-- <button type="button" onclick="updateAll()" class="btn btn-primary ">ä¿®æ¹åç</button> --> |
| | | <button type="button" @click="shanchu()" class="btn btn-primary ">å é¤åç</button> |
| | | <button type="button" @click="start('å¯ç¨')" class="btn btn-primary ">å¯ç¨</button> |
| | | <button type="button" @click="start('ç¦ç¨')" class="btn btn-primary ">ç¦ç¨</button> |
| | | <!-- <button type="button" @click="fanpian()" class="btn btn-primary ">ç¿»ç</button> --> |
| | | <button type="button" onclick="updatecount()" class="btn btn-primary ">ä¿®æ¹æ°é</button> |
| | | |
| | | <table id="example" class="table table-bordered table-condensed" style="font-size: 12px;"> |
| | | <thead style="font-size: 20px; Height: 40px"> |
| | | <tr> |
| | | <th><input type="checkbox" v-model="checkFlag" name="allChecked" @click="quanxuan" /></th> |
| | | <th style="display:none">ç¼å·</th> |
| | | <th>åºä½å·</th> |
| | | <th>ç±»å</th> |
| | | <th>é¿åº¦(mm)</th> |
| | | <th>é«åº¦(mm)</th> |
| | | <th>å度(mm)</th> |
| | | <th>æ°é</th> |
| | | <th>å
¥åºæ¶é´</th> |
| | | <th>ææ¶ç¶æ</th> |
| | | <!--<th>åºåæ¯(%)</th> --> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | |
| | | <tr v-for='(items,index) in shuzu' :key='index'> |
| | | <td><input v-model="shelfId" name='id' type='checkbox' :value="items['0_number']" /></td> |
| | | <td class="rankid" style="display:none">{{items['0_number']}}</td> |
| | | <td v-show="(indexs<8?true:false)" v-for='(item,key1,indexs) in items' :key='items.list1' > |
| | | {{item}} |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | |
| | | <!--æ¥è¯¢é¡µé¢å¼å§--> |
| | | <div class="modal fade" id="myModal-search" tabindex="-1" |
| | | role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">æ¥è¯¢</h3> |
| | | </div> |
| | | <form class="form-horizontal" action="../shelfmanager/search" |
| | | method="post" role="form" id="category_add"> |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é¢è²èç³» </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <select class='form-control' id="color" name="color" |
| | | style="width: 250px; font-size: 20px"> ${optionHtml} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">å度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <select class='form-control' name="glassThickness" |
| | | id="glassThickness" style="width: 250px; font-size: 20px"> |
| | | <option>4</option> |
| | | <option>5</option> |
| | | <option>6</option> |
| | | <option>7</option> |
| | | <option>8</option> |
| | | <option>9</option> |
| | | <option>10</option> |
| | | <option>11</option> |
| | | <option>12</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button type="submit" class="btn btn-primary btn-lg" |
| | | id="searchsubmit">æäº¤</button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--åºåºå¯¹è¯æ¡--> |
| | | <div class="modal fade" id="deleteAllModal" tabindex="-1" |
| | | role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog "> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h4> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h4>æ¨ç¡®å®è¦åºåºé䏿æ¶åï¼</h4> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button type="button" class="btn btn-primary btn-lg" |
| | | id="delAllSubmit">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <!--å
¥åºé¡µé¢å¼å§--> |
| | | <div class="modal fade" id="myModal-add-info" tabindex="-1" |
| | | role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content" style="height: 600px;"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">å
¥åº</h3> |
| | | </div> |
| | | |
| | | <div class="modal-body" style="height: 420px;"> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">è¿åºææ¶ </label> |
| | | </h4> |
| | | <div class="col-sm-9"> |
| | | <div class="dropdown"> |
| | | <input type="text" id="shelfRankInput" name="shelfRankNumber" |
| | | style="width: 250px; height: 35px; font-size: 20px" |
| | | readonly="readonly"> |
| | | <div class="btn-group" style="margin-top: -10px"> |
| | | <button class="btn btn-primary dropdown-toggle" |
| | | data-toggle="dropdown"> |
| | | éæ© <span class="caret"></span> |
| | | </button> |
| | | <ul class="dropdown-menu" style="height: 320px; overflow: auto;"> |
| | | <%-- <li style="font-size: 20px"><a href="#" |
| | | onclick="$('#shelfRankInput').val('${shelfRankNumber}')">${shelfRankNumber}</a></li> --%> |
| | | <li v-for='items in shelfRack' style="font-size: 20px"> |
| | | <a href="#" onclick="$('#shelfRankInput').val($(this).text())">{{items['0_number']}}</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é¢è²èç³» </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <%-- <input type="text" class="form-control" id="color" |
| | | value="${rawPackage.color}" name="color" |
| | | style="width: 250px; font-size: 20px" /> --%> |
| | | <input required="required" type="text" id="colorinput" name="color" |
| | | style="width: 250px; height: 35px; font-size: 20px" |
| | | readonly="readonly"> |
| | | <div class="btn-group" style="margin-top: -10px"> |
| | | <button class="btn btn-primary dropdown-toggle" |
| | | data-toggle="dropdown"> |
| | | éæ© <span class="caret"></span> |
| | | </button> |
| | | <ul class="dropdown-menu" |
| | | style="height: 280px; overflow: auto;"> |
| | | <li v-for='color in colors' style="font-size: 20px"><a href="#" |
| | | onclick="$('#colorinput').val($(this).text())">{{color['0_glass_id']}}</a></li> |
| | | |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">宽度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model.number="glass.wid" required="required" type="number" class=" sortNumber form-control" |
| | | value="" name="width" id="width2" |
| | | onclick="app.$data.glass.wid=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é«åº¦ </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.heig" required="required" type="number" class="form-control" id="height2" |
| | | value="" name="height" |
| | | onclick="app.$data.glass.heig=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">å度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.thinkness" required="required" type="number" class=" sortNumber form-control" |
| | | value="" name="thickness" |
| | | id="thickness2" |
| | | onclick="app.$data.glass.thinkness=''" |
| | | style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ°é </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.num" required="required" max="9000" min="0" type="number" class=" sortNumber form-control" |
| | | value="" name="pieces" id="pieces2" |
| | | onclick="app.$data.glass.num=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="picihao1" class="form-group" style="height: 30px;"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ¹æ¬¡å· </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.pici" name="pieces" type="text" required="required" class=" sortNumber form-control" |
| | | name="picihao" id="picihao" |
| | | onclick="app.$data.glass.pici=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="production1" class="form-group" style="height: 30px;"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">çäº§æ¥æ </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input v-model="glass.date" type="date" class=" sortNumber form-control" |
| | | name="production" id="production" |
| | | onclick="app.$data.glass.date=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div id="linheight" class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button type="submit" @click="rukus()" class="btn btn-primary btn-lg" |
| | | id="btnsubmit">æäº¤</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ç¦ç¨/å¯ç¨ææ¶ --> |
| | | <div class="modal fade" id="infoMyModal" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true">×</button> |
| | | <h3 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h3>æ¨ç¡®å®è¦ç¦ç¨æå¯ç¨æéææ¶åï¼</h3> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button type="button" class="btn btn-primary btn-lg" |
| | | id="infoAllSubmit">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <!--æ·»å åç页é¢å¼å§--> |
| | | <div class="modal fade" id="add-info" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content" style="height: 500px;"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">æ·»å åç</h3> |
| | | </div> |
| | | |
| | | <input type="hidden" id="addRawPackage" name="Ids"> |
| | | <div class="modal-body"> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é¢è²èç³» </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" id="colors" name="color" |
| | | style="width: 250px; height: 35px; font-size: 20px" |
| | | readonly="readonly"> |
| | | <div class="btn-group" style="margin-top: -10px"> |
| | | <button class="btn btn-primary dropdown-toggle" |
| | | data-toggle="dropdown"> |
| | | éæ© <span class="caret"></span> |
| | | </button> |
| | | <ul class="dropdown-menu" |
| | | style="height: 280px; overflow: auto;"> |
| | | <li v-for='color in colors' style="font-size: 20px"><a href="#" |
| | | onclick="$('#colors').val($(this).text())">{{color['0_glass_id']}}</a></li> |
| | | </ul> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é¿åº¦ </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" required="required" class=" sortNumber form-control" |
| | | v-model="shelfGlass.wid" name="width1" id="width1" |
| | | onclick="app.$data.shelfGlass.wid=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">é«åº¦ </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" required="required" class="form-control" id="height1" |
| | | v-model="shelfGlass.heig" name="height1" |
| | | onclick="app.$data.shelfGlass.heig=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">å度 </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="text" required="required" class=" sortNumber form-control" |
| | | v-model="shelfGlass.thinkness" name="thickness1" |
| | | id="thickness1" onclick="app.$data.shelfGlass.thinkness=''" |
| | | style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ°é </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="number" required="required" max="9000" min="0" class=" sortNumber form-control" |
| | | v-model="shelfGlass.num" name="pieces1" id="pieces1" |
| | | onclick="app.$data.shelfGlass.num=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="modal-footer" > |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button type="button" @click="tianjiayuanpian()" class="btn btn-primary btn-lg" |
| | | id="addbtnsubmit">æäº¤</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <!--ä¿®æ¹åç页é¢å¼å§--> |
| | | <div class="modal fade" id="add-info1" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content" style="height: 500px;"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h3 class="modal-title" id="myModalLabel" |
| | | style="font-weight: bolder;">ä¿®æ¹åç</h3> |
| | | </div> |
| | | |
| | | <input type="hidden" id="addRawPackage" name="Ids"> |
| | | <div class="modal-body"> |
| | | |
| | | <div id="linheight" class="form-group"> |
| | | <h4> |
| | | <label class="col-sm-3 control-label no-padding-right" |
| | | style="font-weight: bolder;">æ°é </label> |
| | | </h4> |
| | | |
| | | <div class="col-sm-9"> |
| | | <input type="number" required="required" max="9000" min="0" class=" sortNumber form-control" |
| | | v-model="updateNum.num" name="pieces2" id="pieces7" |
| | | onclick="app.$data.updateNum.num=''" style="width: 250px; font-size: 20px" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="modal-footer" > |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">å
³é</button> |
| | | <button type="button" @click="updateNum1()" class="btn btn-primary btn-lg" |
| | | id="addbtnsubmit">æäº¤</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--åºåºå¯¹è¯æ¡--> |
| | | <div class="modal fade" id="deleteBtnModal" tabindex="-1" |
| | | role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
| | | <form class="form-horizontal" role="form"> |
| | | <div class="modal-dialog "> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" |
| | | aria-hidden="true" data-backdrop="static">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">æç¤ºä¿¡æ¯</h4> |
| | | </div> |
| | | <div class="modal-body" style="text-align: left;"> |
| | | <h4>æ¨ç¡®å®è¦åºåºé䏿æ¶åï¼</h4> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | |
| | | <button type="button" class="btn btn-default btn-lg" |
| | | data-dismiss="modal">åæ¶</button> |
| | | |
| | | <button type="button" class="btn btn-primary btn-lg" |
| | | id="delAllSubmit">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </section> |
| | | </div> |
| | | </body> |
| | | |
| | | <script src="../js/main.js"></script> |
| | | <script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| | | |
| | | <script> |
| | | let app = new Vue({ |
| | | mixins:[mixin], |
| | | el:'#app', |
| | | data:{ |
| | | yemian:"ææ¶ç®¡ç", |
| | | shelfId:[], |
| | | updateNum:{ |
| | | "shelid":"", |
| | | "num":"" |
| | | }, |
| | | glass:{ |
| | | "shelfID":"", |
| | | "color":"", |
| | | "wid":"", |
| | | "heig":"", |
| | | "thinkness":"", |
| | | "num":"", |
| | | "pici":"", |
| | | "date":"" |
| | | }, |
| | | |
| | | shelfGlass:{ |
| | | "shelfID":"", |
| | | "color":"", |
| | | "wid":"", |
| | | "heig":"", |
| | | "thinkness":"", |
| | | "num":"" |
| | | } |
| | | , |
| | | shuzu:[], |
| | | shelfRack:[], |
| | | colors:[], |
| | | checkFlag:false |
| | | }, |
| | | methods:{ |
| | | start:function(func){ |
| | | if(!this.shelfId.length){ |
| | | alert("请éä¸ä¸è¡"); |
| | | return false; |
| | | } |
| | | const gongneng = func; |
| | | let sql="UPDATE storage_rack set falg='"+ |
| | | func+"' where number in("+this.shelfId.join()+");"; |
| | | //alert(sql); |
| | | this.connects(gongneng,sql,0,1); |
| | | }, |
| | | /* connect:function(gongneng,sql,flag){ |
| | | $.post("../mysqlInsert/mysql.jsp", |
| | | {"yemian":this.yemian,"gongneng":gongneng,"sql":sql,'flag':flag}, |
| | | function(result){ |
| | | alert(gongneng+"æåï¼") |
| | | window.location.reload(); |
| | | }) |
| | | .fail(function(response) { |
| | | alert('Error: ' + "æå¡å¨æ°æ®åçé误ï¼"); |
| | | }); |
| | | |
| | | |
| | | }, */ |
| | | //å
¥åºåè½ï¼ |
| | | rukus:function(){ |
| | | |
| | | |
| | | let errortext="没æè¾å
¥åç"; |
| | | this.glass.shelfID=$('#shelfRankInput').val(); |
| | | this.glass.color=$('#colorinput').val(); |
| | | if(this.glass.wid==null||this.glass.wid==""){ |
| | | errortext+="宽度 "; |
| | | } |
| | | if(this.glass.heig==null||this.glass.heig==""){ |
| | | errortext+="é«åº¦ "; |
| | | } |
| | | if(this.glass.thinkness==null||this.glass.thinkness==""){ |
| | | errortext+="å度 "; |
| | | } |
| | | if(this.glass.pici==null||this.glass.pici==""){ |
| | | errortext+="æ¹æ¬¡å· "; |
| | | } |
| | | if(this.glass.num==null||this.glass.num==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(this.glass.color==null||this.glass.color==""){ |
| | | errortext+="èç³» "; |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | return false; |
| | | } |
| | | //è·åéæ©çåè£
ä½ |
| | | this.glass.dzw=$("#dzw").val(); |
| | | let sql="{call AXJ_liaojiaguanli_ruku(?,?,?,?,?,?,?,?,?,?)}~"+JSON.stringify(this.glass); |
| | | //console.log(sql); |
| | | $("#myModal-add-info").modal('hide'); |
| | | this.connects("å
¥åº",sql,1,1); |
| | | }, |
| | | chuku:function(){ |
| | | if(!this.shelfId.length){ |
| | | alert("请éä¸ä¸è¡"); |
| | | return false; |
| | | } |
| | | this.dzw=$("#dzw").val(); |
| | | let sql="{call AXJ_liaojiaguanli_chuku(?,?,?)}~"+"{'shelfid':'"+this.shelfId+"','dzw':'"+this.dzw+"'}"; |
| | | //console.log(sql) |
| | | this.connects("åºåº",sql,1,1); |
| | | }, |
| | | tianjiayuanpian:function(){ |
| | | if(this.shelfId.length!=1){ |
| | | alert("请éä¸ä¸è¡ï¼ä¸å¯å¤è¡æç©ºè¡"); |
| | | return false; |
| | | } |
| | | let errortext="没æè¾å
¥åç"; |
| | | this.shelfGlass.shelfID=this.shelfId[0]; |
| | | this.shelfGlass.color=$('#colors').val(); |
| | | if(this.shelfGlass.wid==null||this.shelfGlass.wid==""){ |
| | | errortext+="宽度 "; |
| | | } |
| | | if(this.shelfGlass.heig==null||this.shelfGlass.heig==""){ |
| | | errortext+="é«åº¦ "; |
| | | } |
| | | if(this.shelfGlass.thinkness==null||this.shelfGlass.thinkness==""){ |
| | | errortext+="å度 "; |
| | | } |
| | | if(this.shelfGlass.num==null||this.shelfGlass.num==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(this.shelfGlass.color==null||this.shelfGlass.color==""){ |
| | | errortext+="èç³» "; |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | return false; |
| | | } |
| | | let sql="{call AXJ_liaojiaguanli_tianjiaYuanpian(?,?,?,?,?,?,?)}~"+JSON.stringify(this.shelfGlass); |
| | | this.connects("æ·»å åç",sql,1,1); |
| | | }, |
| | | shanchu:function(){ |
| | | if(this.shelfId.length!=1){ |
| | | alert("请éä¸ä¸è¡,ä¸å¯å¤è¡æç©ºè¡"); |
| | | return false; |
| | | } |
| | | let sql="{call AXJ_liaojiaguanli_shanchuyuanpian(?,?)}~"+"{'shelfid':'"+this.shelfId+"'}"; |
| | | this.connects("å é¤åç",sql,1,1); |
| | | }, |
| | | fanpian:function(){ |
| | | if(this.shelfId.length!=1){ |
| | | alert("请éä¸ä¸è¡,ä¸å¯å¤è¡æç©ºè¡"); |
| | | return false; |
| | | } |
| | | let sql="{call AXJ_liaojiaguanli_fanpian(?,?)}~"+"{'shelfid':'"+this.shelfId+"'}"; |
| | | //console.log(sql) |
| | | this.connects("ç¿»ç",sql,1,1); |
| | | }, |
| | | |
| | | updateNum1:function(){ |
| | | if(this.shelfId.length!=1){ |
| | | alert("请éä¸ä¸è¡,ä¸å¯å¤è¡æç©ºè¡"); |
| | | return false; |
| | | } |
| | | let errortext="没æè¾å
¥åç"; |
| | | if(this.updateNum.num==null||this.updateNum.num==""){ |
| | | errortext+="æ°é "; |
| | | } |
| | | if(errortext!="没æè¾å
¥åç"&&errortext!=null&&errortext!=""){ |
| | | alert(errortext+"!"); |
| | | return false; |
| | | } |
| | | this.updateNum.shelid=this.shelfId[0]; |
| | | let sql="{call AXJ_liaojiaguanli_xiugaishuliang(?,?,?)}~"+JSON.stringify(this.updateNum); |
| | | this.connects("ä¿®æ¹æ°é",sql,1,1); |
| | | |
| | | }, |
| | | addshelftask:function(){ |
| | | this.load_rack=$("#dzw").val(); |
| | | let sql="{call AXJ_liaojiaguanli_diaozhuangweiruku(?,?)}~"+"{'load_rack':'"+this.load_rack+"'}"; |
| | | this.connects("åè£
ä½å
¥åº",sql,1,1); |
| | | }, |
| | | quanxuan(){ |
| | | this.checkFlag=!this.checkFlag; |
| | | this.shelfId=[]; |
| | | if(this.checkFlag){ |
| | | for(let item in this.shuzu){ |
| | | this.shelfId.push(this.shuzu[item]["0_number"]); |
| | | } |
| | | }else{ |
| | | this.shelfId=[]; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | mounted:function(){ |
| | | let sql="{call AXJ_liaojiaguanli_kucunchaxun(?)}"; |
| | | let flag=2; |
| | | this.loadAjxss('åçä»å¨ç»çæ¥è¯¢',sql,flag,"shuzu"); |
| | | sql="{call AXJ_liaojiaguanli_shelfrack(?)}"; |
| | | this.loadAjxss('åçä»å¨æ¶åæ¥è¯¢',sql,flag,"shelfRack"); |
| | | sql="{call AXJ_liaojiaguanli_colors(?)}"; |
| | | this.loadAjxss('åçä»å¨é¢è²æ¥è¯¢',sql,flag,"colors"); |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | # é»è®¤å¿½ç¥çæä»¶ |
| | | /shelf/ |
| | | /workspace.xml |
| | | # åºäºç¼è¾å¨ç HTTP 客æ·ç«¯è¯·æ± |
| | | /httpRequests/ |
| | | # Datasource local storage ignored files |
| | | /dataSources/ |
| | | /dataSources.local.xml |
| New file |
| | |
| | | <component name="ArtifactManager"> |
| | | <artifact type="jar" name="nglib_150_jar"> |
| | | <output-path>$PROJECT_DIR$/out/artifacts/nglib_150_jar</output-path> |
| | | <root id="archive" name="nglib.jar"> |
| | | <element id="module-output" name="nglib" /> |
| | | <element id="library" level="module" name="jacob.jar" module-name="nglib" /> |
| | | <element id="library" level="module" name="mysql-connector-java-8.0.20.jar" module-name="nglib" /> |
| | | <element id="library" level="module" name="json-20080701.jar" module-name="nglib" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../fastjson-1.2.2.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../commons-net-3.9.0.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../druid-1.1.12.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../jacob-1.18.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../mysql-connector-java-8.0.20.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../json-20230618.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../artemis-http-client-1.1.10.jar" path-in-jar="/" /> |
| | | </root> |
| | | </artifact> |
| | | </component> |
| New file |
| | |
| | | <component name="ArtifactManager"> |
| | | <artifact type="jar" name="nglib:jar"> |
| | | <output-path>$PROJECT_DIR$/classes/artifacts/nglib_jar</output-path> |
| | | <root id="archive" name="nglib.jar"> |
| | | <element id="module-output" name="nglib" /> |
| | | <element id="library" level="module" name="mysql-connector-java-8.0.20.jar" module-name="nglib" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../fastjson-1.2.2.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../commons-net-3.9.0.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../druid-1.1.12.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../jacob-1.18.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../mysql-connector-java-8.0.20.jar" path-in-jar="/" /> |
| | | <element id="library" level="module" name="jacob.jar" module-name="nglib" /> |
| | | <element id="artifact" artifact-name="json-20080701_jar" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../json-20230618.jar" path-in-jar="/" /> |
| | | </root> |
| | | </artifact> |
| | | </component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Encoding"> |
| | | <file url="file://$PROJECT_DIR$/src/builder/HttpHandlerDemo.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/builder/MachineManager.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/builder/Manager.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/toTcp/TCPClient.java" charset="GBK" /> |
| | | <file url="PROJECT" charset="GBK" /> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <component name="libraryTable"> |
| | | <library name="fastjson-1.2.2"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../fastjson-1.2.2.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../commons-net-3.9.0.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../druid-1.1.12.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../jacob-1.18.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../mysql-connector-java-8.0.20.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../json-20230618.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../artemis-http-client-1.1.10.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </component> |
| New file |
| | |
| | | <project version="4"> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| | | <output url="file://$PROJECT_DIR$/classes" /> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ProjectModuleManager"> |
| | | <modules> |
| | | <module fileurl="file://$PROJECT_DIR$/nglib.iml" filepath="$PROJECT_DIR$/nglib.iml" /> |
| | | </modules> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>nglib</name> |
| | | <comment></comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.jdt.core.javabuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.jdt.core.javanature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | eclipse.preferences.version=1 |
| | | encoding//src/ng/db/DBHelper.java=UTF-8 |
| | | encoding//src/ng/devices/HexUtil.java=UTF-8 |
| | | encoding//src/ng/devices/ModbusClient.java=UTF-8 |
| | | encoding//src/ng/devices/ModbusService.java=UTF-8 |
| New file |
| | |
| | | eclipse.preferences.version=1 |
| | | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
| | | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 |
| | | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
| | | org.eclipse.jdt.core.compiler.compliance=1.8 |
| | | org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
| | | org.eclipse.jdt.core.compiler.debug.localVariable=generate |
| | | org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
| | | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
| | | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
| | | org.eclipse.jdt.core.compiler.source=1.8 |
| New file |
| | |
| | | Manifest-Version: 1.0 |
| | | Main-Class: builder.Manager |
| | | |
| New file |
| | |
| | | driverClassName=com.mysql.cj.jdbc.Driver |
| | | url=jdbc:mysql://localhost:3306/gmms?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username=root |
| | | password=beibo.123/ |
| | | |
| | | #åå§åæ¶æ± ä¸å»ºç«çç©çè¿æ¥ä¸ªæ° |
| | | initialSize=10 |
| | | #æå¤§ç坿´»è·çè¿æ¥æ± æ°é |
| | | maxActive=20 |
| | | #è·åè¿æ¥æ¶æå¤§çå¾
æ¶é´ï¼å使¯«ç§ï¼è¶
è¿è¿æ¥å°±ä¼å¤±æ |
| | | maxWait=3000 |
| New file |
| | |
| | | package inputLine; |
| | | |
| | | public class Encoding { |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="EclipseModuleManager"> |
| | | <libelement value="file://C:/Users/a'a'a/Desktop/Mes项ç®/repository/org/json/json/20080701/json-20080701.jar" /> |
| | | <libelement value="file://$MODULE_DIR$/../../zyz/web_optima/GERP/WebContent/WEB-INF/lib/mysql-connector-java-8.0.20.jar" /> |
| | | <libelement value="file://$MODULE_DIR$/../../zyz/web_optima/GERP/WebContent/WEB-INF/lib/jacob.jar" /> |
| | | <src_description expected_position="0"> |
| | | <src_folder value="file://$MODULE_DIR$/src" expected_position="0" /> |
| | | </src_description> |
| | | </component> |
| | | <component name="NewModuleRootManager"> |
| | | <output url="file://$MODULE_DIR$/bin" /> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$"> |
| | | <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |
| | | </content> |
| | | <orderEntry type="jdk" jdkName="JavaSE-1.8" jdkType="JavaSDK" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | <orderEntry type="module-library"> |
| | | <library name="json-20080701.jar"> |
| | | <CLASSES> |
| | | <root url="file://C:/Users/a'a'a/Desktop/Mes项ç®/repository/org/json/json/20080701/json-20080701.jar" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="mysql-connector-java-8.0.20.jar"> |
| | | <CLASSES> |
| | | <root url="file://$MODULE_DIR$/../../zyz/web_optima/GERP/WebContent/WEB-INF/lib/mysql-connector-java-8.0.20.jar" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="jacob.jar"> |
| | | <CLASSES> |
| | | <root url="file://$MODULE_DIR$/../../zyz/web_optima/GERP/WebContent/WEB-INF/lib/jacob.jar" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="library" name="fastjson-1.2.2" level="project" /> |
| | | </component> |
| | | </module> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>nglib</name> |
| | | <comment></comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.jdt.core.javabuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.jdt.core.javanature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | eclipse.preferences.version=1 |
| | | encoding//src/ng/db/DBHelper.java=UTF-8 |
| | | encoding//src/ng/devices/HexUtil.java=UTF-8 |
| | | encoding//src/ng/devices/ModbusClient.java=UTF-8 |
| | | encoding//src/ng/devices/ModbusService.java=UTF-8 |
| New file |
| | |
| | | eclipse.preferences.version=1 |
| | | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
| | | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 |
| | | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
| | | org.eclipse.jdt.core.compiler.compliance=1.8 |
| | | org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
| | | org.eclipse.jdt.core.compiler.debug.localVariable=generate |
| | | org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
| | | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
| | | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
| | | org.eclipse.jdt.core.compiler.source=1.8 |
| New file |
| | |
| | | Manifest-Version: 1.0 |
| | | Main-Class: builder.Manager |
| | | |
| New file |
| | |
| | | driverClassName=com.mysql.cj.jdbc.Driver |
| | | url=jdbc:mysql://localhost:3306/gmms?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username=root |
| | | password=beibo.123/ |
| | | |
| | | #åå§åæ¶æ± ä¸å»ºç«çç©çè¿æ¥ä¸ªæ° |
| | | initialSize=10 |
| | | #æå¤§ç坿´»è·çè¿æ¥æ± æ°é |
| | | maxActive=20 |
| | | #è·åè¿æ¥æ¶æå¤§çå¾
æ¶é´ï¼å使¯«ç§ï¼è¶
è¿è¿æ¥å°±ä¼å¤±æ |
| | | maxWait=3000 |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="NewModuleRootManager"> |
| | | <output url="file://$MODULE_DIR$/out/production/nglib" /> |
| | | <output-test url="file://$MODULE_DIR$/out/test/nglib" /> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$"> |
| | | <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" /> |
| | | <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |
| | | </content> |
| | | <orderEntry type="inheritedJdk" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | <orderEntry type="library" name="json-20230618" level="project" /> |
| | | <orderEntry type="library" name="commons-net-3.9.0" level="project" /> |
| | | <orderEntry type="library" name="druid-1.1.12" level="project" /> |
| | | <orderEntry type="library" name="mysql-connector-java-8.0.20" level="project" /> |
| | | <orderEntry type="library" name="fastjson-1.2.2" level="project" /> |
| | | </component> |
| | | </module> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ArtifactManager"> |
| | | <artifact type="jar" name="nglib.150:jar"> |
| | | <output-path>$PROJECT_DIR$/out/artifacts/nglib_150_jar</output-path> |
| | | <root id="archive" name="nglib.jar"> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../json-20230618.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../jacob-1.18.jar" path-in-jar="/" /> |
| | | <element id="module-output" name="nglib" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../commons-net-3.9.0.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../druid-1.1.12.jar" path-in-jar="/" /> |
| | | <element id="extracted-dir" path="$PROJECT_DIR$/../fastjson-1.2.2.jar" path-in-jar="/" /> |
| | | </root> |
| | | </artifact> |
| | | </component> |
| | | <component name="Encoding"> |
| | | <file url="file://$PROJECT_DIR$/src/builder/HttpHandlerDemo.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/builder/ThreadHttpServer.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/ng/devices/HexUtil.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/src/ng/devices/ModbusClient.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/toTcp/TcpClientHandler.java" charset="GBK" /> |
| | | <file url="PROJECT" charset="GBK" /> |
| | | </component> |
| | | <component name="InspectionProjectProfileManager"> |
| | | <profile version="1.0"> |
| | | <option name="myName" value="Project Default" /> |
| | | </profile> |
| | | <version value="1.0" /> |
| | | </component> |
| | | <component name="Palette2"> |
| | | <group name="Swing"> |
| | | <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> |
| | | </item> |
| | | <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> |
| | | <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> |
| | | <initial-values> |
| | | <property name="text" value="Button" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="RadioButton" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="CheckBox" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="Label" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
| | | <preferred-size width="200" height="200" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
| | | <preferred-size width="200" height="200" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> |
| | | <preferred-size width="-1" height="20" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> |
| | | </item> |
| | | </group> |
| | | </component> |
| | | <component name="ProjectModuleManager"> |
| | | <modules> |
| | | <module fileurl="file://$PROJECT_DIR$/nglib.iml" filepath="$PROJECT_DIR$/nglib.iml" /> |
| | | </modules> |
| | | </component> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| | | <output url="file://$PROJECT_DIR$/out" /> |
| | | </component> |
| | | <component name="libraryTable"> |
| | | <library name="commons-net-3.9.0"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../../commons-net-3.9.0.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | <library name="druid-1.1.12"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../druid-1.1.12.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | <library name="fastjson-1.2.2"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../fastjson-1.2.2.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | <library name="json-20230618"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../json-20230618.jar!/" /> |
| | | <root url="jar://$PROJECT_DIR$/../jacob-1.18.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | <library name="mysql-connector-java-8.0.20"> |
| | | <CLASSES> |
| | | <root url="jar://$PROJECT_DIR$/../mysql-connector-java-8.0.20.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ArtifactsWorkspaceSettings"> |
| | | <artifacts-to-build> |
| | | <artifact name="nglib.150:jar" /> |
| | | </artifacts-to-build> |
| | | </component> |
| | | <component name="AutoImportSettings"> |
| | | <option name="autoReloadType" value="SELECTIVE" /> |
| | | </component> |
| | | <component name="ChangeListManager"> |
| | | <list default="true" id="d34e5e1f-0819-4ff8-9d57-020da84e9134" name="é»è®¤æ´æ¹å表" comment="" /> |
| | | <option name="SHOW_DIALOG" value="false" /> |
| | | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
| | | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
| | | <option name="LAST_RESOLUTION" value="IGNORE" /> |
| | | </component> |
| | | <component name="CoverageViewManager"> |
| | | <option name="myElementSize" value="221" /> |
| | | </component> |
| | | <component name="DefaultGradleProjectSettings"> |
| | | <option name="isMigrated" value="true" /> |
| | | </component> |
| | | <component name="FileEditorManager"> |
| | | <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> |
| | | <file pinned="false" current-in-tab="true"> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/sendOptFile.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="402"> |
| | | <caret line="66" column="15" selection-start-line="66" selection-start-column="8" selection-end-line="66" selection-end-column="15" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | </file> |
| | | <file pinned="false" current-in-tab="false"> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/TCPClient.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="220"> |
| | | <caret line="12" column="42" selection-start-line="12" selection-start-column="42" selection-end-line="12" selection-end-column="42" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | </file> |
| | | <file pinned="false" current-in-tab="false"> |
| | | <entry file="file://$PROJECT_DIR$/src/druidConnect/getMeterParatermeter.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="132"> |
| | | <caret line="8" column="8" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="54" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | </file> |
| | | </leaf> |
| | | </component> |
| | | <component name="FileTemplateManagerImpl"> |
| | | <option name="RECENT_TEMPLATES"> |
| | | <list> |
| | | <option value="Class" /> |
| | | </list> |
| | | </option> |
| | | </component> |
| | | <component name="FindInProjectRecents"> |
| | | <findStrings> |
| | | <find>setConnectionParam</find> |
| | | <find>machineID</find> |
| | | <find>sn</find> |
| | | <find>yilianjie</find> |
| | | <find>mmgr</find> |
| | | <find>ct</find> |
| | | <find>rbuff</find> |
| | | <find>buffer</find> |
| | | <find>br</find> |
| | | <find>clientSocket</find> |
| | | <find>tohex</find> |
| | | <find>string</find> |
| | | <find>stringto</find> |
| | | <find>len</find> |
| | | <find>arr</find> |
| | | <find>clientSocket.getOutputStream</find> |
| | | <find>Sys</find> |
| | | <find>getOutputStream</find> |
| | | <find>appStart</find> |
| | | <find>1111</find> |
| | | <find>SendFlagMessage</find> |
| | | <find>System.out.println</find> |
| | | <find>panban_mgr</find> |
| | | <find>OI</find> |
| | | <find>app</find> |
| | | <find>IO</find> |
| | | <find>TcpMultiServer</find> |
| | | <find>APP</find> |
| | | <find>HEX</find> |
| | | <find>serverSocket</find> |
| | | </findStrings> |
| | | </component> |
| | | <component name="IdeDocumentHistory"> |
| | | <option name="CHANGED_PATHS"> |
| | | <list> |
| | | <option value="$PROJECT_DIR$/src/ng/db/uploadImage.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/Manager.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/aaa.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/testa.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/devices/IoBlock.java" /> |
| | | <option value="$PROJECT_DIR$/src/builder/MachineManager.java" /> |
| | | <option value="$PROJECT_DIR$/src/druid/getDruid.java" /> |
| | | <option value="$PROJECT_DIR$/src/druidConnect/druid.properties" /> |
| | | <option value="$PROJECT_DIR$/src/druidConnect/getDruid.java" /> |
| | | <option value="$PROJECT_DIR$/src/druid.properties" /> |
| | | <option value="$PROJECT_DIR$/src/druidConnect/JDBCUtils.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/getFtpData.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/toFtp.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/devices/ModbusClient.java" /> |
| | | <option value="$PROJECT_DIR$/inputLine/Encoding.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/TCPClient.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/DLT645_2007Control.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/to16HEX.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/devices/gethex.java" /> |
| | | <option value="$PROJECT_DIR$/src/druidConnect/test.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/devices/ModbusService.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/DBHelper.java" /> |
| | | <option value="$PROJECT_DIR$/src/builder/Manager.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/TcpMain.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/TcpMultiServer.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/TcpClientHandler.java" /> |
| | | <option value="$PROJECT_DIR$/src/toTcp/gethex.java" /> |
| | | <option value="$PROJECT_DIR$/src/druidConnect/getMeterParatermeter.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/uploadImages.java" /> |
| | | <option value="$PROJECT_DIR$/src/ng/db/sendOptFile.java" /> |
| | | </list> |
| | | </option> |
| | | </component> |
| | | <component name="ProjectColorInfo">{ |
| | | "associatedIndex": 2 |
| | | }</component> |
| | | <component name="ProjectFrameBounds"> |
| | | <option name="x" value="95" /> |
| | | <option name="y" value="40" /> |
| | | <option name="width" value="1705" /> |
| | | <option name="height" value="980" /> |
| | | </component> |
| | | <component name="ProjectId" id="2XSiv79QgED9CfzjyA9NJn0bQG0" /> |
| | | <component name="ProjectView"> |
| | | <navigator proportions="" version="1"> |
| | | <foldersAlwaysOnTop value="true" /> |
| | | </navigator> |
| | | <panes> |
| | | <pane id="PackagesPane" /> |
| | | <pane id="ProjectPane"> |
| | | <subPane> |
| | | <expand> |
| | | <path> |
| | | <item name="nglib" type="b2602c69:ProjectViewProjectNode" /> |
| | | <item name="nglib" type="462c0819:PsiDirectoryNode" /> |
| | | </path> |
| | | <path> |
| | | <item name="nglib" type="b2602c69:ProjectViewProjectNode" /> |
| | | <item name="nglib" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="src" type="462c0819:PsiDirectoryNode" /> |
| | | </path> |
| | | <path> |
| | | <item name="nglib" type="b2602c69:ProjectViewProjectNode" /> |
| | | <item name="nglib" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="src" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="druidConnect" type="462c0819:PsiDirectoryNode" /> |
| | | </path> |
| | | <path> |
| | | <item name="nglib" type="b2602c69:ProjectViewProjectNode" /> |
| | | <item name="nglib" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="src" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="ng" type="462c0819:PsiDirectoryNode" /> |
| | | </path> |
| | | <path> |
| | | <item name="nglib" type="b2602c69:ProjectViewProjectNode" /> |
| | | <item name="nglib" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="src" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="ng" type="462c0819:PsiDirectoryNode" /> |
| | | <item name="db" type="462c0819:PsiDirectoryNode" /> |
| | | </path> |
| | | </expand> |
| | | <select /> |
| | | </subPane> |
| | | </pane> |
| | | <pane id="Scope" /> |
| | | </panes> |
| | | </component> |
| | | <component name="ProjectViewState"> |
| | | <option name="hideEmptyMiddlePackages" value="true" /> |
| | | <option name="showLibraryContents" value="true" /> |
| | | </component> |
| | | <component name="PropertiesComponent"><![CDATA[{ |
| | | "keyToString": { |
| | | "RunOnceActivity.OpenProjectViewOnStart": "true", |
| | | "RunOnceActivity.ShowReadmeOnStart": "true", |
| | | "WebServerToolWindowFactoryState": "false", |
| | | "last_opened_file_path": "D:/Documents/æ°å»ºæä»¶å¤¹/fastjson-1.2.2.jar", |
| | | "node.js.detected.package.eslint": "true", |
| | | "node.js.detected.package.tslint": "true", |
| | | "node.js.selected.package.eslint": "(autodetect)", |
| | | "node.js.selected.package.tslint": "(autodetect)", |
| | | "project.structure.last.edited": "工件", |
| | | "project.structure.proportion": "0.15", |
| | | "project.structure.side.proportion": "0.25632185", |
| | | "settings.editor.selected.configurable": "preferences.lookFeel", |
| | | "vue.rearranger.settings.migration": "true" |
| | | } |
| | | }]]></component> |
| | | <component name="RecentsManager"> |
| | | <key name="CreateClassDialog.RecentsKey"> |
| | | <recent name="inputLine" /> |
| | | <recent name="ng.db" /> |
| | | </key> |
| | | <key name="CopyFile.RECENT_KEYS"> |
| | | <recent name="D:\Documents\æ°å»ºæä»¶å¤¹\nglib\src\builder" /> |
| | | </key> |
| | | <key name="MoveFile.RECENT_KEYS"> |
| | | <recent name="D:\Documents\æ°å»ºæä»¶å¤¹\nglib\src" /> |
| | | </key> |
| | | <key name="ExtractSuperBase.RECENT_KEYS"> |
| | | <recent name="toTcp" /> |
| | | </key> |
| | | </component> |
| | | <component name="RunManager" selected="åºç¨ç¨åº.sendOptFile"> |
| | | <configuration name="TcpMain" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |
| | | <option name="MAIN_CLASS_NAME" value="toTcp.TcpMain" /> |
| | | <module name="nglib" /> |
| | | <extension name="coverage"> |
| | | <pattern> |
| | | <option name="PATTERN" value="toTcp.*" /> |
| | | <option name="ENABLED" value="true" /> |
| | | </pattern> |
| | | </extension> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | <configuration name="getMeterParatermeter" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |
| | | <option name="MAIN_CLASS_NAME" value="druidConnect.getMeterParatermeter" /> |
| | | <module name="nglib" /> |
| | | <extension name="coverage"> |
| | | <pattern> |
| | | <option name="PATTERN" value="druidConnect.*" /> |
| | | <option name="ENABLED" value="true" /> |
| | | </pattern> |
| | | </extension> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | <configuration name="gethex" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |
| | | <option name="MAIN_CLASS_NAME" value="toTcp.gethex" /> |
| | | <module name="nglib" /> |
| | | <extension name="coverage"> |
| | | <pattern> |
| | | <option name="PATTERN" value="toTcp.*" /> |
| | | <option name="ENABLED" value="true" /> |
| | | </pattern> |
| | | </extension> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | <configuration name="sendOptFile" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |
| | | <option name="MAIN_CLASS_NAME" value="ng.db.sendOptFile" /> |
| | | <module name="nglib" /> |
| | | <extension name="coverage"> |
| | | <pattern> |
| | | <option name="PATTERN" value="ng.db.*" /> |
| | | <option name="ENABLED" value="true" /> |
| | | </pattern> |
| | | </extension> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | <configuration name="uploadImages" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |
| | | <option name="MAIN_CLASS_NAME" value="ng.db.uploadImages" /> |
| | | <module name="nglib" /> |
| | | <extension name="coverage"> |
| | | <pattern> |
| | | <option name="PATTERN" value="ng.db.*" /> |
| | | <option name="ENABLED" value="true" /> |
| | | </pattern> |
| | | </extension> |
| | | <method v="2"> |
| | | <option name="Make" enabled="true" /> |
| | | </method> |
| | | </configuration> |
| | | <recent_temporary> |
| | | <list> |
| | | <item itemvalue="åºç¨ç¨åº.sendOptFile" /> |
| | | </list> |
| | | </recent_temporary> |
| | | </component> |
| | | <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="åºç¨ç¨åºçº§" UseSingleDictionary="true" transferred="true" /> |
| | | <component name="SvnConfiguration"> |
| | | <configuration /> |
| | | </component> |
| | | <component name="TaskManager"> |
| | | <task active="true" id="Default" summary="Default task"> |
| | | <changelist id="d34e5e1f-0819-4ff8-9d57-020da84e9134" name="é»è®¤æ´æ¹å表" comment="" /> |
| | | <created>1689674873300</created> |
| | | <option name="number" value="Default" /> |
| | | <option name="presentableId" value="Default" /> |
| | | <updated>1689674873300</updated> |
| | | <workItem from="1689674876605" duration="4623000" /> |
| | | <workItem from="1690163563230" duration="2995000" /> |
| | | <workItem from="1690332010977" duration="821000" /> |
| | | <workItem from="1690519172458" duration="642000" /> |
| | | <workItem from="1690965893844" duration="130000" /> |
| | | <workItem from="1690966086810" duration="15269000" /> |
| | | <workItem from="1691026929739" duration="1318000" /> |
| | | <workItem from="1691400653177" duration="5824000" /> |
| | | <workItem from="1692841020354" duration="35464000" /> |
| | | <workItem from="1692944626995" duration="9358000" /> |
| | | <workItem from="1692965394750" duration="4500000" /> |
| | | <workItem from="1693011883051" duration="6525000" /> |
| | | <workItem from="1693216302474" duration="678000" /> |
| | | <workItem from="1693217133236" duration="32430000" /> |
| | | <workItem from="1693803165660" duration="4690000" /> |
| | | <workItem from="1693808154484" duration="8458000" /> |
| | | <workItem from="1694047997151" duration="1060000" /> |
| | | <workItem from="1694132429066" duration="2155000" /> |
| | | <workItem from="1694221622567" duration="18436000" /> |
| | | <workItem from="1694243850779" duration="8381000" /> |
| | | <workItem from="1694391412945" duration="9925000" /> |
| | | <workItem from="1694409182989" duration="43605000" /> |
| | | <workItem from="1694674287131" duration="8685000" /> |
| | | <workItem from="1695010546704" duration="2484000" /> |
| | | <workItem from="1695087660255" duration="7008000" /> |
| | | <workItem from="1696942801180" duration="8000" /> |
| | | <workItem from="1696944767498" duration="70000" /> |
| | | <workItem from="1696944861105" duration="125000" /> |
| | | <workItem from="1696986714219" duration="134000" /> |
| | | <workItem from="1698629111182" duration="528000" /> |
| | | <workItem from="1698630185412" duration="1954000" /> |
| | | <workItem from="1699580908446" duration="954000" /> |
| | | <workItem from="1701416503341" duration="3181000" /> |
| | | <workItem from="1701652652796" duration="4379000" /> |
| | | </task> |
| | | <servers /> |
| | | </component> |
| | | <component name="TimeTrackingManager"> |
| | | <option name="totallyTimeSpent" value="235801000" /> |
| | | </component> |
| | | <component name="ToolWindowManager"> |
| | | <frame x="76" y="32" width="1364" height="784" extended-state="0" /> |
| | | <layout> |
| | | <window_info id="Image Layers" order="0" /> |
| | | <window_info id="Capture Tool" order="1" /> |
| | | <window_info id="UI Designer" order="2" /> |
| | | <window_info id="Favorites" order="3" side_tool="true" /> |
| | | <window_info id="设计å¨" order="4" /> |
| | | <window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.287902" /> |
| | | <window_info id="Structure" order="6" side_tool="true" weight="0.25" /> |
| | | <window_info anchor="bottom" id="Messages" order="0" weight="0.32956153" /> |
| | | <window_info anchor="bottom" id="Terminal" order="1" weight="0.32956153" /> |
| | | <window_info anchor="bottom" id="Docker" order="2" show_stripe_button="false" /> |
| | | <window_info anchor="bottom" id="Event Log" order="3" sideWeight="0.5020107" side_tool="true" weight="0.35785007" /> |
| | | <window_info anchor="bottom" id="Java Enterprise" order="4" /> |
| | | <window_info anchor="bottom" id="Database Changes" order="5" /> |
| | | <window_info anchor="bottom" id="Version Control" order="6" /> |
| | | <window_info anchor="bottom" id="Message" order="7" /> |
| | | <window_info anchor="bottom" id="Find" order="8" weight="0.32924962" /> |
| | | <window_info anchor="bottom" id="Run" order="9" sideWeight="0.49798927" weight="0.35785007" /> |
| | | <window_info anchor="bottom" id="Debug" order="10" sideWeight="0.49731904" weight="0.3323124" /> |
| | | <window_info anchor="bottom" id="Cvs" order="11" weight="0.25" /> |
| | | <window_info anchor="bottom" id="Inspection" order="12" weight="0.4" /> |
| | | <window_info anchor="bottom" id="TODO" order="13" /> |
| | | <window_info anchor="right" id="Maven" order="0" /> |
| | | <window_info anchor="right" id="Capture Analysis" order="1" /> |
| | | <window_info anchor="right" id="è°è²æ¿" order="2" /> |
| | | <window_info anchor="right" id="Database" order="3" /> |
| | | <window_info anchor="right" id="Palette	" order="4" /> |
| | | <window_info anchor="right" id="Theme Preview" order="5" /> |
| | | <window_info anchor="right" id="Commander" internal_type="SLIDING" order="6" type="SLIDING" weight="0.4" /> |
| | | <window_info anchor="right" id="Key Promoter X" order="7" weight="0.3293092" /> |
| | | <window_info anchor="right" id="Ant Build" order="8" weight="0.25" /> |
| | | <window_info anchor="right" content_ui="combo" id="Hierarchy" order="9" weight="0.25" /> |
| | | <window_info anchor="right" id="Coverage" order="10" side_tool="true" weight="0.3297587" /> |
| | | </layout> |
| | | </component> |
| | | <component name="TypeScriptGeneratedFilesManager"> |
| | | <option name="version" value="3" /> |
| | | </component> |
| | | <component name="com.intellij.coverage.CoverageDataManagerImpl"> |
| | | <SUITE FILE_PATH="coverage/nglib$TcpMain.ic" NAME="TcpMain Coverage Results" MODIFIED="1694423588304" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false"> |
| | | <FILTER>toTcp.*</FILTER> |
| | | </SUITE> |
| | | <SUITE FILE_PATH="coverage/nglib$uploadImages.ic" NAME="uploadImages Coverage Results" MODIFIED="1692865981231" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false"> |
| | | <FILTER>ng.db.*</FILTER> |
| | | </SUITE> |
| | | <SUITE FILE_PATH="coverage/nglib$getFtpData.ic" NAME="getFtpData Coverage Results" MODIFIED="1692866982718" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false"> |
| | | <FILTER>ng.db.*</FILTER> |
| | | </SUITE> |
| | | </component> |
| | | <component name="editorHistoryManager"> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/NGFunction.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="-1084"> |
| | | <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/lang/Object.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="148"> |
| | | <caret line="234" column="18" selection-start-line="234" selection-start-column="18" selection-end-line="234" selection-end-column="18" /> |
| | | <folding> |
| | | <element signature="e#10065#10066#0" expanded="true" /> |
| | | <element signature="e#10148#10149#0" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/Manager.java" /> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/aaa.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="242"> |
| | | <caret line="12" column="9" selection-start-line="12" selection-start-column="9" selection-end-line="12" selection-end-column="9" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://$PROJECT_DIR$/../../commons-net-3.9.0.jar!/org/apache/commons/net/ftp/FTPClient.class"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="226"> |
| | | <caret line="920" column="21" selection-start-line="920" selection-start-column="21" selection-end-line="920" selection-end-column="21" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/util/ArrayList.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="158"> |
| | | <caret line="652" column="18" selection-start-line="652" selection-start-column="18" selection-end-line="652" selection-end-column="18" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/testa.java" /> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/DBSession.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="198"> |
| | | <caret line="326" column="13" selection-start-line="326" selection-start-column="9" selection-end-line="326" selection-end-column="13" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/sql/DriverManager.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="141"> |
| | | <caret line="235" column="29" selection-start-line="235" selection-start-column="29" selection-end-line="235" selection-end-column="29" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/net/InetAddress.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="207"> |
| | | <caret line="1532" lean-forward="true" selection-start-line="1532" selection-end-line="1532" /> |
| | | <folding> |
| | | <element signature="e#55662#55663#0" expanded="true" /> |
| | | <element signature="e#55707#55708#0" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/net/InetSocketAddress.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="265"> |
| | | <caret line="71" column="9" lean-forward="true" selection-start-line="71" selection-start-column="9" selection-end-line="71" selection-end-column="9" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/net/Socket.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="265"> |
| | | <caret line="433" column="29" lean-forward="true" selection-start-line="433" selection-start-column="29" selection-end-line="433" selection-end-column="29" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/lang/Runnable.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="502"> |
| | | <caret line="67" column="26" lean-forward="true" selection-start-line="67" selection-start-column="26" selection-end-line="67" selection-end-column="26" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/util/Properties.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="326"> |
| | | <caret line="340" column="8" selection-start-line="340" selection-start-column="8" selection-end-line="340" selection-end-column="8" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://$PROJECT_DIR$/../druid-1.1.12.jar!/com/alibaba/druid/pool/DruidDataSource.class"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="136"> |
| | | <caret line="819" selection-start-line="819" selection-end-line="819" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://$PROJECT_DIR$/../druid-1.1.12.jar!/com/alibaba/druid/util/JdbcUtils.class"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="226"> |
| | | <caret line="560" column="62" selection-start-line="560" selection-start-column="58" selection-end-line="560" selection-end-column="62" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/io/Reader.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="91"> |
| | | <caret line="77" column="18" selection-start-line="77" selection-start-column="18" selection-end-line="77" selection-end-column="18" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/io/InputStreamReader.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="128"> |
| | | <caret line="96" selection-start-line="96" selection-end-line="96" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/devices/IoBlock.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="181"> |
| | | <caret line="10" column="23" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="23" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/lang/Byte.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="163"> |
| | | <caret line="477" column="32" selection-start-line="477" selection-start-column="27" selection-end-line="477" selection-end-column="32" /> |
| | | <folding> |
| | | <element signature="e#16701#16702#0" expanded="true" /> |
| | | <element signature="e#16740#16741#0" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/net/SocketInputStream.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="2112"> |
| | | <caret line="126" column="15" selection-start-line="126" selection-start-column="15" selection-end-line="126" selection-end-column="15" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/jre/lib/rt.jar!/java/lang/System.class"> |
| | | <provider selected="true" editor-type-id="text-editor" /> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/inputLine/Encoding.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="66"> |
| | | <caret line="3" column="30" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="30" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/DLT645_2007Control.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="616"> |
| | | <caret line="69" lean-forward="true" selection-start-line="69" selection-end-line="69" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/to16HEX.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="278"> |
| | | <caret line="21" column="58" selection-start-line="20" selection-start-column="20" selection-end-line="22" selection-end-column="37" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/devices/HexUtil.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="127"> |
| | | <caret line="172" column="36" selection-start-line="172" selection-start-column="25" selection-end-line="172" selection-end-column="36" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/util/Hashtable.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="148"> |
| | | <caret line="360" column="26" selection-start-line="360" selection-start-column="26" selection-end-line="360" selection-end-column="26" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://$PROJECT_DIR$/../mysql-connector-java-8.0.20.jar!/com/mysql/cj/jdbc/exceptions/SQLExceptionsMapping.class"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="148"> |
| | | <caret line="73" selection-start-line="73" selection-end-line="73" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/Algorithm/Layouts/AlgorithmDBInterface.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="39"> |
| | | <caret line="12" column="60" lean-forward="true" selection-start-line="12" selection-start-column="60" selection-end-line="12" selection-end-column="60" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/Algorithm/Layouts/Heuristic.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="88"> |
| | | <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/druid.properties"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="220"> |
| | | <caret line="10" column="12" lean-forward="true" selection-start-line="10" selection-start-column="12" selection-end-line="10" selection-end-column="12" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/lang/Thread.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="136"> |
| | | <caret line="246" column="44" selection-start-line="246" selection-start-column="44" selection-end-line="246" selection-end-column="44" /> |
| | | <folding> |
| | | <element signature="e#15465#15466#0" expanded="true" /> |
| | | <element signature="e#15531#15532#0" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/devices/ModbusClient.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="389"> |
| | | <caret line="339" column="32" selection-start-line="339" selection-start-column="30" selection-end-line="339" selection-end-column="32" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/devices/ModbusService.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="136"> |
| | | <caret line="54" lean-forward="true" selection-start-line="54" selection-end-line="54" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/devices/MysqlService.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="161"> |
| | | <caret line="144" column="17" lean-forward="true" selection-start-line="144" selection-start-column="17" selection-end-line="144" selection-end-column="17" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/DBHelper.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="189"> |
| | | <caret line="530" column="34" lean-forward="true" selection-start-line="530" selection-start-column="34" selection-end-line="530" selection-end-column="34" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | <element signature="e#1764#1765#0" expanded="true" /> |
| | | <element signature="e#1794#1795#0" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/builder/PaibanManager.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="241"> |
| | | <caret line="23" column="17" lean-forward="true" selection-start-line="23" selection-start-column="17" selection-end-line="24" selection-end-column="35" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="jar://C:/Program Files/Java/jdk1.8.0_121/src.zip!/java/net/ServerSocket.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="153"> |
| | | <caret line="126" column="23" selection-start-line="126" selection-start-column="11" selection-end-line="126" selection-end-column="23" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/TcpMain.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="726"> |
| | | <caret line="34" column="32" selection-start-line="34" selection-start-column="32" selection-end-line="34" selection-end-column="32" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/TcpMultiServer.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="440"> |
| | | <caret line="26" column="39" selection-start-line="26" selection-start-column="39" selection-end-line="26" selection-end-column="39" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/builder/Manager.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="374"> |
| | | <caret line="29" column="42" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/builder/MachineManager.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="550"> |
| | | <caret line="35" column="16" selection-start-line="35" selection-start-column="16" selection-end-line="35" selection-end-column="16" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/TcpClientHandler.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="160"> |
| | | <caret line="66" column="36" selection-start-line="66" selection-start-column="36" selection-end-line="66" selection-end-column="36" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/gethex.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="918"> |
| | | <caret line="69" column="9" selection-start-line="69" selection-start-column="9" selection-end-line="69" selection-end-column="9" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/getFtpData.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="703"> |
| | | <caret line="49" column="25" lean-forward="true" selection-start-line="49" selection-start-column="25" selection-end-line="49" selection-end-column="25" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/toFtp.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="-1"> |
| | | <caret line="105" lean-forward="true" selection-start-line="105" selection-end-line="105" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | <element signature="method#getFtpClient#0;class#toFtp#0" /> |
| | | <element signature="method#disConnect#0;class#toFtp#0" /> |
| | | <element signature="method#upload#0;class#toFtp#0" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/druidConnect/JDBCUtils.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="-575"> |
| | | <caret line="31" column="7" selection-start-line="31" selection-start-column="7" selection-end-line="31" selection-end-column="7" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/ng/db/sendOptFile.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="402"> |
| | | <caret line="66" column="15" selection-start-line="66" selection-start-column="8" selection-end-line="66" selection-end-column="15" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/toTcp/TCPClient.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="220"> |
| | | <caret line="12" column="42" selection-start-line="12" selection-start-column="42" selection-end-line="12" selection-end-column="42" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | <entry file="file://$PROJECT_DIR$/src/druidConnect/getMeterParatermeter.java"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="132"> |
| | | <caret line="8" column="8" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="54" /> |
| | | <folding> |
| | | <element signature="imports" expanded="true" /> |
| | | </folding> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | </component> |
| | | <component name="masterDetails"> |
| | | <states> |
| | | <state key="ArtifactsStructureConfigurable.UI"> |
| | | <settings> |
| | | <artifact-editor /> |
| | | <last-edited>nglib.150:jar</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | <option value="0.5" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="FacetStructureConfigurable.UI"> |
| | | <settings> |
| | | <last-edited>No facets are configured</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="GlobalLibrariesConfigurable.UI"> |
| | | <settings> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="JdkListConfigurable.UI"> |
| | | <settings> |
| | | <last-edited>1.8</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="ModuleStructureConfigurable.UI"> |
| | | <settings> |
| | | <last-edited>nglib</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="ProjectJDKs.UI"> |
| | | <settings> |
| | | <last-edited>1.8</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | <state key="ProjectLibrariesConfigurable.UI"> |
| | | <settings> |
| | | <last-edited>mysql-connector-java-8.0.20</last-edited> |
| | | <splitter-proportions> |
| | | <option name="proportions"> |
| | | <list> |
| | | <option value="0.2" /> |
| | | </list> |
| | | </option> |
| | | </splitter-proportions> |
| | | </settings> |
| | | </state> |
| | | </states> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | driverClassName=com.mysql.cj.jdbc.Driver |
| | | url=jdbc:mysql://localhost:3306/gmms?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username=root |
| | | password=beibo.123/ |
| | | |
| | | #åå§åæ¶æ± ä¸å»ºç«çç©çè¿æ¥ä¸ªæ° |
| | | initialSize=10 |
| | | #æå¤§ç坿´»è·çè¿æ¥æ± æ°é |
| | | maxActive=20 |
| | | #è·åè¿æ¥æ¶æå¤§çå¾
æ¶é´ï¼å使¯«ç§ï¼è¶
è¿è¿æ¥å°±ä¼å¤±æ |
| | | maxWait=3000 |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | public class NGException extends Exception { |
| | | |
| | | public int ErrorCode; |
| | | public Object Tag; |
| | | |
| | | public NGException(String message){ |
| | | super(message); |
| | | } |
| | | |
| | | public NGException(String message,Exception e){ |
| | | super(message,e); |
| | | } |
| | | |
| | | public NGException(int ErrorCode,String message,Exception e){ |
| | | super(message,e); |
| | | this.ErrorCode=ErrorCode; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | public class OptimizationInput { |
| | | |
| | | public Param Param; |
| | | public Polygon_Info[] Polygons; |
| | | public Stock_Info[] Stocks; |
| | | public String GongCheng; |
| | | |
| | | |
| | | public OptimizationInput(){ |
| | | |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("GongCheng",this.GongCheng); |
| | | obj.put("Param",this.Param.toJson()); |
| | | JSONArray arr=new JSONArray(); |
| | | for(int i=0;i<this.Polygons.length;i++){ |
| | | arr.put(this.Polygons[i].toJson()); |
| | | } |
| | | obj.put("Polygons", arr); |
| | | arr=new JSONArray(); |
| | | for(int i=0;i<this.Stocks.length;i++){ |
| | | arr.put(this.Stocks[i].toJson()); |
| | | } |
| | | obj.put("Stocks", arr); |
| | | return obj; |
| | | } |
| | | |
| | | public OptimizationInput(JSONObject obj) throws JSONException{ |
| | | this.Param=new Param(obj.getJSONObject("Param")); |
| | | JSONArray arr=obj.getJSONArray("Polygons"); |
| | | this.Polygons=new Polygon_Info[arr.length()]; |
| | | for(int i=0;i<arr.length();i++){ |
| | | this.Polygons[i]=new Polygon_Info(arr.getJSONObject(i)); |
| | | } |
| | | arr=obj.getJSONArray("Stocks"); |
| | | this.Stocks=new Stock_Info[arr.length()]; |
| | | for(int i=0;i<arr.length();i++){ |
| | | this.Stocks[i]=new Stock_Info( arr.getJSONObject(i)); |
| | | } |
| | | this.GongCheng=obj.getString("GongCheng"); |
| | | } |
| | | |
| | | |
| | | public static class Param{ |
| | | public boolean AutoMatch=false; |
| | | public boolean RotateAble=false; |
| | | public int MaxRack=0; |
| | | public double BaiBian=12; |
| | | public double ZhengGongCha=0; |
| | | public double FuGongCha=0; |
| | | public int YuanDianWeiZhi=0; |
| | | public int XiuBianMode=0; |
| | | public int TongDaoShu=1; |
| | | public int YouHuaCiShu=9; |
| | | public int MobianMinSize=0; |
| | | public Param(JSONObject obj) throws JSONException{ |
| | | this.AutoMatch=obj.getBoolean("AutoMatch"); |
| | | this.RotateAble=obj.getBoolean("RotateAble"); |
| | | this.MaxRack=obj.getInt("MaxRack"); |
| | | this.BaiBian=obj.getDouble("BaiBian"); |
| | | this.ZhengGongCha=obj.getDouble("ZhengGongCha"); |
| | | this.FuGongCha=obj.getDouble("FuGongCha"); |
| | | this.YuanDianWeiZhi=obj.getInt("YuanDianWeiZhi"); |
| | | this.XiuBianMode=obj.getInt("XiuBianMode"); |
| | | this.TongDaoShu=obj.getInt("TongDaoShu"); |
| | | this.YouHuaCiShu=obj.getInt("YouHuaCiShu"); |
| | | this.MobianMinSize=obj.getInt("MobianMinSize"); |
| | | } |
| | | |
| | | public Param(){ |
| | | |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject ret=new JSONObject(); |
| | | ret.put("AutoMatch", this.AutoMatch); |
| | | ret.put("RotateAble", this.RotateAble); |
| | | ret.put("MaxRack", this.MaxRack); |
| | | ret.put("BaiBian", this.BaiBian); |
| | | ret.put("ZhengGongCha", this.ZhengGongCha); |
| | | ret.put("FuGongCha", this.FuGongCha); |
| | | ret.put("YuanDianWeiZhi", this.YuanDianWeiZhi); |
| | | ret.put("XiuBianMode", this.XiuBianMode); |
| | | ret.put("TongDaoShu", this.TongDaoShu); |
| | | ret.put("YouHuaCiShu", this.YouHuaCiShu); |
| | | ret.put("MobianMinSize", this.MobianMinSize); |
| | | return ret; |
| | | } |
| | | } |
| | | |
| | | public static class Polygon_Info{ |
| | | public double width; |
| | | public double height; |
| | | public double thickness; |
| | | public double LM1; |
| | | public double LM2; |
| | | public double DM1; |
| | | public double DM2; |
| | | public String JiaHao; |
| | | public String CustomName; |
| | | public String orderid; //æ¶å·+/+å± |
| | | public String xuhao; //åºå· |
| | | public int count; |
| | | public String gongcheng; |
| | | public int rownumber; |
| | | public String liuchengka; |
| | | |
| | | public Polygon_Info(){ |
| | | |
| | | } |
| | | |
| | | public Polygon_Info(JSONObject obj) throws JSONException{ |
| | | this.width=obj.getDouble("width"); |
| | | this.height=obj.getDouble("height"); |
| | | this.thickness=obj.getDouble("thickness"); |
| | | this.LM1=obj.getDouble("LM1"); |
| | | this.LM2=obj.getDouble("LM2"); |
| | | this.DM1=obj.getDouble("DM1"); |
| | | this.DM2=obj.getDouble("DM2"); |
| | | this.JiaHao=obj.getString("JiaHao"); |
| | | this.CustomName=obj.getString("CustomName"); |
| | | this.orderid=obj.getString("orderid"); |
| | | this.xuhao=obj.getString("xuhao"); |
| | | this.count=obj.getInt("count"); |
| | | this.gongcheng=obj.getString("gongcheng"); |
| | | this.rownumber=obj.getInt("rownumber"); |
| | | this.liuchengka=obj.getString("liuchengka"); |
| | | } |
| | | |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject ret=new JSONObject(); |
| | | ret.put("width", this.width); |
| | | ret.put("height", this.height); |
| | | ret.put("thickness", this.thickness); |
| | | ret.put("LM1", this.LM1); |
| | | ret.put("LM2", this.LM2); |
| | | ret.put("DM1", this.DM1); |
| | | ret.put("DM2", this.DM2); |
| | | ret.put("JiaHao", this.JiaHao); |
| | | ret.put("CustomName", this.CustomName); |
| | | ret.put("orderid", this.orderid); |
| | | ret.put("xuhao", this.xuhao); |
| | | ret.put("count", this.count); |
| | | ret.put("gongcheng", this.gongcheng); |
| | | ret.put("rownumber", this.rownumber); |
| | | ret.put("liuchengka", this.liuchengka); |
| | | |
| | | return ret; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public static class Stock_Info{ |
| | | public double up; |
| | | public double down; |
| | | public double left; |
| | | public double right; |
| | | public double width; |
| | | public double height; |
| | | public int count; |
| | | public String libposition; |
| | | public String Color; |
| | | public double thickness; |
| | | public String supplyer; |
| | | public String wuliao_number; |
| | | public Stock_Info(JSONObject obj) throws JSONException{ |
| | | |
| | | this.up=obj.getDouble("up"); |
| | | this.down=obj.getDouble("down"); |
| | | this.left=obj.getDouble("left"); |
| | | this.right=obj.getDouble("right"); |
| | | this.width=obj.getDouble("width"); |
| | | this.height=obj.getDouble("height"); |
| | | this.count=obj.getInt("count"); |
| | | this.libposition=obj.getString("libposition"); |
| | | this.Color=obj.getString("Color"); |
| | | this.thickness=obj.getDouble("thickness"); |
| | | this.supplyer=obj.getString("supplyer"); |
| | | this.wuliao_number=obj.getString("wuliao_number"); |
| | | } |
| | | |
| | | public Stock_Info(){ |
| | | |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject ret=new JSONObject(); |
| | | ret.put("up", this.up); |
| | | ret.put("down", this.down); |
| | | ret.put("left", this.left); |
| | | ret.put("right", this.right); |
| | | ret.put("width", this.width); |
| | | ret.put("height", this.height); |
| | | ret.put("count", this.count); |
| | | ret.put("libposition", this.libposition); |
| | | ret.put("count", this.count); |
| | | ret.put("thickness", this.thickness); |
| | | ret.put("supplyer", this.supplyer); |
| | | ret.put("wuliao_number", this.wuliao_number); |
| | | |
| | | return ret; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | import java.util.*; |
| | | import java.util.UUID; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import com.jacob.activeX.ActiveXComponent; |
| | | import com.jacob.com.Dispatch; |
| | | public class OptimizationManager { |
| | | |
| | | |
| | | |
| | | static List<OptimizeTag> tags=new ArrayList<OptimizeTag>(); |
| | | |
| | | |
| | | public static OptimizeTag createOptimization(String id) throws NGException{ |
| | | OptimizeTag tag=null; |
| | | synchronized(tags){ |
| | | for(int i=0;i<tags.size();i++){ |
| | | OptimizeTag tg=tags.get(i); |
| | | if(tg.getId().equals(id)){ |
| | | throw new NGException("ä¼å对象åç§°å·²åå¨"); |
| | | } |
| | | } |
| | | tag=OptimizeTag.create(id); |
| | | tags.add(tag); |
| | | } |
| | | return tag; |
| | | } |
| | | |
| | | public static OptimizeTag getOrCreateOptimization(String id){ |
| | | OptimizeTag tag=null; |
| | | synchronized(tags){ |
| | | for(int i=0;i<tags.size();i++){ |
| | | OptimizeTag tag1=tags.get(i); |
| | | if(tag1.getId().equals(id)){ |
| | | return tag1; |
| | | } |
| | | } |
| | | tag=OptimizeTag.create(id); |
| | | tags.add(tag); |
| | | return tag; |
| | | } |
| | | } |
| | | |
| | | |
| | | public static OptimizeTag getTag(String id){ |
| | | synchronized(tags){ |
| | | for(int i=0;i<tags.size();i++){ |
| | | OptimizeTag tag=tags.get(i); |
| | | if(tag.getId().equals(id)){ |
| | | return tag; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //è·åææTagä¿¡æ¯ï¼ç®¡çè
ç¨ï¼ |
| | | public static JSONArray getAllTagInfo() throws JSONException{ |
| | | JSONArray arr=new JSONArray(); |
| | | synchronized(tags){ |
| | | for(int i=0;i<tags.size();i++){ |
| | | OptimizeTag tag=tags.get(i); |
| | | arr.put(tag.infoToJson()); |
| | | } |
| | | } |
| | | return arr; |
| | | } |
| | | |
| | | //å 餿å®Tag |
| | | public static void delete(String id){ |
| | | synchronized(tags){ |
| | | for(int i=0;i<tags.size();i++){ |
| | | OptimizeTag tag=tags.get(i); |
| | | if(tag.getId().equals(id)){ |
| | | tags.remove(tag); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static String saveOpt(String Gongcheng, String BtContent, String type, String path){ |
| | | OptimizeTag tag=OptimizeTag.create(); |
| | | return tag.saveOpt(Gongcheng,BtContent,type,path); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | public class OptimizationResult { |
| | | |
| | | public Boolean Success; |
| | | public String ErrorMessage; |
| | | public String btContent; |
| | | public Layout[] Layouts; |
| | | |
| | | public OptimizationResult(JSONObject obj) throws JSONException{ |
| | | this.Success=obj.getBoolean("Success"); |
| | | this.ErrorMessage=obj.getString("ErrorMessage"); |
| | | if(obj.has("btContent")) |
| | | this.btContent=obj.getString("btContent"); |
| | | if(obj.has("Layouts")){ |
| | | JSONArray arr=obj.getJSONArray("Layouts"); |
| | | Layouts=new Layout[arr.length()]; |
| | | for(int i=0;i<Layouts.length;i++){ |
| | | this.Layouts[i]=new Layout(arr.getJSONObject(i)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public JSONObject toJson() throws JSONException { |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("Success", this.Success); |
| | | obj.put("ErrorMessage", this.ErrorMessage); |
| | | |
| | | obj.put("btContent", this.btContent==null?JSONObject.NULL:this.btContent); |
| | | if(Layouts==null) |
| | | obj.put("Layouts",JSONObject.NULL); |
| | | else{ |
| | | JSONArray ar=new JSONArray(); |
| | | for(int i=0;i<Layouts.length;i++){ |
| | | ar.put(this.Layouts[i].toJson()); |
| | | } |
| | | obj.put("Layouts",ar); |
| | | } |
| | | |
| | | return obj; |
| | | } |
| | | |
| | | |
| | | |
| | | public class Layout{ |
| | | public Rect[] rects; |
| | | public int number; |
| | | public String wuliao; |
| | | public int width; |
| | | public int height; |
| | | public int SameCount; |
| | | |
| | | public Layout(JSONObject obj) throws JSONException{ |
| | | this.number=obj.getInt("number"); |
| | | this.wuliao=obj.getString("wuliao"); |
| | | this.width=obj.getInt("width"); |
| | | this.height=obj.getInt("height"); |
| | | this.SameCount=obj.getInt("SameCount"); |
| | | JSONArray arr=obj.getJSONArray("rects"); |
| | | this.rects=new Rect[arr.length()]; |
| | | for(int i=0;i<this.rects.length;i++){ |
| | | this.rects[i]=new Rect(arr.getJSONObject(i)); |
| | | } |
| | | } |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject ret=new JSONObject(); |
| | | ret.put("mnumber", number); |
| | | ret.put("wuliao", this.wuliao); |
| | | ret.put("width", this.width); |
| | | ret.put("height",this.height); |
| | | ret.put("SameCount", this.SameCount); |
| | | JSONArray arr=new JSONArray(); |
| | | for(int i=0;i<this.rects.length;i++){ |
| | | arr.put(this.rects[i].toJson()); |
| | | } |
| | | ret.put("rects", arr); |
| | | return ret; |
| | | } |
| | | } |
| | | |
| | | public class Rect{ |
| | | public double x; |
| | | public double y; |
| | | public double w; |
| | | public double h; |
| | | public double DM1; |
| | | public double DM2; |
| | | public double LM1; |
| | | public double LM2; |
| | | public int rownumber; |
| | | public String xuhao; |
| | | public boolean isRemain; |
| | | public String liuchengka; |
| | | public String JiaHao; |
| | | |
| | | public Rect(JSONObject obj) throws JSONException{ |
| | | this.x=obj.getDouble("x"); |
| | | this.y=obj.getDouble("y"); |
| | | this.w=obj.getDouble("w"); |
| | | this.h=obj.getDouble("h"); |
| | | this.DM1=obj.getDouble("DM1"); |
| | | this.DM2=obj.getDouble("DM2"); |
| | | this.LM1=obj.getDouble("LM1"); |
| | | this.LM2=obj.getDouble("LM1"); |
| | | this.rownumber=obj.getInt("rownumber"); |
| | | this.xuhao=obj.getString("xuhao"); |
| | | this.isRemain=obj.getBoolean("isRemain"); |
| | | this.liuchengka=obj.getString("liuchengka"); |
| | | this.JiaHao=obj.getString("JiaHao"); |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("x", x); |
| | | obj.put("y", y); |
| | | obj.put("w", w); |
| | | obj.put("h", h); |
| | | obj.put("DM1", DM1); |
| | | obj.put("DM2", DM2); |
| | | obj.put("LM1", LM1); |
| | | obj.put("LM2", LM2); |
| | | obj.put("rownumber", rownumber); |
| | | obj.put("xuhao", xuhao); |
| | | obj.put("isRemain", isRemain); |
| | | obj.put("liuchengka", liuchengka); |
| | | obj.put("JiaHao", JiaHao); |
| | | return obj; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | public class OptimizationState { |
| | | public String State; |
| | | public TongDaoState[] TongDaoInfos; |
| | | |
| | | public OptimizationState(JSONObject obj) throws JSONException{ |
| | | |
| | | this.State=obj.getString("State"); |
| | | if(obj.has("TongDaoInfos")){ |
| | | if(obj.isNull("TongDaoInfos")==false){ |
| | | JSONArray arr=obj.getJSONArray("TongDaoInfos"); |
| | | this.TongDaoInfos=new TongDaoState[arr.length()]; |
| | | for(int i=0;i<arr.length();i++){ |
| | | this.TongDaoInfos[i]=new TongDaoState(arr.getJSONObject(i)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("State",this.State); |
| | | JSONArray arr=new JSONArray(); |
| | | for(int i=0;i<this.TongDaoInfos.length;i++){ |
| | | arr.put(this.TongDaoInfos[i].toJson()); |
| | | } |
| | | obj.put("TongDaoInfos", arr); |
| | | return obj; |
| | | } |
| | | |
| | | |
| | | |
| | | public class TongDaoState{ |
| | | public int OptCount; |
| | | public int value; |
| | | public int max; |
| | | public int TotalCount; |
| | | public UseStock[] UseStocks; |
| | | public boolean NotEnough; |
| | | |
| | | |
| | | public TongDaoState(JSONObject obj) throws JSONException{ |
| | | this.OptCount=obj.getInt("OptCount"); |
| | | this.value=obj.getInt("value"); |
| | | this.max=obj.getInt("max"); |
| | | this.TotalCount=obj.getInt("TotalCount"); |
| | | this.NotEnough=obj.getBoolean("NotEnough"); |
| | | if(obj.has("UseStocks")){ |
| | | if(obj.isNull("UseStocks")==false){ |
| | | JSONArray a=obj.getJSONArray("UseStocks"); |
| | | UseStocks=new UseStock[a.length()]; |
| | | for(int i=0;i<this.UseStocks.length;i++){ |
| | | this.UseStocks[i]=new UseStock(a.getJSONObject(i)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("OptCount",this.OptCount); |
| | | obj.put("value",this.value); |
| | | obj.put("max", max); |
| | | obj.put("TotalCount", this.TotalCount); |
| | | obj.put("NotEnough", this.NotEnough); |
| | | JSONArray arr=new JSONArray(); |
| | | if(this.UseStocks!=null){ |
| | | for(int i=0;i<this.UseStocks.length;i++){ |
| | | arr.put(this.UseStocks[i].toJson()); |
| | | } |
| | | } |
| | | obj.put("UseStocks",arr); |
| | | return obj; |
| | | } |
| | | } |
| | | |
| | | |
| | | public class UseStock |
| | | { |
| | | public int width; |
| | | public int height; |
| | | public int count; |
| | | public double UseArea; |
| | | |
| | | public UseStock(JSONObject obj) throws JSONException{ |
| | | this.width=obj.getInt("width"); |
| | | this.height=obj.getInt("height"); |
| | | this.count=obj.getInt("count"); |
| | | this.UseArea=obj.getDouble("UseArea"); |
| | | |
| | | } |
| | | |
| | | public JSONObject toJson() throws JSONException{ |
| | | JSONObject ret=new JSONObject(); |
| | | ret.put("width", width); |
| | | ret.put("height", height); |
| | | ret.put("count",count); |
| | | ret.put("UseArea", UseArea); |
| | | return ret; |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | import java.util.Dictionary; |
| | | import java.util.Hashtable; |
| | | import java.util.UUID; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import com.jacob.activeX.ActiveXComponent; |
| | | import com.jacob.com.Dispatch; |
| | | import java.util.concurrent.Semaphore; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import ng.db.*; |
| | | |
| | | public class OptimizeTag implements Runnable { |
| | | private String id; |
| | | private com.jacob.activeX.ActiveXComponent com; |
| | | private com.jacob.com.Dispatch dispatch; |
| | | private int running; |
| | | private java.util.Date date,lastdate; |
| | | private OptimizationInput input; |
| | | private java.lang.Thread thread; |
| | | public String flag; |
| | | public Object Token; |
| | | private static Semaphore sem; |
| | | |
| | | private Dictionary<String,Object> dic=new Hashtable<String,Object>(); |
| | | |
| | | |
| | | |
| | | public Object getProperty(String s){ |
| | | synchronized(dic){ |
| | | return dic.get(s); |
| | | } |
| | | } |
| | | |
| | | public void setProperty(String s,Object obj){ |
| | | synchronized(dic){ |
| | | dic.put(s,obj); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public OptimizationInput getInput(){ |
| | | return input; |
| | | } |
| | | |
| | | public JSONObject infoToJson() throws JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("id", id); |
| | | String s="free"; |
| | | if(running==1){ |
| | | s="running"; |
| | | } |
| | | if(running==2){ |
| | | s="complated"; |
| | | } |
| | | obj.put("state", s); |
| | | obj.put("createTime",NGFunction.dateFormat("yyyy-MM-dd HH:mm:ss", date)); |
| | | obj.put("lastTime",NGFunction.dateFormat("yyyy-MM-dd HH:mm:ss",this.lastdate)); |
| | | s=""; |
| | | OptimizationInput in=this.input; |
| | | if(in!=null){ |
| | | s=in.GongCheng; |
| | | } |
| | | obj.put("lastGongCheng", s); |
| | | return obj; |
| | | } |
| | | |
| | | boolean getExe(){ |
| | | |
| | | try { |
| | | if(sem.tryAcquire(0, TimeUnit.MILLISECONDS)){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public boolean BeginOptimize(OptimizationInput input){ |
| | | if(sem==null){ |
| | | sem=new Semaphore(1); |
| | | } |
| | | |
| | | if(running==0 || running==2){ |
| | | if(getExe()){ |
| | | running=1; |
| | | this.input=input; |
| | | thread=new Thread(this); |
| | | thread.start(); |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public String saveOpt(String Gongcheng, String BtContent, String type, String path){ |
| | | this.lastdate=new java.util.Date(); |
| | | return Dispatch.call(this.dispatch,"saveOpt",Gongcheng,BtContent,type,path).toString(); |
| | | } |
| | | |
| | | public Object[] getResultByBT(String Gongcheng, String BtContent){ |
| | | String s= Dispatch.call(this.dispatch, "btToResult",Gongcheng,BtContent).toString(); |
| | | try { |
| | | JSONArray obj=new JSONArray(s); |
| | | JSONObject ob=obj.getJSONObject(1); |
| | | OptimizationResult a=new OptimizationResult(ob); |
| | | JSONObject b=obj.getJSONObject(0); |
| | | JSONArray ar=new JSONArray(); |
| | | Object[] ret=new Object[2]; |
| | | ret[0]=b; |
| | | ret[1]=a; |
| | | return ret; |
| | | } catch (JSONException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static OptimizeTag create(){ |
| | | ActiveXComponent dotnetCom = new ActiveXComponent("CLSID:97D686F9-F577-4E41-B5BF-CB8CC5BC73CB"); |
| | | Dispatch myCom = (Dispatch) dotnetCom.getObject(); |
| | | OptimizeTag tag=new OptimizeTag(); |
| | | tag.id=null; |
| | | tag.com=dotnetCom; |
| | | tag.dispatch=myCom; |
| | | |
| | | tag.date=new java.util.Date(); |
| | | tag.lastdate=new java.util.Date(); |
| | | return tag; |
| | | } |
| | | |
| | | public static OptimizeTag create(String id){ |
| | | ActiveXComponent dotnetCom = new ActiveXComponent("CLSID:97D686F9-F577-4E41-B5BF-CB8CC5BC73CB"); |
| | | Dispatch myCom = (Dispatch) dotnetCom.getObject(); |
| | | OptimizeTag tag=new OptimizeTag(); |
| | | tag.id=id; |
| | | tag.com=dotnetCom; |
| | | tag.dispatch=myCom; |
| | | tag.date=new java.util.Date(); |
| | | tag.lastdate=new java.util.Date(); |
| | | return tag; |
| | | } |
| | | public OptimizationState getState() throws JSONException{ |
| | | this.lastdate=new java.util.Date(); |
| | | String s= Dispatch.call(this.dispatch,"getState").toString(); |
| | | if("null".equals(s)) |
| | | return null; |
| | | |
| | | JSONObject obj=new JSONObject(s); |
| | | |
| | | OptimizationState r=new OptimizationState(obj); |
| | | |
| | | if(this.running==1){ |
| | | r.State="busy"; |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | public OptimizationResult getResult() throws JSONException{ |
| | | this.lastdate=new java.util.Date(); |
| | | if(running!=2) |
| | | return null; |
| | | String s= Dispatch.call(this.dispatch,"getResult").toString(); |
| | | if("null".equals(s)) |
| | | return null; |
| | | JSONObject obj=new JSONObject(s); |
| | | return new OptimizationResult(obj); |
| | | } |
| | | |
| | | |
| | | public String getId(){ |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | this.lastdate=new java.util.Date(); |
| | | this.running=1; |
| | | // TODO Auto-generated method stub |
| | | String s; |
| | | try { |
| | | Dispatch.call(this.dispatch,"Optima",this.input.toJson().toString()).toString(); |
| | | } catch (JSONException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | sem.release(); |
| | | this.running=2; |
| | | this.thread=null; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package Optimize; |
| | | |
| | | import org.json.JSONException; |
| | | |
| | | import com.jacob.activeX.ActiveXComponent; |
| | | import com.jacob.com.Dispatch; |
| | | import com.jacob.com.Variant; |
| | | |
| | | import Optimize.*; |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | import ng.db.NGFunction; |
| | | public class mn { |
| | | |
| | | public static void _wmain(String[] inputs){ |
| | | |
| | | ActiveXComponent dotnetCom = new ActiveXComponent("Microsoft.PhotoAcquire"); |
| | | Dispatch myCom = (Dispatch) dotnetCom.getObject(); |
| | | //Variant ret= Dispatch.call(myCom, "getState"); |
| | | System.out.println(myCom.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static void main(String[] inputs){ |
| | | |
| | | try { |
| | | |
| | | OptimizeTag tag = OptimizationManager.createOptimization("abc"); |
| | | tag.setProperty("abc", "hello world"); |
| | | System.out.println(tag.getProperty("abc")); |
| | | tag.setProperty("abc", "kkkk"); |
| | | System.out.println(tag.getProperty("abc")); |
| | | OptimizationInput input=new OptimizationInput(); |
| | | |
| | | input.GongCheng="P0001"; |
| | | input.Param=new OptimizationInput.Param(); |
| | | input.Polygons=new OptimizationInput.Polygon_Info[2]; |
| | | OptimizationInput.Polygon_Info p=new OptimizationInput.Polygon_Info(); |
| | | p.count=30; |
| | | p.CustomName="a"; |
| | | p.DM1=0; |
| | | p.DM2=0; |
| | | p.gongcheng="P0001"; |
| | | p.height=800; |
| | | p.JiaHao="A01"; |
| | | p.liuchengka="NG01"; |
| | | p.LM1=0; |
| | | p.LM2=0; |
| | | p.orderid="nnn"; |
| | | p.rownumber=1; |
| | | p.thickness=6; |
| | | p.width=1000; |
| | | p.xuhao="1"; |
| | | input.Polygons[0]=p; |
| | | |
| | | p=new OptimizationInput.Polygon_Info(); |
| | | p.count=20; |
| | | p.CustomName="a"; |
| | | p.DM1=0; |
| | | p.DM2=0; |
| | | p.gongcheng="P0001"; |
| | | p.height=1800; |
| | | p.JiaHao="A02"; |
| | | p.liuchengka="NG02"; |
| | | p.LM1=0; |
| | | p.LM2=0; |
| | | p.orderid="nnn"; |
| | | p.rownumber=2; |
| | | p.thickness=6; |
| | | p.width=1000; |
| | | p.xuhao="2"; |
| | | input.Polygons[1]=p; |
| | | |
| | | input.Stocks=new OptimizationInput.Stock_Info[1]; |
| | | |
| | | OptimizationInput.Stock_Info st=new OptimizationInput.Stock_Info(); |
| | | st.Color="c"; |
| | | st.count=1000; |
| | | st.down=0; |
| | | st.height=2440; |
| | | st.left=0; |
| | | st.libposition="aaa"; |
| | | st.right=0; |
| | | st.supplyer="aaa"; |
| | | st.thickness=6; |
| | | st.up=0; |
| | | st.width=3660; |
| | | st.wuliao_number="M0001"; |
| | | input.Stocks[0]=st; |
| | | System.out.println(input.toJson().toString()); |
| | | tag.BeginOptimize(input); |
| | | |
| | | while(true){ |
| | | java.lang.Thread.sleep(5000); |
| | | OptimizationState state=tag.getState(); |
| | | if(state==null) |
| | | continue; |
| | | System.out.println(state.toJson().toString()); |
| | | if(state.State!="busy"){ |
| | | break; |
| | | } |
| | | } |
| | | OptimizationResult ret=tag.getResult(); |
| | | tag.saveOpt(input.GongCheng,ret.btContent,"OPTIMA","D:\\0001.opt"); |
| | | Object[] o= tag.getResultByBT(input.GongCheng,ret.btContent); |
| | | System.out.println(o[0].toString()); |
| | | ret=(OptimizationResult)o[1]; |
| | | if(ret!=null) |
| | | System.out.println(ret.toJson().toString()); |
| | | |
| | | }catch (JSONException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } catch (NGException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package builder; |
| | | import com.hikvision.artemis.sdk.ArtemisHttpUtil; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class GetCameraPreviewURL { |
| | | private static final String host = "xxx:4433"; |
| | | private static final String appKey = "xxxx"; |
| | | private static final String appSecret = "xxxxx"; |
| | | public static String GetCameraPreviewURL() { |
| | | |
| | | /** |
| | | * STEP1ï¼è®¾ç½®å¹³å°åæ°ï¼æ ¹æ®å®é
æ
åµ,设置host appkey appsecret ä¸ä¸ªåæ°. |
| | | */ |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * STEP2ï¼è®¾ç½®OpenAPIæ¥å£çä¸ä¸æ |
| | | */ |
| | | final String ARTEMIS_PATH = "/artemis"; |
| | | |
| | | /** |
| | | * STEP3ï¼è®¾ç½®æ¥å£çURIå°å |
| | | */ |
| | | final String previewURLsApi = ARTEMIS_PATH + "/api/acs/v1/door/states"; |
| | | Map<String, String> path = new HashMap<String, String>(2) { |
| | | { |
| | | put("https://", previewURLsApi);//æ ¹æ®ç°åºç¯å¢é¨ç½²ç¡®è®¤æ¯httpè¿æ¯https |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * STEP4ï¼è®¾ç½®åæ°æäº¤æ¹å¼ |
| | | */ |
| | | String contentType = "application/json"; |
| | | |
| | | /** |
| | | * STEP5ï¼ç»è£
请æ±åæ° |
| | | */ |
| | | JSONObject jsonBody = new JSONObject(); |
| | | jsonBody.put("doorIndexCodes", "748d84750e3a4a5bbad3cd4af9ed5101"); |
| | | String body = jsonBody.toJSONString(); |
| | | /** |
| | | * STEP6ï¼è°ç¨æ¥å£ |
| | | */ |
| | | ArtemisConfig artemisConfig = new ArtemisConfig(host, appKey, appSecret); |
| | | String result = null;// post请æ±application/jsonç±»ååæ° |
| | | try { |
| | | result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig,path, body, null, null, contentType , null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String result = GetCameraPreviewURL(); |
| | | System.out.println("resultç»æç¤ºä¾: " + result); |
| | | } |
| | | } |
| New file |
| | |
| | | package builder; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.io.OutputStreamWriter; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.InetSocketAddress; |
| | | import java.net.URI; |
| | | import java.sql.CallableStatement; |
| | | import java.sql.Connection; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.sun.net.httpserver.Headers; |
| | | import com.sun.net.httpserver.HttpExchange; |
| | | import com.sun.net.httpserver.HttpHandler; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public class HttpHandlerDemo implements HttpHandler{ |
| | | DBHelper db; |
| | | |
| | | @Override |
| | | public void handle(HttpExchange httpExchange) throws IOException { |
| | | //请æ±å°å |
| | | InetSocketAddress inetSocketAddress=httpExchange.getRemoteAddress(); |
| | | //è¯·æ±æ¹å¼ |
| | | String requestMethod=httpExchange.getRequestMethod(); |
| | | //url |
| | | URI url=httpExchange.getRequestURI(); |
| | | if(requestMethod.equalsIgnoreCase("GET")){//客æ·ç«¯çè¯·æ±æ¯getæ¹æ³ |
| | | //设置æå¡ç«¯ååºçç¼ç æ ¼å¼ï¼å¦åå¨å®¢æ·ç«¯æ¶å°çå¯è½æ¯ä¹±ç |
| | | Headers responseHeaders = httpExchange.getResponseHeaders(); |
| | | responseHeaders.set("Content-Type", "text/html;charset=utf-8"); |
| | | |
| | | //å¨è¿ééè¿httpExchangeè·å客æ·ç«¯åéè¿æ¥çæ¶æ¯ |
| | | //URI url = httpExchange.getRequestURI(); |
| | | //InputStream requestBody = httpExchange.getRequestBody(); |
| | | |
| | | String response = "this is server"; |
| | | |
| | | httpExchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, response.getBytes("UTF-8").length); |
| | | |
| | | OutputStream responseBody = httpExchange.getResponseBody(); |
| | | OutputStreamWriter writer = new OutputStreamWriter(responseBody, "UTF-8"); |
| | | writer.write(response); |
| | | writer.close(); |
| | | responseBody.close(); |
| | | } |
| | | else { |
| | | //è¯·æ±æ¥æ |
| | | InputStream inputStream=httpExchange.getRequestBody(); |
| | | ByteArrayOutputStream bas=new ByteArrayOutputStream(); |
| | | int i; |
| | | while((i=inputStream.read())!=-1) { |
| | | bas.write(i); |
| | | } |
| | | String requestmsg=bas.toString(); |
| | | JSONObject jsonObject = JSONObject.parseObject(requestmsg); |
| | | |
| | | String shebei=jsonObject.get("sn").toString(); |
| | | |
| | | JSONArray a=jsonObject.getJSONArray("logs"); |
| | | |
| | | String user_id=a.getJSONObject(0).get("user_id").toString(); |
| | | String times=a.getJSONObject(0).get("recog_time").toString(); |
| | | System.out.println("è¯·æ±æ¥æ:"+shebei+user_id+times); |
| | | |
| | | DBSession sn=null; |
| | | DBHelper.addHelper("mes","jdbc:mysql://127.0.0.1:3307/gmms?serverTimezone=GMT%2B8","root","beibo.123/"); |
| | | String result=null; |
| | | |
| | | try{ |
| | | |
| | | sn=DBHelper.getDBHelper("mes").createSession(false); |
| | | Connection con= sn.getConnection(); |
| | | CallableStatement sql=con.prepareCall("{call Face_recognition(?,?,?,?)}"); |
| | | sql.registerOutParameter(4, java.sql.Types.VARCHAR); |
| | | sql.setString(1, shebei); |
| | | sql.setString(2, user_id); |
| | | sql.setString(3, times); |
| | | sql.execute(); |
| | | result= sql.getString(4); |
| | | System.out.println(result); |
| | | } |
| | | catch(Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | finally{ |
| | | sn.close(); |
| | | |
| | | } |
| | | |
| | | //è¿åæ¥æ |
| | | JSONObject jsonObject1 = new JSONObject(); |
| | | jsonObject1.put("Result", 0); |
| | | jsonObject1.put("Content", ""); |
| | | jsonObject1.put("Msg", ""); |
| | | httpExchange.sendResponseHeaders(HttpURLConnection.HTTP_OK,jsonObject1.toString().getBytes("UTF-8").length ); |
| | | OutputStream outputStream=httpExchange.getResponseBody(); |
| | | outputStream.write(jsonObject1.toString().getBytes("UTF-8")); |
| | | outputStream.close(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package builder; |
| | | import ng.devices.*; |
| | | import java.sql.CallableStatement; |
| | | import java.sql.Connection; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.json.*; |
| | | |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | import ng.devices.*; |
| | | public class MachineManager { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | class item { |
| | | public DBHelper helper; |
| | | public MysqlService serv; |
| | | public int ID; |
| | | public String IP; |
| | | public int Port; |
| | | public int ReadOffset; |
| | | public int ReadSize; |
| | | public String ProcName; |
| | | public String Name; |
| | | public byte FunctionType; |
| | | |
| | | } |
| | | List<item> items=new ArrayList<item>(); |
| | | |
| | | public void RunAll(){ |
| | | for(item it:items){ |
| | | Run(it.Name); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | public void Run(String name){ |
| | | item itm=null; |
| | | synchronized(items){ |
| | | itm=innerGetItem(name); |
| | | } |
| | | if(itm!=null){ |
| | | if(itm.serv==null){ |
| | | itm.serv=new MysqlService(itm.helper,itm.ID); |
| | | itm.serv.Run(itm.ID,itm.IP,itm.Port, (byte)1,itm.ReadOffset, itm.ReadSize,1000,itm.FunctionType); |
| | | System.out.println(String.format("设å¤å¯å¨-{%s}(%s)(%s)",itm.Name,itm.IP,itm.FunctionType)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private item innerGetItem(String name){ |
| | | for(int i=0;i<items.size();i++){ |
| | | if(name==items.get(i).Name) |
| | | return items.get(i); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public item innerGetItem(int id){ |
| | | for(int i=0;i<items.size();i++){ |
| | | if(id==items.get(i).ID) |
| | | return items.get(i); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | public void createDevice(DBHelper helper,int DeviceID,String Name,String Ip,int Port,int ReadOffset,int ReadSize,String ProcName,byte FunctionType){ |
| | | synchronized(items){ |
| | | |
| | | item itm=new item(); |
| | | itm.helper=helper; //æ°æ®åº |
| | | itm.ProcName=ProcName; //åå¨è¿ç¨å |
| | | itm.Name=Name; //设å¤å |
| | | itm.ID=DeviceID; //设å¤ID |
| | | itm.IP=Ip; //设å¤IP |
| | | itm.Port=Port; //设å¤ç«¯å£ |
| | | itm.ReadOffset=ReadOffset; //读ååç§» |
| | | itm.ReadSize=ReadSize;//åéåç§» |
| | | itm.FunctionType=FunctionType; |
| | | /*if(DeviceID==6 || DeviceID==19 || DeviceID==29 || DeviceID==30){ |
| | | itm.ReadOffset=12000; |
| | | }*/ |
| | | items.add(itm); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //å°è®¾å¤ä¿¡æ¯è½¬å为JSONæ°ç»ï¼ç¨äºåå°æ¾ç¤º |
| | | public JSONArray getContext(){ |
| | | JSONArray arr=new JSONArray(); |
| | | for(int i=0;i<this.items.size();i++){ |
| | | item it=this.items.get(i); |
| | | JSONObject obj=new JSONObject(); |
| | | try { |
| | | obj.put("ip", it.IP); //æ¾å
¥IP |
| | | obj.put("port",it.Port); //æ¾å
¥ç«¯å£ |
| | | obj.put("name",it.Name); //æ¾å
¥è®¾å¤å |
| | | obj.put("id", it.ID); //æ¾å
¥ID |
| | | |
| | | String send="---"; |
| | | String get="---"; |
| | | if(it.serv!=null){ |
| | | obj.put("count", it.serv.ioCount); //æ¾å
¥è¯»åæ¬¡æ° |
| | | send=it.serv.lastSend; |
| | | get=it.serv.lastGet; |
| | | if(send==null) |
| | | send="---"; |
| | | if(get==null){ |
| | | get="---"; |
| | | } |
| | | } |
| | | else{ |
| | | obj.put("count", 0); |
| | | } |
| | | obj.put("send", send); //æ¾å
¥æå䏿¬¡åéä¿¡æ¯ |
| | | obj.put("get", get); //æ¾å
¥æå䏿¬¡è¯»åä¿¡æ¯ |
| | | obj.put("dev_state", it.serv.zhangtai); |
| | | String st="çº¿ç¨æªå¼å¯"; |
| | | if(it.serv!=null){ |
| | | if(it.serv.isRunning()) |
| | | st="æªè¿æ¥"; |
| | | if(it.serv.isOnLine()){ |
| | | st="å·²è¿æ¥"; |
| | | } |
| | | } |
| | | obj.put("st",st); //æ¾å
¥çº¿ç¨ç¶æ |
| | | arr.put(obj); |
| | | } catch (JSONException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | return arr; //è¿åç»æ |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package builder; |
| | | |
| | | import java.io.BufferedWriter; |
| | | import java.io.OutputStreamWriter; |
| | | import java.net.Socket; |
| | | import java.sql.Connection; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | |
| | | import org.json.JSONArray; |
| | | |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | import ng.devices.HexUtil; |
| | | |
| | | public class Manager { |
| | | //设å¤ç®¡çå¨ |
| | | static MachineManager mmgr; |
| | | //ä¼åæç管çå¨ |
| | | static PaibanManager panban_mgr; |
| | | |
| | | //åå§ååç§æ¨¡å |
| | | static void init() throws Exception { |
| | | |
| | | //åå§åæ°æ®åºæ¨¡å |
| | | DBHelper.InitHelper(); |
| | | mmgr = new MachineManager(); |
| | | //panban_mgr=new PaibanManager(); |
| | | //panban_mgr.initPainbanManager(); |
| | | |
| | | } |
| | | |
| | | static void init(String[] con) throws Exception { |
| | | |
| | | //åå§åæ°æ®åºæ¨¡å |
| | | |
| | | DBHelper.addHelper("mes",con[0],con[1],con[2]); |
| | | mmgr = new MachineManager(); |
| | | // panban_mgr=new PaibanManager(); |
| | | // panban_mgr.initPainbanManager(con[0],con[1],con[2]); |
| | | |
| | | } |
| | | |
| | | |
| | | public static boolean isStart(){ |
| | | return state; |
| | | } |
| | | |
| | | //æ¯å¦å·²ç»å¯å¨ |
| | | static boolean state = false; |
| | | |
| | | //Managerå¯å¨å½æ° |
| | | public static void appStart(String[] ss) { |
| | | if (state == false) { |
| | | try { |
| | | //åå§å管çå¨ |
| | | Manager.init(ss); |
| | | //仿°æ®åºé
ç½®åå»ºè®¾å¤ |
| | | Manager.buildDevice(); |
| | | //å¯å¨ææè®¾å¤é讯 |
| | | Manager.mmgr.RunAll(); |
| | | //å¯å¨æ å¿ |
| | | state = true; |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //è·åææè®¾å¤ä¿¡æ¯çæJSONæ°ç» |
| | | public static JSONArray getDevice(){ |
| | | return mmgr.getContext(); |
| | | } |
| | | |
| | | |
| | | //仿°æ®åºå建ææè®¾å¤ |
| | | static void buildDevice(){ |
| | | |
| | | DBSession sn=null; |
| | | try{ |
| | | //读å设å¤å表 |
| | | DBHelper db=DBHelper.getDBHelper("mes"); |
| | | sn=DBHelper.getDBHelper("mes").createSession(false); |
| | | sn.createSql("select id,machine_name,ip_address,port,flag,read_size,read_offset,function_type,flag from machine"); |
| | | ResultSet set= sn.query().getCurrentResult(); |
| | | //å建ææè®¾å¤é讯 |
| | | while(set.next()){ |
| | | int id=(int)set.getLong(1); |
| | | String name=set.getString(2); |
| | | String ip=set.getString(3); |
| | | int port=set.getInt(4); |
| | | int flag=set.getInt(5); |
| | | int readSize=set.getInt(6); |
| | | int readOffset=set.getInt(7); |
| | | byte functionType=set.getByte(8); |
| | | int flags=set.getInt(9); |
| | | if(flags==1){ |
| | | mmgr.createDevice(db,id,name,ip,port,readOffset,readSize,null,functionType); |
| | | } |
| | | |
| | | } |
| | | } |
| | | catch(Exception e){ |
| | | |
| | | } |
| | | finally{ |
| | | if(sn!=null) |
| | | sn.close(); |
| | | } |
| | | mmgr.RunAll(); |
| | | } |
| | | |
| | | //å¼å¸¸è®°å½ï¼è¿éå䏿¬¡å°è£
æ¯ä¸ºäºå¯ä»¥è®°å½å¼å¸¸ï¼æ¯å¦è®°å½å°æ¥å¿æä»¶ææ°æ®åºçï¼ |
| | | public static void catchException(String sender,Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | //å
许åå¨è¿ç¨åæ¡æ¶åéæ¶æ¯å®ç°Mysqlåè°æºå¶ |
| | | public static void SendMessage(String message){ |
| | | try{ |
| | | char c=message.charAt(0); |
| | | message=message.substring(1,message.length()); |
| | | //#代表ä¸ä¸ªåè½æ§è¡ @ä»
代表ä¸ä¸ªæ¶æ¯æé |
| | | if(c=='#'){ |
| | | String[] ss=message.split(",");//读åå½ä»¤åæ° |
| | | switch(ss[0]){ |
| | | //åæ°å为é¢åæçï¼è¯¥å½æ°å¨æ°MESæ¹æ¡ä¸åæ¶ï¼æè
éæ©æ§ä½¿ç¨ï¼æ¹ç¨æåæçï¼ |
| | | case "paiban": |
| | | int line=Integer.parseInt(ss[1]);//线å·åæ° |
| | | Manager.panban_mgr.Paiban(line); |
| | | return; |
| | | default: |
| | | System.out.println("æªç¥å½ä»¤æ¶æ¯ï¼"+message); |
| | | return; |
| | | } |
| | | } |
| | | else{ |
| | | System.out.println("msg:"+message); |
| | | } |
| | | } |
| | | catch(Exception e){ |
| | | catchException("manger.SendFlagMessage",e); |
| | | } |
| | | } |
| | | |
| | | public static void sendtoPLC(int deviceID, int Address, int count, String buffer, int offset) { |
| | | try { |
| | | System.out.println(buffer); |
| | | byte[] bb= HexUtil.stringToInt(buffer); |
| | | mmgr.innerGetItem(deviceID).serv.SendPLC(Address, count, bb, offset); |
| | | String ss=""; |
| | | for (int i = 0; i < bb.length; i++) { |
| | | ss+=ss+bb[i]+","; |
| | | } |
| | | System.out.println(ss); |
| | | }catch (Exception e) { |
| | | // TODO: handle exception |
| | | System.out.println(deviceID+"å·æºå¨æªè¿æ¥"); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void dayin(int leixing,String peifenhao){ |
| | | try { |
| | | Socket sk= new Socket("192.168.20.195",9100); |
| | | |
| | | try { |
| | | leixing=1; |
| | | String str1="^Kkuandao\n"+peifenhao+"\ngetElectric\n~p1\n"; |
| | | String str2="~S,BUFCLR\n"; |
| | | String str3="~S,PAUSE\n"; |
| | | |
| | | |
| | | BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(sk.getOutputStream())); |
| | | |
| | | if(leixing==1){ |
| | | bw.write(str1); |
| | | bw.newLine(); |
| | | bw.flush(); |
| | | }else{ |
| | | bw.write(str2); |
| | | bw.newLine(); |
| | | bw.flush(); |
| | | Thread.sleep(100); |
| | | bw.write(str3); |
| | | bw.newLine(); |
| | | bw.flush(); |
| | | Thread.sleep(3000); |
| | | bw.write(str2); |
| | | bw.newLine(); //ååæ¢è¡ |
| | | bw.flush(); //è¡¨ç¤ºå·æ°ï¼ä¹å°±æ¯ç«å³åç»å¯¹æ¹ |
| | | } |
| | | |
| | | sk.close(); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | System.out.println("å
¶ä»"); |
| | | } |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | System.out.println("é误"); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args){ |
| | | //Manager.appStart(new String[]{"jdbc:mysql://10.153.19.150/gmms?serverTimezone=GMT%2B8","root","beibo.123/" }); |
| | | while(true){ |
| | | try { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package builder; |
| | | import java.io.IOException; |
| | | import java.util.Properties; |
| | | |
| | | import ng.Algorithm.Layouts.*; |
| | | import ng.Algorithm.Layouts.AlgorithmDBInterface.ComputeResult; |
| | | import ng.db.NGFunction; |
| | | |
| | | public class PaibanManager { |
| | | |
| | | //æç软件å¯å¨çé¢å线é
ç½® |
| | | int[] lines=new int[]{1,2}; |
| | | |
| | | //ä¼åå¹¶è¿åç»æ |
| | | public ComputeResult Paiban(int line){ |
| | | return ng.Algorithm.Layouts.AlgorithmDBInterface.ComputeOnce(line); |
| | | } |
| | | |
| | | //åå§åæç管çå¨ |
| | | public void initPainbanManager(String url,String user,String password) throws IOException{ |
| | | Properties properties = NGFunction.getProperties(); |
| | | String s= url+"&user="+ |
| | | user+"&password="+ |
| | | password; |
| | | System.out.println("l:"+s); |
| | | ng.Algorithm.Layouts.AlgorithmDBInterface.initAlgorithm(s, lines); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package builder; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.InetSocketAddress; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | import com.sun.net.httpserver.*; |
| | | |
| | | public class ThreadHttpServer { |
| | | //å¯å¨ç«¯å£8080 |
| | | private static final int port=8880; |
| | | private static final String Httpcontext="/demo"; |
| | | private static final int nThreads=8; |
| | | public static void mains() { |
| | | HttpServer httpServer; |
| | | try { |
| | | httpServer=HttpServer.create(new InetSocketAddress(port),0); |
| | | httpServer.createContext(Httpcontext,new HttpHandlerDemo() ); |
| | | // è®¾ç½®å¹¶åæ° |
| | | ExecutorService executor=Executors.newFixedThreadPool(nThreads); |
| | | httpServer.setExecutor(executor); |
| | | httpServer.start(); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | driverClassName=com.mysql.cj.jdbc.Driver |
| | | url=jdbc:mysql://localhost:3306/gmms?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username=root |
| | | password=beibo.123/ |
| | | |
| | | #åå§åæ¶æ± ä¸å»ºç«çç©çè¿æ¥ä¸ªæ° |
| | | initialSize=10 |
| | | #æå¤§ç坿´»è·çè¿æ¥æ± æ°é |
| | | maxActive=20 |
| | | #è·åè¿æ¥æ¶æå¤§çå¾
æ¶é´ï¼å使¯«ç§ï¼è¶
è¿è¿æ¥å°±ä¼å¤±æ |
| | | maxWait=3000 |
| New file |
| | |
| | | package druidConnect; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSourceFactory; |
| | | |
| | | import javax.sql.DataSource; |
| | | import java.io.IOException; |
| | | import java.sql.Connection; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.sql.Statement; |
| | | import java.util.Properties; |
| | | |
| | | public class JDBCUtils{ |
| | | //1.å®ä¹æååé |
| | | private static DataSource dataSource; |
| | | |
| | | static { |
| | | |
| | | try { |
| | | //1.å è½½é
ç½®æä»¶ |
| | | Properties properties = new Properties(); |
| | | properties.load(JDBCUtils.class.getClassLoader().getResourceAsStream("druid.properties")); |
| | | //System.out.println(properties); |
| | | //2.è·åDataSource |
| | | dataSource = DruidDataSourceFactory.createDataSource(properties); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | /** |
| | | * è·åè¿æ¥ |
| | | */ |
| | | public static Connection getConnection() throws Exception { |
| | | return dataSource.getConnection(); |
| | | } |
| | | |
| | | /** |
| | | * éæ¾èµæº |
| | | */ |
| | | public static void close(Statement stmt, Connection conn){ |
| | | close(null, stmt, conn); |
| | | } |
| | | /** |
| | | * éæ¾èµæº |
| | | */ |
| | | public static void close(ResultSet rs, Statement stmt, Connection conn){ |
| | | if (rs != null){ |
| | | try { |
| | | rs.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (stmt != null){ |
| | | try { |
| | | stmt.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (conn != null){ |
| | | try { |
| | | conn.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åè¿æ¥æ± |
| | | */ |
| | | public static DataSource getDataSource(){ |
| | | return dataSource; |
| | | } |
| | | |
| | | public static void main(String[] args) throws SQLException { |
| | | //getDataSource(); |
| | | } |
| | | } |
| New file |
| | |
| | | package druidConnect; |
| | | |
| | | import java.sql.*; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedList; |
| | | |
| | | public class getMeterParatermeter { |
| | | public static void main(String[] args) throws Exception { |
| | | LinkedList<LinkedHashMap> a=getMeterParater(); |
| | | System.out.println(a); |
| | | } |
| | | public static LinkedList<LinkedHashMap> getMeterParater() throws Exception { |
| | | Connection con = druidConnect.JDBCUtils.getConnection(); |
| | | CallableStatement cs =con.prepareCall("call AXJ_a_meter_paramenter()"); |
| | | ResultSet rs = cs.executeQuery(); |
| | | ResultSetMetaData rsmd = rs.getMetaData(); |
| | | String[] arr; |
| | | LinkedList<LinkedHashMap> results = new LinkedList<LinkedHashMap>(); |
| | | |
| | | while(rs.next()){ |
| | | LinkedHashMap<String, String> result = new LinkedHashMap<String, String>(); |
| | | for(int i=0;i<rsmd.getColumnCount();i++){ |
| | | String val=rs.getString(i+1)!=null?String.valueOf(rs.getString(i+1)):""; |
| | | result.put(String.valueOf(rsmd.getColumnName(i+1)),val); |
| | | } |
| | | results.add(result); |
| | | } |
| | | druidConnect.JDBCUtils.close(cs, con); |
| | | return results; |
| | | } |
| | | public static void meterToMysql(String meterid,Double meter,String DLT645) throws Exception { |
| | | Connection con = druidConnect.JDBCUtils.getConnection(); |
| | | CallableStatement cs =con.prepareCall("call AXJ_a_addMeter(?,?,?)"); |
| | | cs.setString(1, meterid); |
| | | cs.setDouble(2, meter); |
| | | cs.setString(3, DLT645); |
| | | cs.executeQuery(); |
| | | druidConnect.JDBCUtils.close(cs, con); |
| | | } |
| | | |
| | | public static LinkedList<LinkedHashMap> getOrderOpt() throws Exception { |
| | | Connection con = druidConnect.JDBCUtils.getConnection(); |
| | | CallableStatement cs =con.prepareCall("call AXJ_a_get_orderRecipeOpt_select()"); |
| | | ResultSet rs = cs.executeQuery(); |
| | | ResultSetMetaData rsmd = rs.getMetaData(); |
| | | String[] arr; |
| | | LinkedList<LinkedHashMap> results = new LinkedList<LinkedHashMap>(); |
| | | |
| | | while(rs.next()){ |
| | | LinkedHashMap<String, String> result = new LinkedHashMap<String, String>(); |
| | | for(int i=0;i<rsmd.getColumnCount();i++){ |
| | | String val=rs.getString(i+1)!=null?String.valueOf(rs.getString(i+1)):""; |
| | | result.put(String.valueOf(rsmd.getColumnName(i+1)),val); |
| | | } |
| | | results.add(result); |
| | | } |
| | | druidConnect.JDBCUtils.close(cs, con); |
| | | return results; |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.sql.*; |
| | | import java.util.*; |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import ng.Algorithm.Layouts.Heuristic.RowResult; |
| | | import ng.Algorithm.Layouts.LayoutAlgorithm.AlgorithmParams; |
| | | |
| | | public class AlgorithmDBInterface { |
| | | |
| | | private String connectionString; |
| | | private int workId; |
| | | public AlgorithmDBInterface(String connectionString,int WorkId){ |
| | | this.connectionString=connectionString; |
| | | this.workId=WorkId; |
| | | param_sql=String.format("SELECT `width`,`length`,`xinterval`,`yinterval` from gmms_furnace where id=%d", WorkId); |
| | | this.peice_sql=String.format("select id,processcard,position,front,width,height,glass_idx,thickness,color,layout_mode,w,h from tempere_task_glass where work_id=%d", WorkId); |
| | | } |
| | | |
| | | private String param_sql; |
| | | private String peice_sql; |
| | | |
| | | public int Line; |
| | | |
| | | public boolean canr=true; |
| | | |
| | | |
| | | private AlgorithmParams getParam(Connection con) throws SQLException{ |
| | | Statement sm= con.createStatement(); |
| | | ResultSet rs= sm.executeQuery(param_sql); |
| | | rs.next(); |
| | | AlgorithmParams p=new AlgorithmParams(); |
| | | p.width=rs.getInt(1); |
| | | p.length=rs.getInt(2); |
| | | p.h_interval=rs.getInt(3); |
| | | p.v_interval=rs.getInt(4); |
| | | p.method="Heuristic"; |
| | | rs.close(); |
| | | sm.close(); |
| | | return p; |
| | | } |
| | | |
| | | class Info { |
| | | public long id; |
| | | public int thicknss; |
| | | public String color; |
| | | public int width; |
| | | public int height; |
| | | public Piece.LayoutMode layout_mode; |
| | | public int FrameNumber; |
| | | public boolean IsFront; |
| | | public int GlassIndex; |
| | | public String Processcard; |
| | | public int GlassNumber; |
| | | public double w,h; |
| | | @Override |
| | | public String toString(){ |
| | | return String.format("%d.%d[%d]",FrameNumber,GlassNumber,id); |
| | | } |
| | | |
| | | } |
| | | |
| | | compare piececompare=new compare(); |
| | | |
| | | |
| | | class compare implements java.util.Comparator<Piece>{ |
| | | |
| | | @Override |
| | | public int compare(Piece arg0, Piece arg1) { |
| | | // TODO Auto-generated method stub |
| | | Info info1=(Info)arg0.Source; |
| | | Info info2=(Info)arg1.Source; |
| | | int a1=info1.IsFront?0:1; |
| | | int a2=info2.IsFront?0:1; |
| | | if(a1>a2) |
| | | return -1; |
| | | if(a1<a2) |
| | | return 1; |
| | | if(info1.GlassIndex<info2.GlassIndex) |
| | | return 1; |
| | | if(info1.GlassIndex>info2.GlassIndex) |
| | | return -1; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | private Info[] toInfo(ResultSet set,boolean canRotate) throws SQLException{ |
| | | List<Info> list=new ArrayList<Info>(); |
| | | while(set.next()){ |
| | | Info info=new Info(); |
| | | info.id=set.getLong("id"); |
| | | info.thicknss= (int)set.getDouble("thickness"); |
| | | info.color=set.getString("color"); |
| | | info.width=(int)set.getDouble("width"); |
| | | info.height=(int)set.getDouble("height"); |
| | | info.Processcard=set.getString("processcard"); |
| | | double w=set.getDouble("w"); |
| | | double h=set.getDouble("h"); |
| | | info.w=w; |
| | | info.h=h; |
| | | if(canRotate==true){ |
| | | info.layout_mode=Piece.LayoutMode.Both; |
| | | } |
| | | else{ |
| | | info.layout_mode=w<h?Piece.LayoutMode.Zhong:Piece.LayoutMode.Heng; |
| | | } |
| | | |
| | | /* |
| | | int mode=set.getInt("layout_mode"); |
| | | switch(mode){ |
| | | case 1: |
| | | info.layout_mode= Piece.LayoutMode.Zhong; |
| | | break; |
| | | case 2: |
| | | info.layout_mode=Piece.LayoutMode.Heng; |
| | | break; |
| | | default: |
| | | info.layout_mode=Piece.LayoutMode.Both; |
| | | break; |
| | | } |
| | | */ |
| | | info.FrameNumber=set.getInt("position"); |
| | | info.IsFront=set.getInt("front")==1; |
| | | info.GlassIndex=set.getInt("glass_idx"); |
| | | list.add(info); |
| | | ; } |
| | | Info[] ret=new Info[list.size()]; |
| | | return list.toArray(ret); |
| | | } |
| | | |
| | | |
| | | |
| | | private List<Piece>[] getPiece(Connection con,boolean canRotate) throws SQLException{ |
| | | Statement sm= con.createStatement(); |
| | | ResultSet rs= sm.executeQuery(this.peice_sql); |
| | | ArrayList<ArrayList<Piece>> pss=new ArrayList<ArrayList<Piece>>(); |
| | | Info[] infos=toInfo(rs,canRotate); |
| | | if(infos==null) |
| | | return null; |
| | | if(infos.length==0) |
| | | return null; |
| | | rs.close(); |
| | | sm.close(); |
| | | for(int i=0;i<infos.length;i++){ |
| | | Info cur=infos[i]; |
| | | Piece p=new Piece(); |
| | | p.width=cur.width; |
| | | p.height=cur.height; |
| | | p.Mode=cur.layout_mode; |
| | | p.Source=cur; |
| | | p.w=cur.w; |
| | | p.h=cur.h; |
| | | boolean ok=false; |
| | | for(int j=0;j<pss.size();j++){ |
| | | Piece pp=pss.get(j).get(0); |
| | | Info info=(Info)pp.Source; |
| | | if(info.FrameNumber==cur.FrameNumber){ |
| | | pss.get(j).add(p); |
| | | ok=true; |
| | | break; |
| | | } |
| | | } |
| | | if(ok==false){ |
| | | ArrayList<Piece> pl=new ArrayList<Piece>(); |
| | | pl.add(p); |
| | | pss.add(pl); |
| | | } |
| | | } |
| | | for(int i=0;i<pss.size();i++){ |
| | | pss.get(i).sort(this.piececompare); |
| | | List<Piece> list=pss.get(i); |
| | | for(int j=0;j<list.size();j++){ |
| | | Info info= (Info)list.get(j).Source; |
| | | info.GlassNumber=j+1; |
| | | } |
| | | } |
| | | List<Piece> p=new ArrayList<Piece>(); |
| | | List<Piece>[] ret=(List<Piece>[])Array.newInstance(p.getClass(), pss.size()); |
| | | for(int i=0;i<ret.length;i++){ |
| | | ret[i]=pss.get(i); |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private void saveLayout(Connection con,LayoutResult result,AlgorithmParams param) throws SQLException { |
| | | int step=0; |
| | | try { |
| | | con.setAutoCommit(false); |
| | | int number=result.Number; |
| | | step=1; |
| | | CallableStatement call= con.prepareCall("{call insert_tempere_layout(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); |
| | | boolean ok=true; |
| | | for(int i=0;i<result.layout.length;i++){ |
| | | Rect r=result.layout[i]; |
| | | Info info=(Info)r.getSource().Source; |
| | | int move=0; |
| | | int pendulum=1; |
| | | if(i==result.layout.length-1){ |
| | | pendulum=3; |
| | | } |
| | | else{ |
| | | if(result.layout[i].Row!=result.layout[i+1].Row) |
| | | pendulum=2; |
| | | } |
| | | |
| | | |
| | | if(pendulum!=1){ |
| | | move=param.width-result.layout[i].x; |
| | | } |
| | | else{ |
| | | move=result.layout[i+1].x-result.layout[i].x; |
| | | } |
| | | |
| | | call.setInt(1,this.workId); |
| | | call.setInt(2,number); |
| | | call.setDouble(3,result.rate); |
| | | call.setInt(4,i+1); |
| | | call.setInt(5,r.x); |
| | | call.setInt(6,r.y); |
| | | if(r.getLength()==r.getWidth()){ |
| | | call.setInt(7,0); |
| | | }else{ |
| | | call.setInt(7,r.isHeng?0:1); |
| | | } |
| | | |
| | | call.setInt(8, pendulum); |
| | | call.setInt(9,move); |
| | | call.setInt(10, r.Row); |
| | | call.setInt(11,r.Col); |
| | | call.setLong(12,info.id); |
| | | call.setString(13, null); |
| | | call.registerOutParameter(14,java.sql.Types.INTEGER); |
| | | call.execute(); |
| | | if(call.getInt(14)!=1){ |
| | | ok=false; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | if(ok){ |
| | | con.commit(); |
| | | } |
| | | else{ |
| | | con.rollback(); |
| | | } |
| | | con.close(); |
| | | |
| | | } catch (SQLException e) { |
| | | if(step>=1) |
| | | con.rollback(); |
| | | con.close(); |
| | | |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public LayoutResult lastResult; |
| | | |
| | | public class ComputeResult{ |
| | | public Exception Error; |
| | | public boolean Success; |
| | | public int Number; |
| | | public boolean isNothing; |
| | | public LayoutResult Result; |
| | | public String toJson(){ |
| | | |
| | | try{ |
| | | JSONArray arr=new JSONArray(); |
| | | for(int i=0;i<Result.layout.length;i++){ |
| | | Rect r=Result.layout[i]; |
| | | JSONObject obj=new JSONObject(); |
| | | obj.put("x",r.x); |
| | | obj.put("y",r.y); |
| | | obj.put("w",r.getXSize()); |
| | | obj.put("h",r.getYSize()); |
| | | obj.put("size",""+r.getSource().w+"*"+r.getSource().h); |
| | | int k=0; |
| | | if(r.canHeng()){ |
| | | k=2; |
| | | } |
| | | if(r.canZhong()){ |
| | | k+=1; |
| | | } |
| | | obj.put("mode",k); |
| | | arr.put(obj); |
| | | } |
| | | return arr.toString(); |
| | | } |
| | | catch(Exception e){ |
| | | return "{}"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | int getNextLayoutNumber(Connection con) throws SQLException{ |
| | | CallableStatement sm= con.prepareCall("{call get_next_tempere_number(?,?)}"); |
| | | sm.setInt(1,this.workId); |
| | | sm.registerOutParameter(2,java.sql.Types.INTEGER); |
| | | |
| | | int ret=0; |
| | | sm.execute(); |
| | | ret=sm.getInt(2); |
| | | sm.close(); |
| | | return ret; |
| | | } |
| | | |
| | | |
| | | public ComputeResult ComputeOnce(boolean canRotate){ |
| | | Connection con=null; |
| | | lastResult=null; |
| | | try { |
| | | con = java.sql.DriverManager.getConnection(this.connectionString); |
| | | AlgorithmParams param=getParam(con); |
| | | List<Piece>[] ps=getPiece(con,canRotate); |
| | | if(ps==null){ |
| | | ComputeResult ret= new ComputeResult(); |
| | | ret.Success=false; |
| | | ret.Number=0; |
| | | ret.Error=null; |
| | | ret.isNothing=true; |
| | | con.close(); |
| | | return ret; |
| | | } |
| | | LayoutResult result= LayoutAlgorithm.Compute(param,ps); |
| | | int number= getNextLayoutNumber(con); |
| | | result.WorkId=this.workId; |
| | | result.Number=number; |
| | | if(result!=null){ |
| | | this.saveLayout(con, result,param); |
| | | this.lastResult=result; |
| | | ComputeResult ret= new ComputeResult(); |
| | | ret.Success=true; |
| | | ret.Number=number; |
| | | ret.Error=null; |
| | | ret.isNothing=false; |
| | | ret.Result=result; |
| | | return ret; |
| | | } |
| | | ComputeResult ret1= new ComputeResult(); |
| | | ret1.Success=false; |
| | | ret1.Number=0; |
| | | ret1.Error=null; |
| | | ret1.isNothing=true; |
| | | con.close(); |
| | | return ret1; |
| | | |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | ComputeResult ret= new ComputeResult(); |
| | | ret.Success=false; |
| | | ret.Number=0; |
| | | ret.Error=e; |
| | | ret.isNothing=false; |
| | | return ret; |
| | | } |
| | | finally{ |
| | | try { |
| | | con.close(); |
| | | } catch (SQLException e1) { |
| | | // TODO Auto-generated catch block |
| | | e1.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | private static AlgorithmDBInterface[] als; |
| | | public static void initAlgorithm(String connectionString,int[] lines){ |
| | | als=new AlgorithmDBInterface[lines.length]; |
| | | for(int i=0;i<lines.length;i++){ |
| | | als[i]=new AlgorithmDBInterface(connectionString,lines[i]); |
| | | als[i].Line=lines[i]; |
| | | } |
| | | } |
| | | |
| | | public static int getCanRotate(int line){ |
| | | for(int i=0;i<als.length;i++){ |
| | | if(als[i].Line==line) |
| | | return als[i].canr?1:0; |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | public static boolean setCanRotate(int line,boolean rotate){ |
| | | for(int i=0;i<als.length;i++){ |
| | | if(als[i].Line==line){ |
| | | als[i].canr=rotate; |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | public static ComputeResult ComputeOnce(int line){ |
| | | |
| | | for(int i=0;i<als.length;i++){ |
| | | if(als[i].Line==line) |
| | | return als[i].ComputeOnce(als[i].canr); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import ng.Algorithm.Layouts.LayoutAlgorithm.AlgorithmParams; |
| | | |
| | | public class Heuristic { |
| | | |
| | | public static class HeuristicParam{ |
| | | public double RowWidthThreshold; //è¡å®½åº¦å¯æ¥åéå¼ |
| | | public double RowLayoutThreshold; //è¡è£
è½½å¯çéå¼ |
| | | public double LayoutLengthThreshold; //æ´ä½è£
å¨é¿åº¦éå¼ |
| | | public double LayoutRateThreshold; //颿¿è£
è½½çéå¼ |
| | | } |
| | | |
| | | |
| | | class Row{ |
| | | int rowIndex; |
| | | List<RowResult> results=new ArrayList<RowResult>(); |
| | | RowResult root; |
| | | RowResult best1; |
| | | //éå½æç´¢ç»æ |
| | | private void seek(RowResult result,RectDataContext dc){ |
| | | int[] anchor=dc.getAnchor(); |
| | | boolean ok=false; |
| | | for(int i=0;i<dc.groups.length;i++){ |
| | | RectGroup g=dc.groups[i]; |
| | | RectEx rect=g.getCurrent(); |
| | | if(rect==null) |
| | | continue; |
| | | boolean a1=result.canPush(rect,false); |
| | | boolean a2=result.canPush(rect,true); |
| | | if(a1==false && a2==false){ |
| | | continue; |
| | | } |
| | | if(a1==true){ |
| | | RowResult r=result.Clone(); |
| | | r.Push(rect,false); |
| | | g.next(); |
| | | seek(r,dc); |
| | | dc.SetAnchor(anchor); |
| | | ok=true; |
| | | } |
| | | if(a2==true){ |
| | | RowResult r=result.Clone(); |
| | | r.Push(rect,true); |
| | | g.next(); |
| | | seek(r,dc); |
| | | dc.SetAnchor(anchor); |
| | | ok=true; |
| | | } |
| | | |
| | | } |
| | | if(ok==false){ |
| | | result.compute(); |
| | | results.add(result); |
| | | result.anchor=anchor; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | void tryAddRow(List<Row> rrs,Row row){ |
| | | int count=2; |
| | | if(rrs.size()==0){ |
| | | rrs.add(row); |
| | | return; |
| | | } |
| | | for(int i=0;i<rrs.size();i++){ |
| | | Row r=rrs.get(i); |
| | | if(r.best1.result_layoutrate<row.best1.result_layoutrate){ |
| | | rrs.add(i,row); |
| | | break; |
| | | } |
| | | } |
| | | while(rrs.size()>=count){ |
| | | rrs.remove(rrs.size()-1); |
| | | } |
| | | } |
| | | |
| | | public void Compute(RectDataContext dc,AlgorithmParams param,RowResult result,List<RowResult> resultList){ |
| | | if(result.nextRows.size()!=0) |
| | | return; |
| | | int rlen=result.getRemainLength(param.length,param.v_interval); |
| | | dc.SetAnchor(result.anchor); |
| | | List<Row> rrs=new ArrayList<Row>(); |
| | | for(int i=0;i<dc.groups.length;i++){ |
| | | RectGroup g=dc.groups[i]; |
| | | RectEx rect=g.getCurrent(); |
| | | if(rect==null){ |
| | | continue; |
| | | } |
| | | |
| | | |
| | | boolean b1=rect.getLength()<=rlen && rect.getWidth()<=param.width && rect.canZhong(); |
| | | boolean b2=rect.getLength()<=param.width && rect.getWidth()<=rlen && rect.canHeng(); |
| | | if(b1){ |
| | | g.next(); |
| | | Row row=new Row(dc,rect,false,param,result); |
| | | if(row.best1!=null){ |
| | | this.tryAddRow(rrs, row); |
| | | } |
| | | dc.SetAnchor(result.anchor); |
| | | } |
| | | |
| | | if(b2){ |
| | | g.next(); |
| | | Row row=new Row(dc,rect,true,param,result); |
| | | if(row.best1!=null){ |
| | | this.tryAddRow(rrs, row); |
| | | } |
| | | dc.SetAnchor(result.anchor); |
| | | } |
| | | } |
| | | if(rrs.size()>0){ |
| | | result.nextRows.addAll(rrs); |
| | | for(int i=0;i<result.nextRows.size();i++){ |
| | | Row row=result.nextRows.get(i); |
| | | row.Compute(dc, param,row.best1,resultList); |
| | | } |
| | | } |
| | | else{ |
| | | resultList.add(result); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public Row(RectDataContext dc,RectEx first,boolean isheng,AlgorithmParams param,RowResult parent){ |
| | | root=new RowResult(first,isheng,param,parent); |
| | | this.results.clear(); |
| | | seek(root.Clone(),dc); |
| | | for(int i=0;i<results.size();i++){ |
| | | results.get(i).compute(); |
| | | } |
| | | if(results.size()>0){ |
| | | results.sort(root); |
| | | this.best1=results.get(0); |
| | | } |
| | | } |
| | | } |
| | | |
| | | class RowResult implements java.util.Comparator<RowResult>{ |
| | | private RowResult parent; |
| | | private List<Row> nextRows=new ArrayList<Row>(); |
| | | private int[] anchor; |
| | | private List<RectEx> rects=new ArrayList<RectEx>(); |
| | | private int length; |
| | | private int remainwidth; |
| | | private int width; |
| | | private int interval; |
| | | private int ystart; |
| | | private int yend; |
| | | |
| | | |
| | | int rowIndex; |
| | | |
| | | public double LayoutRate; |
| | | public double ComputeLayoutRectArea(){ |
| | | double a=0; |
| | | RowResult r=this; |
| | | while(r!=null){ |
| | | for(int i=0;i<r.rects.size();i++){ |
| | | a+=r.rects.get(i).getArea(); |
| | | } |
| | | r=r.parent; |
| | | } |
| | | return a; |
| | | } |
| | | |
| | | |
| | | |
| | | public void adjust(){ |
| | | int c=this.rects.size(); |
| | | int size=0; |
| | | for(int i=0;i<c;i++){ |
| | | size+= this.rects.get(i).getXSize(); |
| | | } |
| | | if(c>1){ |
| | | int iv=(this.width-size)/(c-1); |
| | | for(int i=1;i<c;i++){ |
| | | Rect r2=this.rects.get(i); |
| | | Rect r1=this.rects.get(i-1); |
| | | r2.x=r1.x+r1.getXSize()+iv; |
| | | } |
| | | } |
| | | else{ |
| | | Rect r1=this.rects.get(0); |
| | | r1.x=(this.width-r1.getXSize())/2; |
| | | } |
| | | } |
| | | |
| | | |
| | | public RowResult Clone(){ |
| | | RowResult r=new RowResult(); |
| | | r.width=this.width; |
| | | r.parent=parent; |
| | | r.anchor=this.anchor; |
| | | for(int i=0;i<rects.size();i++){ |
| | | r.rects.add(rects.get(i).Clone()); |
| | | } |
| | | r.length=length; |
| | | r.remainwidth=this.remainwidth; |
| | | r.interval=this.interval; |
| | | r.ystart=this.ystart; |
| | | r.yend=this.yend; |
| | | r.rowIndex=this.rowIndex; |
| | | |
| | | return r; |
| | | } |
| | | |
| | | |
| | | public double result_layoutrate; |
| | | public RowResult(RectEx _first,boolean isheng,AlgorithmParams param,RowResult parent){ |
| | | this.parent=parent; |
| | | RectEx first=_first.Clone(); |
| | | first.isHeng=isheng; |
| | | if(this.parent==null){ |
| | | this.rowIndex=1; |
| | | this.ystart=0; |
| | | |
| | | this.yend=first.getYSize(); |
| | | } |
| | | else{ |
| | | this.ystart=this.parent.yend+param.v_interval; |
| | | this.yend=this.ystart+first.getYSize(); |
| | | this.rowIndex=this.parent.rowIndex+1; |
| | | } |
| | | rects.add(first); |
| | | this.length=first.getYSize(); |
| | | this.width=param.width; |
| | | this.interval=param.h_interval; |
| | | this.remainwidth=this.width-interval-first.getXSize(); |
| | | this.yend=this.ystart+first.getYSize(); |
| | | first.x=0; |
| | | first.y=this.ystart; |
| | | first.Row=this.rowIndex; |
| | | first.Col=1; |
| | | } |
| | | |
| | | |
| | | private RowResult(){ |
| | | |
| | | } |
| | | |
| | | |
| | | public void compute(){ |
| | | double a=(this.width+interval)*this.length; |
| | | double b=0; |
| | | for(int i=0;i<this.rects.size();i++){ |
| | | RectEx r=this.rects.get(i); |
| | | b+=(r.getXSize()+interval)*r.getYSize(); |
| | | } |
| | | this.result_layoutrate=b/a; |
| | | } |
| | | |
| | | //è®¡ç®æçå©ä½é¿åº¦ |
| | | public int getRemainLength(int maxlength,int yinterval){ |
| | | int len=0; |
| | | RowResult r=this; |
| | | while(r!=null){ |
| | | len+=r.length+yinterval; |
| | | r=r.parent; |
| | | } |
| | | if(len==0) |
| | | len=maxlength; |
| | | else |
| | | len=maxlength-len; |
| | | return len; |
| | | } |
| | | |
| | | |
| | | public boolean canPush(RectEx r,boolean heng){ |
| | | if((heng && r.canHeng()==false) && (heng==false && r.canZhong()==false)){ |
| | | return false; |
| | | } |
| | | r.isHeng=heng; |
| | | if(r.getXSize()>this.remainwidth){ |
| | | return false; |
| | | } |
| | | if(r.getYSize()>this.length) |
| | | return false; |
| | | return true; |
| | | } |
| | | |
| | | |
| | | public void Push(RectEx r,boolean heng){ |
| | | r=r.Clone(); |
| | | r.isHeng=heng; |
| | | |
| | | this.remainwidth-=r.getXSize()+interval; |
| | | Rect last=this.rects.get(this.rects.size()-1); |
| | | r.x=last.x+last.getXSize()+interval; |
| | | int k=this.ystart+r.getYSize(); |
| | | if(k>this.yend) |
| | | this.yend=k; |
| | | r.y=this.ystart; |
| | | r.Row=this.rowIndex; |
| | | |
| | | this.rects.add(r); |
| | | r.Col=this.rects.size(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int compare(RowResult o1, RowResult o2) { |
| | | // TODO Auto-generated method stub |
| | | if(o1.result_layoutrate<o2.result_layoutrate) |
| | | return 1; |
| | | if(o1.result_layoutrate>o2.result_layoutrate) |
| | | return -1; |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | class RectEx extends Rect{ |
| | | public int groupNumber; |
| | | public int pieceIndex; |
| | | public RectEx(Piece source) { |
| | | super(source); |
| | | // TODO Auto-generated constructor stub |
| | | } |
| | | |
| | | public RectEx Clone(){ |
| | | RectEx r=new RectEx(this.getSource()); |
| | | this.CopyTo(r); |
| | | r.groupNumber=this.groupNumber; |
| | | r.pieceIndex=this.pieceIndex; |
| | | return r; |
| | | } |
| | | |
| | | } |
| | | |
| | | class RectDataContext{ |
| | | public RectGroup[] groups; |
| | | public int[] getAnchor(){ |
| | | int[] r=new int[groups.length]; |
| | | for(int i=0;i<r.length;i++){ |
| | | r[i]=groups[i].index; |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | public void SetAnchor(int[] Anchor){ |
| | | for(int i=0;i<groups.length;i++){ |
| | | groups[i].index=Anchor[i]; |
| | | } |
| | | } |
| | | |
| | | public void Reset(){ |
| | | for(int i=0;i<groups.length;i++){ |
| | | groups[i].Reset(); |
| | | } |
| | | } |
| | | |
| | | public RectDataContext(List<Piece>[] rects){ |
| | | groups=new RectGroup[rects.length]; |
| | | for(int i=0;i<groups.length;i++){ |
| | | RectGroup rg=new RectGroup(); |
| | | rg.index=0; |
| | | for(int j=0;j<rects[i].size();j++){ |
| | | Piece r=rects[i].get(j); |
| | | RectEx rr=new RectEx(r); |
| | | rr.groupNumber=i+1; |
| | | rr.pieceIndex=j; |
| | | rg.rects.add(rr); |
| | | } |
| | | groups[i]=rg; |
| | | } |
| | | } |
| | | } |
| | | |
| | | class RectGroup{ |
| | | private List<RectEx> rects=new ArrayList<RectEx>(); |
| | | private int index; |
| | | |
| | | public RectEx getCurrent(){ |
| | | if(index<rects.size()) |
| | | return rects.get(index); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | public int getCount(){ |
| | | return rects.size()-index; |
| | | } |
| | | |
| | | public void next(){ |
| | | if(index<rects.size()) |
| | | index++; |
| | | } |
| | | |
| | | public void Reset(){ |
| | | index=0; |
| | | } |
| | | } |
| | | |
| | | AlgorithmParams param; |
| | | HeuristicParam hparam; |
| | | RectDataContext dc; |
| | | List<RowResult> results=new ArrayList<RowResult>(); |
| | | |
| | | //éæ°åå§å |
| | | public void SetParam(AlgorithmParams param){ |
| | | this.param=param; |
| | | this.hparam=(HeuristicParam)param.methodParam; |
| | | } |
| | | |
| | | |
| | | public LayoutResult compute(List<Piece>[] rects){ |
| | | this.dc=new RectDataContext(rects); |
| | | results.clear(); |
| | | List<Row> rows=new ArrayList<Row>(); |
| | | for(int i=0;i<this.dc.groups.length;i++){ |
| | | RectGroup g=dc.groups[i]; |
| | | RectEx rect=g.getCurrent(); |
| | | if(rect==null) |
| | | continue; |
| | | boolean b1=rect.getLength()<=param.length && rect.getWidth()<=param.width && rect.canZhong(); |
| | | boolean b2=rect.getLength()<=param.width && rect.getWidth()<=param.length && rect.canHeng(); |
| | | |
| | | if(b1){ |
| | | g.next(); |
| | | Row row=new Row(dc, rect,false, param, null); |
| | | rows.add(row); |
| | | dc.Reset(); |
| | | } |
| | | if(b2){ |
| | | g.next(); |
| | | Row row=new Row(dc, rect,true, param, null); |
| | | rows.add(row); |
| | | dc.Reset(); |
| | | } |
| | | } |
| | | for(int i=0;i<rows.size();i++){ |
| | | Row row=rows.get(i); |
| | | row.Compute(dc, param,row.best1,results); |
| | | |
| | | } |
| | | RowResult best=null; |
| | | double k=param.width*param.length; |
| | | for(int i=0;i<results.size();i++){ |
| | | RowResult r=results.get(i); |
| | | double area= r.ComputeLayoutRectArea(); |
| | | r.LayoutRate=area/k; |
| | | if(best==null) |
| | | best=r; |
| | | else |
| | | { |
| | | if(best.LayoutRate<r.LayoutRate){ |
| | | best=r; |
| | | } |
| | | } |
| | | } |
| | | LayoutResult ret= this.getLayoutResult(best); |
| | | return ret; |
| | | } |
| | | |
| | | |
| | | void adjust(RowResult result){ |
| | | RowResult r=result; |
| | | while(r!=null){ |
| | | r.adjust(); |
| | | r=r.parent; |
| | | } |
| | | } |
| | | |
| | | LayoutResult getLayoutResult(RowResult oneResult){ |
| | | List<Integer> ids=new ArrayList<Integer>(); |
| | | List<RectEx> rects=new ArrayList<RectEx>(); |
| | | RowResult r=oneResult; |
| | | while(r!=null){ |
| | | for(int i=r.rects.size()-1;i>=0;i--){ |
| | | RectEx re=r.rects.get(i); |
| | | ids.add(0,re.groupNumber*2+(re.isHeng?1:0)); |
| | | rects.add(0,re); |
| | | } |
| | | r=r.parent; |
| | | } |
| | | dc.Reset(); |
| | | boolean bug=false; |
| | | for(int i=0;i<ids.size();i++){ |
| | | int a=ids.get(i); |
| | | int idx=a/2-1; |
| | | boolean ish=(idx%2)==1; |
| | | RectEx rr= dc.groups[idx].getCurrent().Clone(); |
| | | dc.groups[idx].next(); |
| | | rr.isHeng=ish; |
| | | if(rr.getSource()!=rects.get(i).getSource()){ |
| | | //该æ¡ä»¶ ä¸å¯è½ ç®æ³æ bug; |
| | | bug=true; |
| | | } |
| | | } |
| | | if(bug==true){ |
| | | System.out.println("bug"); |
| | | return null; |
| | | } |
| | | this.adjust(oneResult); |
| | | LayoutResult result=new LayoutResult(); |
| | | result.layout=new Rect[rects.size()]; |
| | | rects.toArray(result.layout); |
| | | result.rate=oneResult.LayoutRate; |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | import java.sql.Connection; |
| | | import java.util.*; |
| | | public class LayoutAlgorithm { |
| | | public static class AlgorithmParams{ |
| | | public int width; |
| | | public int length; |
| | | public int h_interval; |
| | | public int v_interval; |
| | | public String method; //使ç¨çç®æ³å |
| | | public Object methodParam; //ç®æ³éè¦çåæ°å¯¹è±¡ |
| | | |
| | | public void Fill(AlgorithmParams data){ |
| | | this.width=data.width; |
| | | this.length=data.length; |
| | | this.h_interval=data.h_interval; |
| | | this.v_interval=data.v_interval; |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static LayoutResult Compute(AlgorithmParams param,List<Piece>[] allglass){ |
| | | if(param.method=="Heuristic"){ |
| | | Heuristic heuristic=new Heuristic(); |
| | | heuristic.SetParam(param); |
| | | return heuristic.compute(allglass); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | |
| | | import java.util.*; |
| | | public class LayoutResult { |
| | | public Rect[] layout; |
| | | public double rate; |
| | | public int Number; |
| | | public int WorkId; |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | |
| | | public class Piece { |
| | | public int width; |
| | | public int height; |
| | | public double w; |
| | | public double h; |
| | | public Object Source; |
| | | public LayoutMode Mode; |
| | | public enum LayoutMode{ |
| | | Heng, |
| | | Zhong, |
| | | Both |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.Algorithm.Layouts; |
| | | |
| | | public class Rect { |
| | | private Piece source; |
| | | private int width; |
| | | private int length; |
| | | private double area; |
| | | public int x,y; |
| | | public int Row,Col; |
| | | public boolean isHeng=false; |
| | | private Piece.LayoutMode mode; |
| | | private Rect(){ |
| | | |
| | | } |
| | | |
| | | public boolean canHeng(){ |
| | | return mode==Piece.LayoutMode.Both || mode== Piece.LayoutMode.Heng; |
| | | } |
| | | |
| | | |
| | | public boolean canZhong(){ |
| | | return mode==Piece.LayoutMode.Both || mode== Piece.LayoutMode.Zhong; |
| | | } |
| | | |
| | | |
| | | |
| | | public Rect(Piece source){ |
| | | this.width=source.width<=source.height?source.width:source.height; |
| | | this.length=source.width>=source.height?source.width:source.height; |
| | | this.area=this.width*this.length; |
| | | this.mode=source.Mode; |
| | | this.source=source; |
| | | |
| | | } |
| | | |
| | | |
| | | public int getWidth(){ |
| | | return this.width; |
| | | } |
| | | |
| | | public int getLength(){ |
| | | return this.length; |
| | | } |
| | | |
| | | |
| | | |
| | | public double getArea(){ |
| | | return this.area; |
| | | } |
| | | |
| | | |
| | | public int getXSize(){ |
| | | return isHeng?this.length:this.width; |
| | | } |
| | | |
| | | public int getYSize(){ |
| | | return isHeng?this.width:this.length; |
| | | } |
| | | |
| | | |
| | | public Piece getSource(){ |
| | | return source; |
| | | } |
| | | |
| | | protected void CopyTo(Rect r){ |
| | | r.source=this.source; |
| | | r.width=this.width; |
| | | r.length=this.length; |
| | | r.mode=this.mode; |
| | | r.isHeng=this.isHeng; |
| | | r.area=this.area; |
| | | r.Row=this.Row; |
| | | r.Col=this.Col; |
| | | r.x=this.x; |
| | | r.y=this.y; |
| | | } |
| | | |
| | | |
| | | public Rect CloneRect(){ |
| | | Rect r=new Rect(); |
| | | CopyTo(r); |
| | | return r; |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | import org.json.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.sql.CallableStatement; |
| | | import java.sql.Connection; |
| | | import java.sql.DriverManager; |
| | | import java.sql.ResultSet; |
| | | import java.sql.ResultSetMetaData; |
| | | import java.sql.SQLException; |
| | | import java.util.Properties; |
| | | |
| | | import org.json.*; |
| | | |
| | | |
| | | public class DBHelper{ |
| | | |
| | | private String sqlurl="jdbc:mysql://10.153.19.150/gmms"; |
| | | private String user="root"; |
| | | private String password="beibo.123/"; |
| | | static java.util.Hashtable<String, DBHelper> helper=new java.util.Hashtable<String, DBHelper>(); |
| | | |
| | | |
| | | public static DBSession createDBSession(String sqlurl,String user,String password,boolean manulcomit) throws SQLException{ |
| | | return DBSession.createSession(sqlurl, user, password,manulcomit); |
| | | } |
| | | |
| | | public class ProcResult{ |
| | | public int code; |
| | | public String Message; |
| | | public JSONArray Datas; |
| | | } |
| | | |
| | | public static DBSession createDBSession(String name,boolean manulcomit) throws Exception{ |
| | | if(helper.size()==0){ |
| | | InitHelper(); |
| | | } |
| | | DBHelper ret= helper.get(name); |
| | | if(ret!=null) |
| | | return ret.createSession(manulcomit); |
| | | throw new Exception("鿤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public int update(String sql,Object...params) throws SQLException{ |
| | | DBSession sn=null; |
| | | try{ |
| | | sn= createSession(false); |
| | | sn.createSql(sql); |
| | | return sn._update(params); |
| | | } |
| | | finally{ |
| | | sn.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | public JSONArray query(boolean asObject,String sql,Object...params) throws SQLException, JSONException{ |
| | | DBSession sn=null; |
| | | try{ |
| | | sn= createSession(false); |
| | | sn.createSql(sql); |
| | | return sn._query(params).resultToJson(asObject); |
| | | } |
| | | finally{ |
| | | sn.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static DBHelper getDBHelper(String name){ |
| | | return helper.get(name); |
| | | } |
| | | |
| | | |
| | | public static void addHelper(String name,String url,String user,String pass){ |
| | | |
| | | DBHelper help=new DBHelper(url,user,pass); |
| | | helper.put("mes",help); |
| | | } |
| | | |
| | | |
| | | |
| | | public static void InitHelper() throws Exception{ |
| | | |
| | | |
| | | Properties properties = NGFunction.getProperties(); |
| | | Class.forName(properties.getProperty("driver")); |
| | | String data= properties.getProperty("connection"); |
| | | if(data==null) |
| | | { |
| | | throw new Exception("æªéæç¢æ·éæ¤æ·éæ¤æ·"); |
| | | } |
| | | System.out.println(data); |
| | | String[] names=data.split(","); |
| | | for(int i=0;i<names.length;i++){ |
| | | DBHelper help=new DBHelper(properties.getProperty(names[i]+".url"), |
| | | properties.getProperty(names[i]+".user"), |
| | | properties.getProperty(names[i]+".password") |
| | | ); |
| | | helper.put(names[i],help); |
| | | System.out.println("create "+names[i]); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static void updateConnection(String name) throws Exception{ |
| | | Properties properties = NGFunction.getProperties(); |
| | | DBHelper ret= helper.get(name); |
| | | if(ret==null){ |
| | | throw new Exception("鿤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·"); |
| | | } |
| | | ret.sqlurl=properties.getProperty(name+".url"); |
| | | ret.user=properties.getProperty(name+".user"); |
| | | ret.password=properties.getProperty(name+".password"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public JSONArray query(String sql,Boolean RowAsObject,Object...params) throws SQLException, JSONException{ |
| | | DBSession sn=null; |
| | | try{ |
| | | sn=this.createSession(false); |
| | | sn.createSql(sql); |
| | | return sn.query(params).resultToJson(RowAsObject); |
| | | |
| | | } |
| | | finally{ |
| | | if(sn!=null) |
| | | sn.close(); |
| | | } |
| | | } |
| | | |
| | | public int update(String sql,Boolean RowAsObject,Object...params) throws SQLException{ |
| | | DBSession sn=null; |
| | | try{ |
| | | sn=this.createSession(false); |
| | | sn.createSql(sql); |
| | | return sn.update(params); |
| | | |
| | | |
| | | } |
| | | finally{ |
| | | if(sn!=null) |
| | | sn.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public void init(String sqlurl,String user,String password){ |
| | | this.sqlurl=sqlurl; |
| | | this.user=user; |
| | | this.password=password; |
| | | } |
| | | |
| | | |
| | | private static boolean odbc_regist=false; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //鿤æ·éæ¤æ·ä¸éæ¤æ·éæ¤æ·in鿤æ·éæ¤æ· 鿤æ·éæ¤æ·out鿤æ·éæ¤æ·éä¾¥åå¨éæ¤æ·éæï½æ·ä¸éæ¤æ·éè¡è®¹æ·éæ¤æ·int 1鿤æ·éæ¤æ·æé� ä¸éæ¤æ·éæ¤æ·String鿤æ·ä¸ºä¸éæ¤æ·éæªé©æ·éæ¤æ·éæ¤æ·éç»Ñæ·éç»ææ·éè½¿îæ·éç»æ
æ·éè¾î®æ·é� |
| | | public QueryResult SelectByProc(String name,String[] Params){ |
| | | Connection con=null; |
| | | try{ |
| | | int length=Params.length; |
| | | |
| | | String s=String.format("{call %s(",name); |
| | | for(int i=0;i<=length;i++){ |
| | | if(i==0) |
| | | s+="?"; |
| | | else |
| | | s+=",?"; |
| | | } |
| | | s+=")}"; |
| | | |
| | | con=DriverManager.getConnection(sqlurl,user,password); |
| | | CallableStatement c=con.prepareCall(s); |
| | | for(int i=0;i<length;i++){ |
| | | c.setString(i+1,Params[i]); |
| | | } |
| | | c.registerOutParameter(length+1, java.sql.Types.VARCHAR); |
| | | ResultSet result= c.executeQuery(); |
| | | String rest=c.getString(length+1); |
| | | QueryResult r=new QueryResult(con,c,result); |
| | | if(rest!=null){ |
| | | if(rest.equals("success")){ |
| | | return r; |
| | | } |
| | | } |
| | | r.Close(); |
| | | return null; |
| | | |
| | | } |
| | | catch(Exception e){ |
| | | e.printStackTrace(); |
| | | if(con!=null) |
| | | try { |
| | | con.close(); |
| | | } catch (SQLException e1) { |
| | | // TODO Auto-generated catch block |
| | | e1.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | //鿤æ·éæ¤æ·ä¸éæ¤æ·éæ¤æ·in鿤æ·éæ¤æ· ä¸éæ¤æ·out鿤æ·éæ¤æ·éä¾¥åå¨éæ¤æ·éæ¤æ· |
| | | public String InvokeSqlProc(String name,String[] Params){ |
| | | Connection con=null; |
| | | try{ |
| | | int length=Params.length; |
| | | |
| | | String s=String.format("{call %s(",name); |
| | | for(int i=0;i<=length;i++){ |
| | | if(i==0) |
| | | s+="?"; |
| | | else |
| | | s+=",?"; |
| | | } |
| | | s+=")}"; |
| | | |
| | | con=DriverManager.getConnection(sqlurl,user,password); |
| | | CallableStatement c=con.prepareCall(s); |
| | | for(int i=0;i<length;i++){ |
| | | c.setString(i+1,Params[i]); |
| | | } |
| | | c.registerOutParameter(length+1, java.sql.Types.VARCHAR); |
| | | c.execute(); |
| | | String message=c.getString(length+1); |
| | | c.close(); |
| | | con.close(); |
| | | return message; |
| | | } |
| | | catch(Exception e){ |
| | | e.printStackTrace(); |
| | | if(con!=null) |
| | | try { |
| | | con.close(); |
| | | } catch (SQLException e1) { |
| | | // TODO Auto-generated catch block |
| | | e1.printStackTrace(); |
| | | } |
| | | return "fail"; |
| | | } |
| | | } |
| | | |
| | | |
| | | //鿤æ·éæ¤æ·ä¸éæ¤æ·éæ¤æ·in鿤æ·éæ¤æ· ä¸éæ¤æ·out鿤æ·éæ¤æ·éä¾¥åå¨éæ¤æ·éæ¤æ· |
| | | public String InvokeSqlProc(String name,String param1,String param2){ |
| | | Connection con=null; |
| | | try{ |
| | | con=DriverManager.getConnection(sqlurl,user,password); |
| | | CallableStatement c=con.prepareCall(String.format("{call %s(?,?,?)}",name)); |
| | | c.setString(1,param1); |
| | | c.setString(2,param2); |
| | | |
| | | c.registerOutParameter(3, java.sql.Types.VARCHAR); |
| | | System.out.println("ok"); |
| | | c.execute(); |
| | | System.out.println("ok1"); |
| | | String message=c.getString(3); |
| | | c.close(); |
| | | con.close(); |
| | | return message; |
| | | } |
| | | catch(Exception e){ |
| | | e.printStackTrace(); |
| | | if(con!=null) |
| | | try { |
| | | con.close(); |
| | | } catch (SQLException e1) { |
| | | // TODO Auto-generated catch block |
| | | e1.printStackTrace(); |
| | | } |
| | | return "fail"; |
| | | } |
| | | |
| | | } |
| | | |
| | | //鿤æ·éæ¤æ·ä¸éæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ· |
| | | public Connection getConnection() throws SQLException{ |
| | | |
| | | return DriverManager.getConnection(sqlurl,user,password); |
| | | //return DriverManager.getConnection(sqlurl,user,password); |
| | | } |
| | | |
| | | |
| | | |
| | | //鿤æ·éæ¤æ·éæ·å¡æ·éæ¤æ·éæ¤æ·éæ¤æ·éæä¼æ·éæ¤æ·ä¾éæ¤æ·é轿î¦ç¤â¯elect 鿤æ·ééæ¤æ· |
| | | public String MakeSelectOptionBySql(String sql,String field){ |
| | | QueryResult query=null; |
| | | try{ |
| | | query=new QueryResult(sqlurl,user,password,sql); |
| | | ResultSet result=query.Result; |
| | | StringBuilder sb=new StringBuilder(); |
| | | while(result.next()){ |
| | | Object o=result.getObject(field); |
| | | if(o!=null) |
| | | sb.append(String.format("<option value=\"%s\">%s</option>\r\n",o.toString(),o.toString())); |
| | | } |
| | | query.Close(); |
| | | return sb.toString(); |
| | | } |
| | | catch(Exception e){ |
| | | if(query!=null) |
| | | query.Close(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | //é鿤æ·ä¸éæ¤æ·éæ¤æ·éæ¤æ·å鿤æ·éæ·ç¡·æ·éæ¤æ·é� |
| | | public QueryResult getQueryResult(String sql){ |
| | | QueryResult query=null; |
| | | try{ |
| | | query=new QueryResult(sqlurl,user,password,sql); |
| | | return query; |
| | | } |
| | | catch(Exception e){ |
| | | if(query!=null) |
| | | query.Close(); |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | //鿤æ·éæ¤æ·éæ·å¡æ·éæ¤æ·éæ¤æ·éæä¼æ·éè§ç¤îæ·è°éæ¤æ·tbody鿤æ·éæ¤æ·éæ¤æ·éæ·ï½æ·PKName鿤æ·éæ¤æ·éæ¤æ·éè¡æ®µï½æ·ShowField鿤æ·è¦éæ¤æ·ç¤ºéæ¤æ·éæ¤æ· 鿤æ·éæ¤æ·#鿤æ·å¤´éæ¤æ·éè¡å¤æ·éæ¤æ·ç´éæ¤æ·éæ¤æ·ä¸ºt鿤æ·éæ¤æ·éæ¤æ·éæ¤æ· |
| | | public String MakeHTMLTableRowsBySql(String sql,String PKName,String[] ShowField) throws SQLException{ |
| | | QueryResult query=null; |
| | | try{ |
| | | query=new QueryResult(sqlurl,user,password,sql); |
| | | ResultSet result=query.Result; |
| | | StringBuilder sb=new StringBuilder(); |
| | | int[] fieldIndex=new int[ShowField.length]; |
| | | for(int i=0;i<ShowField.length;i++){ |
| | | if(ShowField[i].charAt(0)=='#'){ |
| | | fieldIndex[i]=-100; |
| | | ShowField[i]=ShowField[i].substring(1); |
| | | } |
| | | else |
| | | fieldIndex[i]=result.findColumn(ShowField[i]); |
| | | } |
| | | //sb.append("<tbody>\r\n"); |
| | | while(result.next()){ |
| | | if(PKName!=null){ |
| | | sb.append(String.format("<tr data-id=\"%s\">\r\n",result.getObject(PKName).toString().trim())); |
| | | } |
| | | else |
| | | sb.append("<tr>\r\n"); |
| | | for(int i=0;i<fieldIndex.length;i++){ |
| | | sb.append("<td>"); |
| | | int idx=fieldIndex[i]; |
| | | if(idx==-100){ |
| | | sb.append(ShowField[i]); |
| | | } |
| | | else{ |
| | | |
| | | Object o=result.getObject(idx); |
| | | if(o!=null) |
| | | sb.append(o); |
| | | } |
| | | sb.append("</td>"); |
| | | } |
| | | sb.append("</tr>\r\n"); |
| | | } |
| | | //sb.append("</tbody>\r\n"); |
| | | query.Close(); |
| | | return sb.toString(); |
| | | } |
| | | catch(Exception e){ |
| | | if(query!=null) |
| | | query.Close(); |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public DBHelper(String sqlurl,String user,String password){ |
| | | this.sqlurl=sqlurl; |
| | | this.user=user; |
| | | this.password=password; |
| | | } |
| | | |
| | | //ä¸éæ¤æ·éæ´¥åç诧æ·è¯¢éæ¤æ·éæ¤æ·éæ¤æ·åªéæ¤æ·éæ¤æ·éæ¤æ·éæ¤æ·ä¸äºéæ¤æ·è¯¢éæ¤æ·æºéæ¤æ·éæ¤æ·éæ¤æ·closeç»ä¸éé
µæ¾ï½æ·éæ¤æ·éé
µæ¾ç¸æ·éæ¤æ· |
| | | public class QueryResult{ |
| | | private java.sql.Connection con; |
| | | private java.sql.Statement statement; |
| | | public java.sql.ResultSet Result; |
| | | |
| | | public QueryResult(String conString,String user,String password,String Sql) throws SQLException{ |
| | | this.con= java.sql.DriverManager.getConnection(conString,user,password); |
| | | this.statement=con.createStatement(); |
| | | this.Result=this.statement.executeQuery(Sql); |
| | | } |
| | | |
| | | |
| | | public QueryResult(Connection con,java.sql.Statement statement,ResultSet result){ |
| | | this.con=con; |
| | | this.statement=statement; |
| | | this.Result=result; |
| | | } |
| | | |
| | | |
| | | public void Close(){ |
| | | try{ |
| | | if(Result!=null){ |
| | | Result.close(); |
| | | Result=null; |
| | | } |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | try{ |
| | | if(statement!=null){ |
| | | statement.close(); |
| | | statement=null; |
| | | } |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | try{ |
| | | if(con!=null){ |
| | | con.close(); |
| | | con=null; |
| | | } |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | public DBSession createSession(boolean ManulCommit) throws SQLException{ |
| | | Connection con=this.getConnection(); |
| | | return new DBSession(con,ManulCommit); |
| | | } |
| | | |
| | | |
| | | public static org.json.JSONArray resultToJson(String[] fields,ResultSet result,boolean RowAsObject) throws SQLException, JSONException{ |
| | | JSONArray arr=new JSONArray(); |
| | | |
| | | String[] cols=fields; |
| | | |
| | | if(RowAsObject){ |
| | | while(result.next()){ |
| | | JSONObject obj=new JSONObject(); |
| | | for(int i=0;i<cols.length;i++){ |
| | | Object o=result.getObject(i+1); |
| | | if(o==null) |
| | | o=JSONObject.NULL; |
| | | obj.put(cols[i],o); |
| | | |
| | | } |
| | | arr.put(obj); |
| | | } |
| | | } |
| | | else{ |
| | | while(result.next()){ |
| | | JSONArray obj=new JSONArray(); |
| | | for(int i=0;i<cols.length;i++){ |
| | | Object o=result.getObject(i+1); |
| | | if(o==null) |
| | | o=JSONObject.NULL; |
| | | obj.put(o); |
| | | } |
| | | arr.put(obj); |
| | | } |
| | | } |
| | | return arr; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //鿤æ·éæ¤æ·éæ·å¡æ·éçªî¤æ·éæ¤æ·éæ¤æ·èéè¡ææ·éé¶îæ·é轿ç«sonArray, 鿤æ·éçµowAsObject=true æ¯éæ¤æ·éæ¤æ·ç®éæ¤æ·éæ¤æ·éæ¤æ·ä¸ºéæ¤æ·éæ¤æ·éè¡è®¹æ·éæ¤æ·éæ¤æ·jsonobject 鿤æ·éæ¤æ·æ¯éæ¤æ·éæ¤æ·ç®éæ¤æ·éæ¤æ·ä¸éæ¤æ·éæ¤æ·éè¡è®¹æ·éæ¤æ·éæ¤æ· jsonarray鿤æ·éæ¤æ· |
| | | public static org.json.JSONArray resultToJson(ResultSet result,boolean RowAsObject) throws SQLException, JSONException{ |
| | | JSONArray arr=new JSONArray(); |
| | | ResultSetMetaData r= result.getMetaData(); |
| | | String[] cols=new String[r.getColumnCount()]; |
| | | |
| | | for(int i=0;i<cols.length;i++){ |
| | | cols[i]=r.getColumnLabel(i+1); |
| | | |
| | | } |
| | | if(RowAsObject){ |
| | | while(result.next()){ |
| | | JSONObject obj=new JSONObject(); |
| | | for(int i=0;i<cols.length;i++){ |
| | | Object o=result.getObject(i+1); |
| | | if(o==null) |
| | | o=JSONObject.NULL; |
| | | obj.put(cols[i],o); |
| | | } |
| | | arr.put(obj); |
| | | } |
| | | } |
| | | else{ |
| | | while(result.next()){ |
| | | JSONArray obj=new JSONArray(); |
| | | for(int i=0;i<cols.length;i++){ |
| | | Object o=result.getObject(i+1); |
| | | if(o==null) |
| | | o=JSONObject.NULL; |
| | | obj.put(o); |
| | | } |
| | | arr.put(obj); |
| | | } |
| | | } |
| | | return arr; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] ss) throws Exception{ |
| | | // DBHelper.InitHelper(); |
| | | // System.out.println(DBHelper.getDBHelper("mes").query(true,"select * from gmms_galss_task where width>? limit 1",100)); |
| | | // System.out.println(DBHelper.getDBHelper("mes").query(true,"select * from gmms_galss_task where width>? limit 1",false)); |
| | | // System.out.println(DBHelper.getDBHelper("mes").update("insert into abc (a,b,c) values (?,?,?)", 1,"2","3")); |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | import java.sql.*; |
| | | import java.util.*; |
| | | import org.json.*; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public class DBSession implements AutoCloseable { |
| | | private Connection con; //������ |
| | | private boolean auto; //�Ƿ�Ϊ�Զ��ύ |
| | | private Statement sql; //���һ��ʹ�õ�Statement |
| | | |
| | | |
| | | |
| | | public Connection getConnection(){ |
| | | return con; |
| | | } |
| | | //���� |
| | | private void reset(){ |
| | | if(sql!=null){ |
| | | try{ |
| | | sql.close(); |
| | | } |
| | | catch(Exception e){ |
| | | |
| | | } |
| | | sql=null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //��ѯ����� |
| | | public class SelectResult{ |
| | | private Statement state; |
| | | private boolean closed; |
| | | |
| | | |
| | | public Object getFirst() throws SQLException{ |
| | | ResultSet r= state.getResultSet(); |
| | | if(r.next()) |
| | | return r.getObject(1); |
| | | else |
| | | return null; |
| | | } |
| | | //��ȡ��ǰ�Ľ�� |
| | | public ResultSet getCurrentResult() throws SQLException { |
| | | return state.getResultSet(); |
| | | } |
| | | |
| | | public JSONObject allResultToJson() throws SQLException, JSONException{ |
| | | JSONObject obj=new JSONObject(); |
| | | int idx=1; |
| | | do{ |
| | | JSONArray a=this.resultToJson(false); |
| | | obj.put("Table"+idx,a); |
| | | idx++; |
| | | }while(this.nextResult()); |
| | | return obj; |
| | | } |
| | | |
| | | |
| | | |
| | | //�ƶ�����һ�����,������ŷ���true |
| | | public boolean nextResult() throws SQLException { |
| | | return state.getMoreResults(); |
| | | } |
| | | public void close(){ |
| | | if(closed==false){ |
| | | closed=true; |
| | | try{ |
| | | state.close(); |
| | | } |
| | | catch(Exception e){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //���캯�� |
| | | public SelectResult(Statement state){ |
| | | this.state=state; |
| | | ResultSet set=null; |
| | | } |
| | | |
| | | //����ǰ�Ľ����ֱ������JSON���� |
| | | public JSONArray resultToJson(boolean RowAsObject) throws SQLException, JSONException{ |
| | | return DBHelper.resultToJson(this.getCurrentResult(), RowAsObject); |
| | | } |
| | | |
| | | public JSONArray resultToJson(String[] fields,boolean RowAsObject) throws SQLException, JSONException{ |
| | | return DBHelper.resultToJson(fields,this.getCurrentResult(), RowAsObject); |
| | | } |
| | | |
| | | |
| | | public List<JSONArray> allToJson(boolean RowAsObject) throws SQLException, JSONException{ |
| | | List<JSONArray> arrs=new ArrayList<JSONArray>(); |
| | | do{ |
| | | arrs.add(DBHelper.resultToJson(this.getCurrentResult(), RowAsObject)); |
| | | }while(this.nextResult()); |
| | | return arrs; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | //��׼�洢���̵��ã���׼�洢���̶���,���ĵ� |
| | | public class StdCallResult extends SelectResult{ |
| | | public int ResultCode; |
| | | public String ResultMessage; |
| | | public StdCallResult(CallableStatement state,int ResultCode,String ResultMessage){ |
| | | super(state); |
| | | this.ResultCode=ResultCode; |
| | | this.ResultMessage=ResultMessage; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //����һ��SQL���� |
| | | public void createSql(String sql) throws SQLException{ |
| | | reset(); |
| | | PreparedStatement result= con.prepareStatement(sql); |
| | | this.sql=result; |
| | | } |
| | | |
| | | public StdCallResult CallProc(String proc,Object... params) throws SQLException{ |
| | | createStdCall(proc,params.length); |
| | | return this.stdCall(params); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public void createQueryCall(String procName,int InputParamCount) throws SQLException { |
| | | reset(); |
| | | StringBuilder sp=new StringBuilder(); |
| | | sp.append("{call "); |
| | | sp.append(procName); |
| | | sp.append("("); |
| | | for(int i=0;i<InputParamCount;i++){ |
| | | if(i==0){ |
| | | sp.append('?'); |
| | | } |
| | | else{ |
| | | sp.append(",?"); |
| | | } |
| | | } |
| | | |
| | | CallableStatement sql=con.prepareCall(sp.toString()); |
| | | sql.registerOutParameter(InputParamCount+1, java.sql.Types.INTEGER); |
| | | sql.registerOutParameter(InputParamCount+2, java.sql.Types.VARCHAR); |
| | | this.sql=sql; |
| | | } |
| | | |
| | | |
| | | |
| | | //����һ����׼�洢���̵��ã�����1�Ǵ洢���̣�����2����������ĸ��� |
| | | public void createStdCall(String procName,int InputParamCount) throws SQLException { |
| | | reset(); |
| | | StringBuilder sp=new StringBuilder(); |
| | | sp.append("{call "); |
| | | sp.append(procName); |
| | | sp.append("("); |
| | | for(int i=0;i<InputParamCount;i++){ |
| | | if(i==0){ |
| | | sp.append('?'); |
| | | } |
| | | else{ |
| | | sp.append(",?"); |
| | | } |
| | | } |
| | | if(InputParamCount==0) |
| | | { |
| | | sp.append("?,?)}"); |
| | | } |
| | | else{ |
| | | sp.append(",?,?)}"); |
| | | } |
| | | CallableStatement sql=con.prepareCall(sp.toString()); |
| | | sql.registerOutParameter(InputParamCount+1, java.sql.Types.INTEGER); |
| | | sql.registerOutParameter(InputParamCount+2, java.sql.Types.VARCHAR); |
| | | this.sql=sql; |
| | | } |
| | | |
| | | //�ô�����SQL�������ݿ⣬ִ��INSERT DELETE UPDATE��SQL��䣬 ������?ռλ����Ӧ�ı��� |
| | | public int update(Object... params) throws SQLException { |
| | | |
| | | PreparedStatement sql=(PreparedStatement)this.sql; |
| | | if(params!=null){ |
| | | |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | |
| | | } |
| | | return sql.executeUpdate(); |
| | | |
| | | } |
| | | |
| | | public int _update(Object[] params) throws SQLException { |
| | | |
| | | PreparedStatement sql=(PreparedStatement)this.sql; |
| | | if(params!=null){ |
| | | |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | |
| | | } |
| | | return sql.executeUpdate(); |
| | | |
| | | } |
| | | |
| | | public Object queryFirst(Object... params) throws SQLException{ |
| | | PreparedStatement sql=(PreparedStatement)this.sql; |
| | | if(params!=null){ |
| | | |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | |
| | | } |
| | | if(sql.execute()){ |
| | | ResultSet r=new SelectResult(sql).getCurrentResult(); |
| | | if(r.next()){ |
| | | return r.getObject(1); |
| | | } |
| | | return null; |
| | | } |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | |
| | | //�ô�����SQL��ѯ���ݿ⣬ִ��SELECT ��䣬 ������?ռλ����Ӧ�ı��� |
| | | public SelectResult query(Object... params) throws SQLException{ |
| | | PreparedStatement sql=(PreparedStatement)this.sql; |
| | | if(params!=null){ |
| | | |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | |
| | | } |
| | | if(sql.execute()){ |
| | | return new SelectResult(sql); |
| | | } |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public SelectResult _query(Object[] params) throws SQLException{ |
| | | PreparedStatement sql=(PreparedStatement)this.sql; |
| | | if(params!=null){ |
| | | |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | |
| | | } |
| | | if(sql.execute()){ |
| | | return new SelectResult(sql); |
| | | } |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | |
| | | //�������һ�δ����ĵı�׼�洢���̣�����Ϊ�洢���̵��������������ֵ�DZ�׼���ý��������洢���̴���SELECT ���Ե���SelectResultʹ�� |
| | | public StdCallResult stdCall(Object...params) throws SQLException{ |
| | | CallableStatement sql=(CallableStatement)this.sql; |
| | | if(params!=null){ |
| | | for(int i=0;i<params.length;i++){ |
| | | sql.setObject(i+1, params[i]); |
| | | } |
| | | } |
| | | sql.execute(); |
| | | sql.getResultSet(); |
| | | int count= sql.getParameterMetaData().getParameterCount(); |
| | | int a1=sql.getInt(count-1); |
| | | String a2=sql.getString(count); |
| | | return new StdCallResult(sql,a1,a2); |
| | | } |
| | | |
| | | //�رջỰ |
| | | public void close(){ |
| | | try{ |
| | | reset(); |
| | | if(con!=null){ |
| | | con.close(); |
| | | con=null; |
| | | } |
| | | } |
| | | catch(Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | //�ֶ��ύ��ʽ�£����������ύ |
| | | public void commit() throws SQLException{ |
| | | if(!auto){ |
| | | con.commit(); |
| | | } |
| | | } |
| | | //�ֶ��ύ��ʽ�£����ڻع����� |
| | | public void rollback() throws SQLException{ |
| | | if(!auto){ |
| | | con.rollback(); |
| | | } |
| | | } |
| | | |
| | | |
| | | //�Ự�Ĺ��캯�� |
| | | public DBSession(Connection con,boolean ManulCommit) throws SQLException{ |
| | | con.setAutoCommit(!ManulCommit); |
| | | this.auto=!ManulCommit; |
| | | this.con=con; |
| | | } |
| | | |
| | | public DBSession(Connection con) throws SQLException{ |
| | | this(con,false); |
| | | } |
| | | |
| | | |
| | | public static DBSession createSession(String url,String user,String password,boolean ManulCommit) throws SQLException{ |
| | | Connection con=null; |
| | | DBSession sn=null; |
| | | try{ |
| | | con= DriverManager.getConnection(url,user,password); |
| | | sn=new DBSession(con,ManulCommit); |
| | | return sn; |
| | | } |
| | | catch(SQLException e){ |
| | | if(sn!=null) |
| | | sn.close(); |
| | | else |
| | | { |
| | | if(con!=null){ |
| | | con.close(); |
| | | } |
| | | } |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | import java.io.*; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Properties; |
| | | |
| | | public class NGFunction { |
| | | |
| | | |
| | | public static Properties getProperties() throws IOException{ |
| | | Properties properties = new Properties(); |
| | | // 使ç¨ClassLoaderå è½½propertiesé
ç½®æä»¶çæå¯¹åºçè¾å
¥æµ |
| | | InputStream in =new java.io.FileInputStream("C:\\Program Files\\NorthGlass\\db.config"); |
| | | // 使ç¨properties对象å è½½è¾å
¥æµ |
| | | try{ |
| | | properties.load(in); |
| | | } |
| | | finally{ |
| | | if(in!=null) |
| | | in.close(); |
| | | } |
| | | return properties; |
| | | //è·åkey对åºçvalueå¼ |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static String dateFormat(String format,java.util.Date date){ |
| | | SimpleDateFormat f=new SimpleDateFormat(format); |
| | | return f.format(date); |
| | | } |
| | | |
| | | public static java.util.Date dateParse(String format,String date) throws ParseException{ |
| | | SimpleDateFormat f=new SimpleDateFormat(format); |
| | | return f.parse(date); |
| | | } |
| | | |
| | | public static String getFileContent(String path) throws IOException{ |
| | | FileReader reader=null; |
| | | try{ |
| | | reader= new FileReader(path); |
| | | String s= getReaderContent(reader); |
| | | reader.close(); |
| | | reader=null; |
| | | return s; |
| | | } |
| | | finally{ |
| | | if(reader!=null) |
| | | reader.close(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public static String getReaderContent(java.io.Reader reader) throws IOException{ |
| | | BufferedReader in=null; |
| | | try{ |
| | | in=new BufferedReader(reader); |
| | | StringBuffer jsonStr=new StringBuffer(); |
| | | String str=""; |
| | | while((str=in.readLine())!=null){ |
| | | jsonStr.append(str); |
| | | } |
| | | in.close(); |
| | | in=null; |
| | | return jsonStr.toString(); |
| | | } |
| | | finally{ |
| | | if(in!=null) |
| | | in.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | |
| | | import builder.Manager; |
| | | import ng.devices.HexUtil; |
| | | |
| | | public class aaa { |
| | | public static void main(String[] args) { |
| | | //uploadImages.uploadImage("D:\\picture/121.jpg", "file://localhost/picture/113.jpg"); |
| | | // int[] a=new int[2]; |
| | | //// a[0]=1; |
| | | //// a[1]=1; |
| | | //// Manager.sendtoPLC(76,20,2,a,0); |
| | | // Manager.sendtoPLC(76,20,2,"0001000a",0); |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | |
| | | import org.apache.commons.net.ftp.FTPClient; |
| | | import org.apache.commons.net.ftp.FTPFile; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | |
| | | public class getFtpData { |
| | | private static final String FTP_HOST = "172.16.17.253"; |
| | | |
| | | private static final Integer FTP_PORT = 21; |
| | | |
| | | private static final String FTP_USERNAME = "ftpusers"; |
| | | |
| | | private static final String FTP_PASSWORD = "beibo.123/"; |
| | | |
| | | |
| | | |
| | | public static ArrayList<String> getImg(String ip) throws Exception { |
| | | // TODO Auto-generated method stub |
| | | |
| | | FTPClient ftpClient = toFtp.getFtpClient(ip, FTP_PORT, FTP_USERNAME, FTP_PASSWORD); |
| | | |
| | | // å±ç¤ºæä»¶å¤¹ |
| | | //FTPFile[] ftpFiles = ftpClient.listDirectories(); |
| | | // for(FTPFile file : ftpFiles){ |
| | | // System.out.println(file.getName()); |
| | | // }ip |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
| | | Date date = new Date(); |
| | | String dateString = sdf.format(date); |
| | | // ä¸è½½æä»¶ |
| | | ArrayList<String> result; |
| | | result=toFtp.download(ftpClient, "./data/mes-file/"+dateString+".txt", dateString+".txt"); |
| | | |
| | | |
| | | //System.out.println(result.get(1)); |
| | | //FtpUtil.download(ftpClient, "test.py", "test.py"); |
| | | // ä¸ä¼ æä»¶ |
| | | // FtpUtil.upload(ftpClient, "D:/ͼƬ3"); |
| | | |
| | | |
| | | toFtp.disConnect(ftpClient); |
| | | return result; |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | getImg("192.168.20.51"); |
| | | //ArrayList<String> getImg() |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | import builder.MachineManager; |
| | | import druidConnect.getMeterParatermeter; |
| | | |
| | | import javax.sql.rowset.Predicate; |
| | | import java.io.*; |
| | | import java.net.URL; |
| | | import java.util.Arrays; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedList; |
| | | import java.util.Objects; |
| | | |
| | | public class sendOptFile { |
| | | static MachineManager mmgr; |
| | | |
| | | //uploadImage("D:/11.jpg", "file://10.153.19.25//å
±äº«//11.jpg"); //è°ç¨å¹¶æµè¯ |
| | | |
| | | /** |
| | | * éè¿ç½ç»urlåæä»¶ï¼å¹¶ä¿å |
| | | * @param path |
| | | * æä»¶ä¿åè·¯å¾ |
| | | * @param url |
| | | */ |
| | | public static void sendOpt(String path, String url) { |
| | | try { |
| | | //å 餿件夹䏿件 |
| | | LinkedList<LinkedHashMap> orderOpt=getMeterParatermeter.getOrderOpt(); |
| | | File directory = new File("\\\\192.168.10.25\\optfile"); |
| | | for (File file: Objects.requireNonNull(directory.listFiles())) { |
| | | if (!file.isDirectory()) { |
| | | file.delete(); |
| | | } |
| | | } |
| | | path+= orderOpt.get(0).get("optfileName"); |
| | | url+=orderOpt.get(0).get("optfileName"); |
| | | URL pathUrl = new URL(url); |
| | | DataInputStream dataInputStream = new DataInputStream(pathUrl.openStream()); |
| | | File file = new File(path); |
| | | |
| | | try (BufferedReader br = new BufferedReader(new InputStreamReader(dataInputStream,"utf-8"))) { |
| | | String line; |
| | | FileWriter writer = new FileWriter(file); |
| | | while ((line = br.readLine()) != null) { |
| | | |
| | | if(line.equals("Pieces=100")){ |
| | | line="Pieces="+orderOpt.get(0).get("largeglass_no"); |
| | | } |
| | | writer.write(line+"\n"); |
| | | } |
| | | writer.flush(); |
| | | writer.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | dataInputStream.close();// å
³éè¾å
¥æµ |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | sendOpt("\\\\192.168.10.25\\optfile/", "file:///d/optfile/"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package ng.db; |
| | | |
| | | import org.apache.commons.net.ftp.FTP; |
| | | import org.apache.commons.net.ftp.FTPClient; |
| | | import org.apache.commons.net.ftp.FTPFile; |
| | | import org.apache.commons.net.ftp.FTPReply; |
| | | import sun.misc.BASE64Encoder; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Base64; |
| | | import java.util.Random; |
| | | |
| | | public class toFtp { |
| | | |
| | | /** |
| | | * è·åä¸ä¸ªftpè¿æ¥ |
| | | * @param host ipå°å |
| | | * @param port ç«¯å£ |
| | | * @param username ç¨æ·å |
| | | * @param password å¯ç |
| | | * @return è¿åftpè¿æ¥å¯¹è±¡ |
| | | * @throws Exception è¿æ¥ftpæ¶åççåç§å¼å¸¸ |
| | | */ |
| | | public static FTPClient getFtpClient(String host, Integer port, String username, String password) throws Exception{ |
| | | FTPClient ftpClient = new FTPClient(); |
| | | |
| | | |
| | | // è¿æ¥æå¡å¨ |
| | | ftpClient.connect(host, port); |
| | | |
| | | int reply = ftpClient.getReplyCode(); |
| | | if(!FTPReply.isPositiveCompletion(reply)){ |
| | | |
| | | ftpClient.disconnect(); |
| | | return null; |
| | | } |
| | | |
| | | // ç»å
¥æå¡å¨ |
| | | boolean login = ftpClient.login(username, password); |
| | | if(!login){ |
| | | |
| | | ftpClient.logout(); |
| | | ftpClient.disconnect(); |
| | | return null; |
| | | } |
| | | |
| | | // è¿æ¥å¹¶ä¸æåç»éftpæå¡å¨ |
| | | |
| | | |
| | | // 设置ééå符éï¼ è¦ä¸æå¡ç«¯è®¾ç½®ä¸è´ |
| | | ftpClient.setControlEncoding("UTF-8"); |
| | | // 设置æä»¶ä¼ è¾ç¼ç ç±»åï¼ åèä¼ è¾ï¼BINARY_FILE_TYPE, ææ¬ä¼ è¾ï¼ASCII_FILE_TYPEï¼ å»ºè®®ä½¿ç¨BINARY_FILE_TYPEè¿è¡æä»¶ä¼ è¾ |
| | | ftpClient.setFileType(FTP.BINARY_FILE_TYPE); |
| | | // 卿¨¡å¼: enterLocalActiveMode(),è¢«å¨æ¨¡å¼: enterLocalPassiveMode(),ä¸è¬éæ©è¢«å¨æ¨¡å¼ |
| | | ftpClient.enterLocalPassiveMode(); |
| | | // 忢ç®å½ |
| | | //ftpClient.changeWorkingDirectory("xxxx"); |
| | | |
| | | return ftpClient; |
| | | } |
| | | |
| | | /** |
| | | * æå¼ftpè¿æ¥ |
| | | * @param ftpClient ftpè¿æ¥å®¢æ·ç«¯ |
| | | */ |
| | | public static void disConnect(FTPClient ftpClient){ |
| | | if(ftpClient == null){ |
| | | return; |
| | | } |
| | | try { |
| | | |
| | | ftpClient.logout(); |
| | | ftpClient.disconnect(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æä»¶ä¸è½½ |
| | | * @param ftpClient ftpè¿æ¥å®¢æ·ç«¯ |
| | | * @param path æä»¶è·¯å¾ |
| | | * @param fileName æä»¶åç§° |
| | | */ |
| | | public static ArrayList<String> download(FTPClient ftpClient, String path, String fileName) throws Exception { |
| | | |
| | | |
| | | |
| | | if(ftpClient == null || path == null || fileName == null){ |
| | | return null; |
| | | } |
| | | |
| | | // 䏿ç®å½å¤çåå¨é®é¢ï¼ 转å为ftpè½å¤è¯å«ä¸æçå符é |
| | | String remotePath; |
| | | try { |
| | | remotePath = new String(path.getBytes(StandardCharsets.UTF_8), FTP.DEFAULT_CONTROL_ENCODING); |
| | | } catch (UnsupportedEncodingException e) { |
| | | remotePath = path; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //è·åæå®è·¯å¾æä»¶éé¢å¾çåæ¾çè·¯å¾ |
| | | InputStream inputStream = ftpClient.retrieveFileStream(remotePath); |
| | | ArrayList<String> getPictureList=new ArrayList<String>(); |
| | | ArrayList<String> folderNameList=new ArrayList<String>(); |
| | | try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream,"utf-8"))) { |
| | | String line; |
| | | while ((line = br.readLine()) != null) { |
| | | |
| | | folderNameList.add(line); |
| | | } |
| | | |
| | | getPictureList.add(folderNameList.get(folderNameList.size()-2)); |
| | | getPictureList.add(folderNameList.get(folderNameList.size()-1)); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | inputStream.close(); |
| | | ftpClient.completePendingCommand(); |
| | | |
| | | ArrayList<String> result=new ArrayList<String>(); |
| | | for( String item: getPictureList){ |
| | | //System.out.println(item); |
| | | InputStream InputStream = ftpClient.retrieveFileStream("./data/"+item); |
| | | ByteArrayOutputStream outStream = new ByteArrayOutputStream(); |
| | | try{ |
| | | byte[] buffer = new byte[1024*900]; |
| | | int i; |
| | | while ( (i = InputStream.read(buffer)) != -1) { |
| | | outStream.write(buffer, 0, i); |
| | | //w outputStream.flush(); |
| | | } |
| | | buffer = outStream.toByteArray(); |
| | | String picture="data:image/jpeg;base64,"+ Base64.getEncoder().encodeToString(buffer);; |
| | | |
| | | result.add(picture); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | InputStream.close(); |
| | | outStream.close(); |
| | | ftpClient.completePendingCommand(); |
| | | } |
| | | //InputStream inputStream1=ftpClient.retrieveFileStream("./data/"+lujin); |
| | | |
| | | |
| | | // System.out.println("---"); |
| | | // System.out.println(inputStream1); |
| | | // if (inputStream1 == null) { |
| | | // return; |
| | | // } |
| | | // FileOutputStream outputStream = new FileOutputStream("D:\\picture\\" + "1.jpg"); |
| | | // BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream1); |
| | | // BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream); |
| | | // try{ |
| | | // byte[] buffer = new byte[2048]; |
| | | // int i; |
| | | // while ((i = bufferedInputStream.read(buffer)) != -1) { |
| | | // bufferedOutputStream.write(buffer, 0, i); |
| | | // bufferedOutputStream.flush(); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // |
| | | // } |
| | | // inputStream1.close(); |
| | | // outputStream.close(); |
| | | // bufferedInputStream.close(); |
| | | // bufferedOutputStream.close(); |
| | | |
| | | |
| | | // å
³éæµä¹åå¿
é¡»æ§è¡ï¼å¦åä¸ä¸ä¸ªæä»¶å¯¼è´æµä¸ºç©º |
| | | // boolean complete = ftpClient.completePendingCommand(); |
| | | // if(complete){ |
| | | // //System.out.println("æä»¶{}ä¸è½½æå"+ remotePath); |
| | | // }else{ |
| | | // //System.out.println("æä»¶{}ä¸è½½å¤±è´¥"+ remotePath); |
| | | // } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶ |
| | | * @param ftpClient ftpè¿æ¥å®¢æ·ç«¯ |
| | | * @param sourcePath æºå°å |
| | | */ |
| | | public static void upload(FTPClient ftpClient, String sourcePath) throws Exception{ |
| | | if(ftpClient == null || sourcePath == null){ |
| | | return; |
| | | } |
| | | |
| | | File file = new File(sourcePath); |
| | | if(!file.exists() || !file.isFile()){ |
| | | return; |
| | | } |
| | | |
| | | // 䏿ç®å½å¤çåå¨é®é¢ï¼ 转å为ftpè½å¤è¯å«ä¸æçå符é |
| | | String remotePath; |
| | | try { |
| | | remotePath = new String(file.getName().getBytes(StandardCharsets.UTF_8), FTP.DEFAULT_CONTROL_ENCODING); |
| | | } catch (UnsupportedEncodingException e) { |
| | | remotePath = file.getName(); |
| | | } |
| | | |
| | | try( |
| | | InputStream inputStream = new FileInputStream(file); |
| | | OutputStream outputStream = ftpClient.storeFileStream(remotePath); |
| | | ){ |
| | | byte[] buffer = new byte[2048]; |
| | | int length; |
| | | while((length = inputStream.read(buffer)) != -1){ |
| | | outputStream.write(buffer, 0, length); |
| | | outputStream.flush(); |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | // å
³éæµä¹åå¿
é¡»æ§è¡ï¼å¦åä¸ä¸ä¸ªæä»¶å¯¼è´æµä¸ºç©º |
| | | boolean complete = ftpClient.completePendingCommand(); |
| | | if(complete){ |
| | | System.out.println("æä»¶{}ä¸ä¼ 宿"+ remotePath); |
| | | }else{ |
| | | System.out.println("æä»¶{}ä¸ä¼ 失败"+ remotePath); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.devices; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | |
| | | public class HexUtil { |
| | | |
| | | public static String formatHex(String hex) { |
| | | String result = ""; |
| | | |
| | | for (int i = 0; i < hex.length() - 1; i+=2) { |
| | | String output = hex.substring(i, i + 2); |
| | | result += ("0x" + output + " "); |
| | | } |
| | | |
| | | if (result.length() > 0) { |
| | | result = result.substring(0, result.lastIndexOf(" ")); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | //å§ï½
ç¶é¨å«ç§å§£å¶æçæ¥å½é´æ¬ç§éºåæéæ¦?ä½ºç²°é©æç |
| | | public static String asciiToHex(String str) { |
| | | char[] chars = str.toCharArray(); |
| | | |
| | | StringBuffer hex = new StringBuffer(); |
| | | for (int i = 0; i < chars.length; i++) { |
| | | hex.append(Integer.toHexString(chars[i])); |
| | | } |
| | | |
| | | return hex.toString(); |
| | | } |
| | | |
| | | public static String hexToAscii(String hex) { |
| | | StringBuffer result = new StringBuffer(); |
| | | |
| | | for (int i = 0; i < hex.length() - 1; i+= 2) { |
| | | String output = hex.substring(i, i + 2); |
| | | int decimal = Integer.parseInt(output, 16); |
| | | result.append((char) decimal); |
| | | } |
| | | |
| | | return result.toString(); |
| | | }//12300 //00321 |
| | | //æµå²ç¹éæ°æµéä½½ç¹é? |
| | | public static int int2ToHex(String number) { |
| | | return Integer.parseInt(number, 2); |
| | | } |
| | | //æµå²ç¹éæ°æµ16æ©æ¶å 4æµ£? |
| | | public static String intBinaryTo16(String number) { |
| | | int num=int2ToHex(number); |
| | | return intTo2ByteHex(num); |
| | | } |
| | | //åå
è¿å¶è½¬åè¿å¶ |
| | | public static int int16ToHex(String number) { |
| | | return Integer.parseInt(number, 16); |
| | | } |
| | | //éä½½ç¹éæ°æµæµå²ç¹é? |
| | | public static String intToBinary(int number) { |
| | | return Integer.toBinaryString(number); |
| | | } |
| | | //åå
è¿å¶è½¬äºè¿å¶ |
| | | public static String int16ToBinary(String number) { |
| | | return intToBinary(int16ToHex(number)); |
| | | } |
| | | //åå
è¿å¶è½¬äºè¿å¶ |
| | | public static String int16ToBinaryEight(String number,int count) { |
| | | String binary=int16ToBinary(number); |
| | | String zero=""; |
| | | for (int i = 0; i <count-binary.length(); i++) { |
| | | zero+="0"; |
| | | } |
| | | binary=zero+binary; |
| | | return binary; |
| | | } |
| | | |
| | | public static String intToHex(int number) { |
| | | return Integer.toHexString(number); |
| | | } |
| | | |
| | | /** |
| | | * ç忣鿿µé¹îè´2æµ£?16æ©æ¶åéå±½î§1æîå´²æ¶?01é?10æîå´²æ¶?0a |
| | | * |
| | | * @param number |
| | | * @return |
| | | */ |
| | | public static String intTo1ByteHex(int number) { |
| | | String numberHex = HexUtil.intToHex(number); |
| | | |
| | | numberHex = String.format("%2s", numberHex).replace(' ', '0'); |
| | | |
| | | return numberHex; |
| | | } |
| | | |
| | | /** |
| | | * ç忣鿿µé¹îè´4æµ£?16æ©æ¶åéå±½î§1æîå´²æ¶?0001é?10æîå´²æ¶?000a |
| | | * |
| | | * @param number |
| | | * @return |
| | | */ |
| | | public static String intTo2ByteHex(int number) { |
| | | String numberHex = HexUtil.intToHex(number); |
| | | |
| | | numberHex = String.format("%4s", numberHex).replace(' ', '0'); |
| | | |
| | | return numberHex; |
| | | } |
| | | |
| | | /** |
| | | * ç忣鿿µé¹îè´8æµ£?16æ©æ¶åéå±½î§1æîå´²æ¶?00000001é?10æîå´²æ¶?0000000a |
| | | * |
| | | * @param number |
| | | * @return |
| | | */ |
| | | public static String intTo4ByteHex(int number) { |
| | | String numberHex = HexUtil.intToHex(number); |
| | | numberHex = String.format("%8s", numberHex).replace(' ', '0'); |
| | | return numberHex; |
| | | } |
| | | |
| | | /** |
| | | * ç忤éç£æµé¹îè´16æ©æ¶åéç
ç´¡éå±½å¾é?2çæ¥å¦é? + éå ¬ç´1çæ¥å¦é? + éã¯ç´1çæ¥å¦é? + é讹ç´1çæ¥å¦é? + éåç´1çæ¥å¦é? + ç»æç´1çæ¥å¦é? |
| | | * |
| | | * @param time |
| | | * @return |
| | | */ |
| | | public static String timeToHex(Date time) { |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(time); |
| | | |
| | | String yearHex = intTo2ByteHex(c.get(Calendar.YEAR)); |
| | | String monthHex = intTo1ByteHex(c.get(Calendar.MONTH) + 1); |
| | | String dayHex = intTo1ByteHex(c.get(Calendar.DAY_OF_MONTH)); |
| | | String hourHex = intTo1ByteHex(c.get(Calendar.HOUR_OF_DAY)); |
| | | String minuteHex = intTo1ByteHex(c.get(Calendar.MINUTE)); |
| | | String secondHex = intTo1ByteHex(c.get(Calendar.SECOND)); |
| | | |
| | | return yearHex + monthHex + dayHex + hourHex + minuteHex + secondHex; |
| | | } |
| | | |
| | | /** |
| | | * ç?16æ©æ¶åé¨å¬æ¤éç£æµé¹îè´yyyy-MM-dd HH:mm:ssé¨å¬ç¸å¯®? |
| | | * |
| | | * @param hexTime |
| | | * @return |
| | | */ |
| | | public static String hexToTime(String hexTime) { |
| | | String year = hexTo4DigitInt(hexTime.substring(0, 4)); |
| | | String month = hexTo2DigitInt(hexTime.substring(4, 6)); |
| | | String day = hexTo2DigitInt(hexTime.substring(6, 8)); |
| | | String hour = hexTo2DigitInt(hexTime.substring(8, 10)); |
| | | String minute = hexTo2DigitInt(hexTime.substring(10, 12)); |
| | | String second = hexTo2DigitInt(hexTime.substring(12, 14)); |
| | | |
| | | return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second; |
| | | } |
| | | //é住忩æ¶åæ?10æ©æ¶å |
| | | public static int hexToInt(String hex) { |
| | | return Integer.parseInt(hex, 16); |
| | | } |
| | | //åå
è¿å¶è½¬æ10è¿å¶åä½ |
| | | public static String hexTo4DigitInt(String hex) { |
| | | return new DecimalFormat("0000").format(hexToInt(hex)); |
| | | } |
| | | //åå
è¿å¶è½¬æ10è¿å¶ä¸¤ä½ |
| | | public static String hexTo2DigitInt(String hex) { |
| | | return new DecimalFormat("00").format(hexToInt(hex)); |
| | | } |
| | | |
| | | public static byte[] stringToInt(String a){ |
| | | byte[] byt = new byte[a.length()/2]; |
| | | for (int i = 0; i < a.length() - 1; i+=2) { |
| | | String output = a.substring(i, i + 2); |
| | | byt[i/2]=(byte)Integer.parseInt(output, 16); |
| | | } |
| | | |
| | | return byt; |
| | | } |
| | | |
| | | /** |
| | | * çåç§éºåæµé¹îè´æ¶ãç¶
é住忩æ¶åçæ¥îæ¶è¯§ç´æ¶å¶
îæµ£å¶
å¢ é?0 |
| | | * |
| | | * @param b |
| | | * @return |
| | | */ |
| | | public static String byteToHexString(byte b) { |
| | | String hex = Integer.toHexString(b & 0xFF); |
| | | |
| | | if (hex.length() == 1) { |
| | | hex = "0" + hex; |
| | | } |
| | | |
| | | return hex; |
| | | } |
| | | |
| | | /** |
| | | * çåå´éî
¡ç¹éè·ºç§ç»ï¸¼ç´æî崲鴿ªç°©æ©æ¶åé¨å«ç§ç»? |
| | | * |
| | | * @param b |
| | | * @return |
| | | */ |
| | | public static String getBin(String hex){ |
| | | String[] hexs = new String[]{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", |
| | | "a", "b", "c", "d", "e", "f"}; |
| | | String[] bins = new String[]{"0000", "0001", "0010", "0011", "0100", "0101", |
| | | "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"}; |
| | | int i; |
| | | for(i=0; i<hexs.length && !hex.toLowerCase().equals(hexs[i]); i++); |
| | | return bins[i]; |
| | | } |
| | | |
| | | /** |
| | | * çåå´éî
¡ç¹éè·ºç§ç»ï¸¼ç´æî崲鴿ªç°©æ©æ¶åé¨å«ç§ç»? |
| | | * |
| | | * @param b |
| | | * @return |
| | | */ |
| | | public static String gethex(String hex){ |
| | | String[] hexs = new String[]{"0000", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "0008", "0009", |
| | | "000a", "000b", "000c", "000d", "000e", "000f"}; |
| | | String[] bins = new String[]{"0000", "0001", "0010", "0011", "0100", "0101", |
| | | "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"}; |
| | | int i; |
| | | for(i=0; i<bins.length && !hex.toLowerCase().equals(bins[i]); i++); |
| | | return hexs[i]; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * éä½½ç¹éè·ºç§éºåæç¼å®æµé住忩æ¶åçæ¥îæ¶? |
| | | * @param bufSize |
| | | * @param msg |
| | | * @return |
| | | */ |
| | | public static String byteToHexString(int bufSize,byte[] msg){ |
| | | String tempHex = ""; |
| | | String command = ""; |
| | | if (bufSize != -1) { |
| | | for (int i = 0; i < bufSize; i++) { |
| | | tempHex = Integer.toHexString(msg[i] & 0xFF); |
| | | |
| | | if (tempHex.length() == 1) { |
| | | tempHex = "0" + tempHex; |
| | | } |
| | | command += tempHex; |
| | | } |
| | | } |
| | | return command; |
| | | } |
| | | |
| | | public static String hexToBinary(String hexString) { |
| | | String binaryString = Integer.toBinaryString(hexToInt(hexString)); |
| | | return String.format("%16s", binaryString).replace(' ', '0'); |
| | | } |
| | | |
| | | public static String binaryTo2ByteHex(String binaryString) { |
| | | String HexString = Integer.toHexString(Integer.parseInt(binaryString, 2)); |
| | | return String.format("%4s", HexString).replace(' ', '0'); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // System.out.println(HexUtil.hexToAscii("3c5354413e48656c6c6f20576f726c64217c5468697320697320746865206669727374207369676e616c2066726f6d20646576696365213c454f463e")); |
| | | // System.out.println(HexUtil.asciiToHex("<STA>Hello World!|This is the first signal from device!<EOF>")); |
| | | // |
| | | // System.out.println(String.format("%4S", HexUtil.intToHex(55)).replace(' ', '0')); |
| | | // System.out.println(HexUtil.hexToInt("00d2")); |
| | | // |
| | | // System.out.println(HexUtil.formatHex("3c5354413e")); |
| | | String message = "Hello World!|This is the first signal from device!"; |
| | | int length = message.length() * 2 + 10; // éå®å®³éå®å«ç¼æ³ç¬é¨?<EOF>é屼竴æ¶îç§ç»ï¹æ¹ªæ·â³å½¿æ¶î
æ±æ¶ãéçæ¥å¦çã§ãé? |
| | | |
| | | String command = HexUtil.asciiToHex("<STA>"); // 娣诲å§å¯®?濮嬫ç£ç? |
| | | |
| | | command += (String.format("%4s", HexUtil.intToHex(length)).replace(' ', '0')); // æ·»å é¿åº¦æ è¯ |
| | | command += "01"; // 娣诲å§çæ§î¬ç»«è¯²ç· 0x01çã§ãéå§å£éç´ç´0x02çã§ãé½ã 寲é? |
| | | command += "0001"; // 娣诲å§çæ§î¬é¨å¬ªå½¿é?0x0001çã§ãé©çæ¹°å¨æ
ç´0x0002çã§ãæ¶î
éªå¨? |
| | | command += "0000"; // åè½å·ï¼0x0000æ¯ä¸ä½æºä¸»å¨åç»ä¸ä½æºï¼0x0001æ¯ä¸ä½æºä¿®æ¹ä¸ä½æºRTC |
| | | command += "00"; // éç²çéç°ç´¡é?0x00çã§ãæ¶å¶
å§çµ? |
| | | |
| | | Calendar c = Calendar.getInstance(); |
| | | |
| | | // æ·»å æ¶é´ï¼å¹¶å°æ¶é´è½¬æ¢ä¸º16è¿å¶è¡¨ç¤º |
| | | command += (String.format("%4s", HexUtil.intToHex(c.get(Calendar.YEAR))).replace(' ', '0')); |
| | | command += (String.format("%2s", HexUtil.intToHex(c.get(Calendar.MONTH) + 1)).replace(' ', '0')); |
| | | command += (String.format("%2s", HexUtil.intToHex(c.get(Calendar.DAY_OF_MONTH))).replace(' ', '0')); |
| | | command += (String.format("%2s", HexUtil.intToHex(c.get(Calendar.HOUR_OF_DAY))).replace(' ', '0')); |
| | | command += (String.format("%2s", HexUtil.intToHex(c.get(Calendar.MINUTE))).replace(' ', '0')); |
| | | command += (String.format("%2s", HexUtil.intToHex(c.get(Calendar.SECOND))).replace(' ', '0')); |
| | | |
| | | command += ("00000001"); // å¯ä¸æ è¯ï¼ä½¿ç¨åºåå· |
| | | |
| | | command += (HexUtil.asciiToHex(message)); // æ·»å 主è¦ä¿¡æ¯å
容 |
| | | |
| | | command += (HexUtil.asciiToHex("<EOF>")); // æ·»å ç»å°¾æ è¯ |
| | | |
| | | System.out.println(command); |
| | | |
| | | System.out.println(String.format("%4s", "1")); |
| | | |
| | | Date time = new Date(); |
| | | System.out.println(new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss").format(time)); |
| | | |
| | | String timeHex = timeToHex(time); |
| | | System.out.println(timeHex); |
| | | System.out.println(hexToTime(timeHex)); |
| | | |
| | | System.out.println("3c5354413e001a00000000000000000000000000010007e0021500152800000000000000005041001d017c017c01017c3c454f463e".length()); |
| | | |
| | | System.out.println(hexToBinary("0c0a")); |
| | | |
| | | System.out.println(Integer.MAX_VALUE); |
| | | } |
| | | |
| | | public static String hexTo2Binary(String hexString) { |
| | | String binaryString = Integer.toBinaryString(hexToInt(hexString)); |
| | | return String.format("%8s", binaryString).replace(' ', '0'); |
| | | } |
| | | } |
| New file |
| | |
| | | package ng.devices; |
| | | |
| | | public interface IoBlock { |
| | | //仿°æ®åæå®å°å读åcount个åèçæ°æ® |
| | | public String read(int Address,int count,byte[] buffer,int offset,byte command); |
| | | //åæ°æ®åæå®å°ååè®®count个åèçæ°æ® |
| | | public String write(int Address,int count,byte[] buffer,int offset); |
| | | //æ°æ®åæ¯å¦å¯ç¨(æªè¿æ¥å°ä¸å¯ç¨) |
| | | public boolean IsEnable(); |
| | | //è¿æ¥æ°æ®å |
| | | public void connect(); |
| | | //æå¼æ°æ®å |
| | | public void close(); |
| | | } |
| New file |
| | |
| | | package ng.devices; |
| | | |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | |
| | | import java.io.DataInputStream; |
| | | import java.io.DataOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.Socket; |
| | | import java.sql.Connection; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | |
| | | public class ModbusClient implements IoBlock { |
| | | |
| | | String name; //åç§° |
| | | byte mbstate; //ç«å· |
| | | int timeout; //çå¾
è¶
æ¶æ¶é´ |
| | | Socket sock; //奿¥å |
| | | int state=0; //è¿è¡ç¶æ 0ï¼æªè¿æ¥ï¼ 1ï¼å·²è¿æ¥ï¼ |
| | | int machineID; |
| | | String ip; |
| | | int port; |
| | | byte[] wbuff; |
| | | byte[] rbuff; |
| | | String zhengzailianjie="æ£å¨è¿æ¥"; |
| | | String yilianjie="å·²è¿æ¥"; |
| | | short frame=0; //å¸§å· |
| | | |
| | | |
| | | public ModbusClient(){ |
| | | wbuff=new byte[500]; |
| | | rbuff=new byte[1024*10]; |
| | | } |
| | | |
| | | public byte getModbusState(){ |
| | | return mbstate; |
| | | } |
| | | |
| | | public String getIP(){ |
| | | return ip; |
| | | } |
| | | |
| | | public String getName(){ |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name){ |
| | | this.name=name; |
| | | } |
| | | |
| | | public int getPort(){ |
| | | return port; |
| | | } |
| | | |
| | | public boolean isOpened(){ |
| | | return state==1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String read(int Address, int count, byte[] buffer, int offset,byte command) { |
| | | if(this.IsEnable()==false){ |
| | | return "é讯æªä½¿è½"; |
| | | } |
| | | if(command==3 &&(Address%2!=0 || count%2!=0)){ |
| | | return "å°ååè¯»åæ°éå¿
é¡»æ¯å¶æ°"; |
| | | } |
| | | int ct=count; |
| | | int tmp1=Address; |
| | | int tmp2=0; |
| | | int tmp=0; |
| | | while(tmp2<ct){ |
| | | tmp=240; |
| | | if(ct-tmp2<240){ |
| | | tmp=ct-tmp2; |
| | | } |
| | | String s=inner_read(tmp2+tmp1,tmp,buffer,offset+tmp2,command); |
| | | if(s=="ok"){ |
| | | tmp2+=tmp; |
| | | } |
| | | else |
| | | return s; |
| | | } |
| | | return "ok"; |
| | | } |
| | | |
| | | @Override |
| | | public String write(int Address, int count, byte[] buffer, int offset) { |
| | | |
| | | if(this.IsEnable()==false){ |
| | | return "é讯æªä½¿è½"; |
| | | } |
| | | if(Address%2!=0 || count%2!=0){ |
| | | return "å°ååè¯»åæ°éå¿
é¡»æ¯å¶æ°"; |
| | | } |
| | | int ct=count; |
| | | int tmp1=Address; |
| | | int tmp2=0; |
| | | int tmp=0; |
| | | while(tmp2<ct){ |
| | | tmp=240; |
| | | if(ct-tmp2<240){ |
| | | tmp=ct-tmp2; |
| | | } |
| | | String s=inner_write(tmp2+tmp1,tmp,buffer,offset+tmp2); |
| | | if(s=="ok"){ |
| | | tmp2+=tmp; |
| | | } |
| | | else |
| | | return s; |
| | | } |
| | | return "ok"; |
| | | |
| | | } |
| | | |
| | | String inner_read(int Address, int count, byte[] buffer, int offset,byte command) { |
| | | |
| | | if (this.IsEnable() == false) { |
| | | return "é讯æªè¿æ¥"; |
| | | } |
| | | // TODO Auto-generated method stub |
| | | int addr = Address; |
| | | int ct = count; |
| | | |
| | | addr = Address / 2; |
| | | ct = count / 2; |
| | | |
| | | frame++; |
| | | wbuff[0] = (byte) ((frame & 0xff00) >> 8); // buff[0..1]å¸§å· |
| | | wbuff[1] = (byte) (frame & 0xff); |
| | | wbuff[2] = 0; //// buff[2..3] å¡«0 |
| | | wbuff[3] = 0; |
| | | wbuff[4] = 0; // buff[4..5] åç»å¸§é¿ æ»é¿-6 |
| | | wbuff[5] = 6; |
| | | wbuff[6] = this.mbstate; // ç«å· |
| | | wbuff[7] = command; // 读åè½å |
| | | wbuff[8] = (byte) ((addr & 0xff00) >> 8); // buff[8..9] å°å |
| | | wbuff[9] = (byte) (addr & 0xff); |
| | | wbuff[10] = (byte) ((ct & 0xff00) >> 8); // buff[10..11] wordæ°æ®æ°é |
| | | wbuff[11] = (byte) (ct & 0xff); |
| | | |
| | | try { |
| | | // ç¨å¥æ¥ååéæ°æ® |
| | | DataOutputStream out = new DataOutputStream(sock.getOutputStream()); |
| | | out.write(wbuff, 0, 12); |
| | | out.flush(); |
| | | // ç¨å¥æ¥åè¯»åæ°æ® |
| | | DataInputStream in = new DataInputStream(sock.getInputStream()); |
| | | int c = in.read(rbuff); |
| | | boolean ok = false; |
| | | if (c > 0) { |
| | | // å¤ææ¥æå¤´æææ§ |
| | | String ret = this.compareHeader(wbuff, rbuff, c); |
| | | |
| | | if (ret != null) |
| | | return ret; |
| | | switch (rbuff[7]) { |
| | | case 1: |
| | | |
| | | case 3: |
| | | int size = Byte.toUnsignedInt(rbuff[8]); |
| | | if (rbuff[7]==3&&size != ct * 2) { |
| | | |
| | | return "æ°æ®é¿åº¦æè¯¯"; |
| | | } |
| | | for (int i = 0; i < size; i++) { |
| | | buffer[offset + i] = rbuff[9 + i]; |
| | | } |
| | | return "ok"; |
| | | case (byte) 0x83: |
| | | return "请æ±å°åè¶
èå´æåè½å䏿¯æ"; |
| | | default: |
| | | ; |
| | | return "æ¶å°æªç¥åè½å"; |
| | | } |
| | | |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | this.close(); |
| | | return "Io Error"; |
| | | } |
| | | return "err"; |
| | | } |
| | | |
| | | //æ¯è¾å¸§å¤´æ¯å¦å¹é
|
| | | String compareHeader(byte[] send,byte[] recv,int count){ |
| | | int step=0; |
| | | if(count<9){ |
| | | return "æ¥å帧é误(帧头æè¯¯)"; |
| | | } |
| | | if(send[0]!=recv[0] || send[1]!=recv[1]){ |
| | | return "帧å·ä¸å¯¹åº"; |
| | | } |
| | | if(send[2]!=0 || send[3]!=0 || recv[2]!=0 || send[3]!=0){ |
| | | return "æ¥å帧é误(帧头æè¯¯)"; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | public String inner_write(int Address, int count, byte[] buffer, int offset) { |
| | | if(this.IsEnable()==false){ |
| | | return "é讯æªè¿æ¥"; |
| | | } |
| | | // TODO Auto-generated method stub |
| | | int addr=Address/2; |
| | | int ct=count/2; |
| | | frame++; |
| | | wbuff[0]=(byte)((frame&0xff00)>>8); // buff[0..1]å¸§å· |
| | | wbuff[1]=(byte)(frame&0xff); |
| | | wbuff[2]=0; //buff[2..3] å¡«0 |
| | | wbuff[3]=0; |
| | | wbuff[4]=0; //buff[4..5] åç»å¸§é¿ æ»é¿-6 |
| | | wbuff[5]=(byte)(7+ct*2); |
| | | wbuff[6]=this.mbstate; //ç«å· |
| | | wbuff[7]=0x10; //åè½ç åä¿æå¯åå¨ |
| | | wbuff[8]=(byte)((addr&0xff00)>>8); //buff[8..9] å°å |
| | | wbuff[9]=(byte)(addr&0xff); |
| | | wbuff[10]=(byte)((ct&0xff00)>>8); //buff[10..11] wordæ°æ®æ°é |
| | | wbuff[11]=(byte)(ct&0xff); |
| | | wbuff[12]=(byte)(ct*2); //æ°æ®åbyteæ°é |
| | | for(int i=0;i<ct*2;i++){ //å¡«å
æ°æ®å |
| | | wbuff[13+i]=buffer[i+offset]; |
| | | } |
| | | try { |
| | | //åé |
| | | DataOutputStream out=new DataOutputStream(sock.getOutputStream()); |
| | | out.write(wbuff,0,13+ct*2); |
| | | //读åºç帧 |
| | | DataInputStream in=new DataInputStream(sock.getInputStream()); |
| | | int c= in.read(rbuff); |
| | | boolean ok=false; |
| | | if(c>0){ |
| | | //å¤ææ¥æå¤´æææ§ |
| | | String ret=this.compareHeader(wbuff,rbuff,c); |
| | | if(ret!=null) |
| | | return ret; |
| | | |
| | | switch(rbuff[7]){ |
| | | case 0x10: |
| | | return "ok"; |
| | | case (byte)0x90: |
| | | return "åæ°æ®åºé:é常æ¯å°åä¸åå¨"; |
| | | default:; |
| | | return "æªç¥å½ä»¤ç "; |
| | | } |
| | | |
| | | } |
| | | else{ |
| | | //è¿ç§æ
åµä¸ä¼åå¨ |
| | | return "æªè¯»å°ä»»ä½æ°æ®"; |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | this.close(); |
| | | //e.printStackTrace(); |
| | | return "Io Error"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean IsEnable() { |
| | | // TODO Auto-generated method stub |
| | | return state==1; |
| | | } |
| | | |
| | | //è®¾ç½®åæ° |
| | | public void setConnectionParam(int MachineID,String IP,int Port,byte ModbusState,int Timeout){ |
| | | this.machineID=MachineID; |
| | | this.mbstate=ModbusState; |
| | | this.ip=IP; |
| | | this.port=Port; |
| | | this.mbstate=ModbusState; |
| | | if(Timeout<10){ |
| | | Timeout=10; |
| | | } |
| | | this.timeout=Timeout; |
| | | } |
| | | //å
³éè¿æ¥ |
| | | @Override |
| | | public void close(){ |
| | | |
| | | if(sock!=null){ |
| | | state=0; |
| | | try { |
| | | sock.close(); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | //e.printStackTrace(); |
| | | } |
| | | sock=null; |
| | | } |
| | | state=0; |
| | | } |
| | | |
| | | //æå¼è¿æ¥ï¼æéè¿ |
| | | @Override |
| | | public void connect(){ |
| | | |
| | | close(); |
| | | DBSession sn=null; |
| | | DBHelper.addHelper("mes","jdbc:mysql://127.0.0.1/gmms?serverTimezone=GMT%2B8","root","beibo.123/"); |
| | | try{ |
| | | this.sock = new Socket(ip,port);//åå»ºè¿æ¥ |
| | | this.sock.setSoTimeout(timeout); //设置è¶
æ¶ |
| | | this.state=1; |
| | | try { |
| | | |
| | | //String str1 = new String(yilianjie.getBytes("GBK"), "utf-8"); |
| | | //DBHelper db=DBHelper.getDBHelper("mes"); |
| | | sn=DBHelper.getDBHelper("mes").createSession(false); |
| | | sn.createSql("update machine set connect_state='å·²è¿æ¥' where id="+machineID+""); |
| | | int a=sn.update(); |
| | | |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | |
| | | |
| | | |
| | | try { |
| | | //String str1 = new String(zhengzailianjie.getBytes("GBK"), "utf-8"); |
| | | sn=DBHelper.getDBHelper("mes").createSession(false); |
| | | sn.createSql("update machine set connect_state='æ£å¨è¿æ¥' where id="+machineID+""); |
| | | int a=sn.update(); |
| | | } catch (SQLException ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package ng.devices; |
| | | |
| | | import java.sql.SQLException; |
| | | |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | import ng.db.DBSession.StdCallResult; |
| | | |
| | | |
| | | public abstract class ModbusService implements Runnable { |
| | | |
| | | //modbus客æ·ç«¯ |
| | | protected ModbusClient client; |
| | | //èªå¨è¯»æ°æ®å°å(åè为åä½,ç®åæ¯0) |
| | | protected int readOffset; |
| | | //èªå¨è¯»åæ°æ®é¿åº¦(åè为åä½ï¼å¯è¶
é¿ï¼ç®åç¨50ï¼æå¤§250) |
| | | protected int readSize; |
| | | //设å¤ID |
| | | protected int machineID; |
| | | //è¿æ¥ç±»å |
| | | protected byte functionType; |
| | | //线ç¨è¿è¡ç¶æ |
| | | protected boolean running; |
| | | |
| | | //设å¤IP |
| | | protected String ip; |
| | | //设å¤ç«¯å£ |
| | | protected int port; |
| | | //çº¿ç¨ |
| | | java.lang.Thread thread; |
| | | //ç¼å²åºï¼æå¡å
许åéè¶
è¿åè®®è¦æ±çæ°æ®ï¼æä»¥ç¼å²åºæ´å¤§ï¼ |
| | | byte[] buff=new byte[10000]; |
| | | |
| | | |
| | | |
| | | public String LastReturn; |
| | | |
| | | //å
³éçº¿ç¨ |
| | | public void close(){ |
| | | this.running=false; |
| | | } |
| | | |
| | | //è¿è¡ |
| | | public void Run(int MachineID,String ip,int port,byte state,int ReadOffset,int ReadSize,int timeout,byte FunctionType){ |
| | | //è®¾ç½®åæ° |
| | | this.machineID=MachineID; |
| | | this.ip=ip; |
| | | this.port=port; |
| | | this.readOffset=ReadOffset; |
| | | this.readSize=ReadSize; |
| | | this.functionType= FunctionType; |
| | | this.client=new ModbusClient(); |
| | | //å¯å¨çº¿ç¨ |
| | | this.client.setConnectionParam(MachineID,ip,port,(byte)state,timeout); |
| | | |
| | | thread=new java.lang.Thread(this); |
| | | thread.start(); |
| | | } |
| | | |
| | | |
| | | //䏿¬¡è¯»åè¡ä¸º |
| | | String once(){ |
| | | //æç
§é
ç½®è¯»æ°æ® |
| | | String msg= client.read(this.readOffset,this.readSize,buff,0,this.functionType); |
| | | this.LastReturn=msg; |
| | | if(msg=="ok"){ |
| | | try { |
| | | //è¯·æ±æå
|
| | | ModbusDataPackage pack=new ModbusDataPackage(); |
| | | pack.ByteSize=this.readSize; |
| | | pack.Address=this.readOffset; |
| | | pack.Content=buff; |
| | | ModbusDataPackage rsp=new ModbusDataPackage(); |
| | | //è°ç¨æå¡ |
| | | if(this.Service(pack,rsp)){ |
| | | //æå¡è¦æ±ä¼æ°æ®ï¼åä¼ |
| | | if(rsp.Content!=null){ |
| | | return client.write(rsp.Address,rsp.ByteSize,rsp.Content,0); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | finally{ |
| | | } |
| | | |
| | | |
| | | } |
| | | return msg; |
| | | } |
| | | |
| | | public void SendPLC(int Address, int count, byte[] buffer, int offset) { |
| | | this.client.write(Address, count, buffer, offset); |
| | | } |
| | | public boolean isRunning(){ |
| | | return this.running; |
| | | } |
| | | |
| | | public boolean isOnLine(){ |
| | | ModbusClient c=this.client; |
| | | if(this.client!=null) |
| | | return this.client.IsEnable(); |
| | | return false; |
| | | } |
| | | |
| | | protected int UpadateInterval=200; |
| | | |
| | | //线ç¨è¿è¡å½æ° |
| | | void proc(){ |
| | | running=true; |
| | | while(running){ |
| | | if(client.IsEnable()){ |
| | | try { |
| | | java.lang.Thread.sleep(UpadateInterval); |
| | | String back=once(); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | } |
| | | } |
| | | else{ |
| | | client.connect(); |
| | | if(client.IsEnable()==false){ |
| | | try { |
| | | java.lang.Thread.sleep(4000); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | } |
| | | } |
| | | // else{ |
| | | // System.out.print("IO龿¥æå"); |
| | | // } |
| | | } |
| | | } |
| | | this.running=false; |
| | | client.close(); |
| | | |
| | | } |
| | | |
| | | //线ç¨å
¥å£ |
| | | @Override |
| | | public void run() { |
| | | // TODO Auto-generated method stub |
| | | proc(); |
| | | } |
| | | public class ModbusDataPackage{ |
| | | public int Address; |
| | | public int ByteSize; |
| | | public byte[] Content; |
| | | } |
| | | protected abstract boolean Service(ModbusDataPackage request,ModbusDataPackage response); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package ng.devices; |
| | | |
| | | import java.sql.CallableStatement; |
| | | import java.sql.Connection; |
| | | |
| | | import builder.Manager; |
| | | import ng.db.DBHelper; |
| | | import ng.db.DBSession; |
| | | import ng.devices.ModbusService.ModbusDataPackage; |
| | | |
| | | public class MysqlService extends ModbusService { |
| | | |
| | | //æ°æ®åº |
| | | DBHelper db; |
| | | //设å¤ID |
| | | int id; |
| | | //使ç¨çåå¨è¿ç¨å,åºå®åç§° |
| | | String proc="Total_method"; |
| | | //è®°å½éè®¯æ¬¡æ° |
| | | public int ioCount; |
| | | |
| | | //æå䏿¬¡è¯»çæ°æ® |
| | | public String lastGet; |
| | | //æå䏿¬¡åçæ°æ® |
| | | public String lastSend; |
| | | //åéæ å¿ä½å®ä½ |
| | | public int fa_song_Pos=-1; |
| | | //è¯·æ±æ å¿ä½å®ä½ |
| | | public int qing_qiu_Pos=-1; |
| | | //ç¶ææ å¿ä½å®ä½ |
| | | public int zhuang_tai_Pos=-1; |
| | | //æ±æ¥æ å¿ä½å®ä½ |
| | | public int hui_bao_Pos=-1; |
| | | //确认æ å¿ä½å®ä½ |
| | | public int que_ren_Pos=-1; |
| | | |
| | | |
| | | public int zhangtai; |
| | | |
| | | //æé 彿°åå§å |
| | | public MysqlService(DBHelper db,int id) { |
| | | super(); |
| | | this.db=db; |
| | | this.id=id; |
| | | |
| | | // TODO Auto-generated constructor stub |
| | | } |
| | | |
| | | int readWord(byte[] buff,int offset){ |
| | | if(offset<0 || offset>=buff.length-1) |
| | | return 0; |
| | | int k=buff[offset]; |
| | | k=(k<<8)+buff[offset+1]; |
| | | return k; |
| | | } |
| | | |
| | | //夿æ¯å¦æ å¿ä½å
¨0 |
| | | boolean PassInvoke(byte[] buff){ |
| | | |
| | | int a=0,b=0,c=0,d=0; |
| | | a=readWord(buff,fa_song_Pos); |
| | | b=readWord(buff,qing_qiu_Pos); |
| | | c=readWord(buff,hui_bao_Pos); |
| | | d=readWord(buff,que_ren_Pos); |
| | | this.zhangtai=readWord(buff,this.zhuang_tai_Pos); |
| | | if(a==0 && b==0 && c==0 && d==0) |
| | | return true; |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | //è¿æ¯å°è¯»åºçå
转æ¢ä¸ºMsyqlè¯å«çå½¢å¼ï¼åªè½è½¬å读åºçæ°æ®å
ï¼ |
| | | String packToString(ModbusDataPackage pack){ |
| | | String s=HexUtil.intTo2ByteHex(1); |
| | | s+=HexUtil.intTo2ByteHex(0); |
| | | s+=HexUtil.intTo2ByteHex((3+pack.ByteSize)); |
| | | s+="0103"; |
| | | s+=HexUtil.intTo1ByteHex(pack.ByteSize); |
| | | s+=HexUtil.byteToHexString(pack.ByteSize,pack.Content); |
| | | return s; |
| | | } |
| | | //è¿æ¯å°mysqlè¿åçå符串转æ¢ä¸ºæ°æ®å
ï¼åªè½è½¬åå请æ±å
ï¼ |
| | | boolean fillPack(ModbusDataPackage pack,String message){ |
| | | if(message==null) |
| | | return false; |
| | | int a= HexUtil.hexToInt(message.substring(8*2,10*2)); |
| | | int b= HexUtil.hexToInt(message.substring(10*2,12*2)); |
| | | String s=message.substring(13*2,message.length()); |
| | | byte[] bb= HexUtil.stringToInt(s); |
| | | pack.Address=a*2; |
| | | pack.ByteSize=b*2; |
| | | pack.Content=bb; |
| | | return true; |
| | | } |
| | | |
| | | //æå¡å®ç°å½æ° |
| | | @Override |
| | | protected boolean Service(ModbusDataPackage arg0, ModbusDataPackage arg1) { |
| | | // TODO Auto-generated method stub |
| | | //读次æ°+1 |
| | | ioCount++; |
| | | //夿æ¯å¦ä¸è°ç¨ |
| | | // if(this.PassInvoke(arg0.Content)) |
| | | // return false; |
| | | //转å为mysqlè¾å
¥åæ° |
| | | String s=this.packToString(arg0); |
| | | //æ´æ°æå䏿¡è¯»æ¥æ |
| | | this.lastGet=s; |
| | | DBSession sn=null; |
| | | String result=null; |
| | | String flag=null; |
| | | |
| | | try{ |
| | | //åå»ºè¿æ¥ |
| | | sn=this.db.createSession(false); |
| | | Connection con= sn.getConnection(); |
| | | //æå¦é£ä¸ªåå¨è¿ç¨ |
| | | CallableStatement sql=con.prepareCall("{call Total_method(?,?,?,?)}"); |
| | | sql.registerOutParameter(3, java.sql.Types.VARCHAR); |
| | | sql.registerOutParameter(4, java.sql.Types.VARCHAR); |
| | | sql.setString(1, s); |
| | | sql.setLong(2, id); |
| | | sql.execute(); |
| | | //读åè¿ååæ° |
| | | result= sql.getString(3); |
| | | flag= sql.getString(4); |
| | | } |
| | | catch(Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | finally{ |
| | | sn.close(); |
| | | |
| | | } |
| | | |
| | | if(result!=null){ |
| | | if(result.length()>0){ |
| | | char c=result.charAt(0); |
| | | //# @ å¼å¤´ä»£è¡¨ç¹æ®æ¶æ¯å符ï¼å¦å代表é讯 |
| | | if(c=='#' || c=='@'){ |
| | | //è°ç¨æ¶æ¯å¤ç彿°ï¼è¿æ¯ä¸ä¸ªå¤é¨æ¥å£ï¼ |
| | | Manager.SendMessage(result); |
| | | } |
| | | else{ |
| | | //æ´æ°æå䏿¬¡åé |
| | | this.lastSend=result; |
| | | //è¿åè¦åéçæ¥æ |
| | | return this.fillPack(arg1,result); |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | import static java.lang.System.arraycopy; |
| | | |
| | | public class DLT645_2007Control { |
| | | |
| | | // è¯»æ°æ® ,ä¼ å
¥çµè¡¨ç表å·åçæ è¯»æ°æ®çå½ä»¤ï¼å°å½ä»¤åéå°çµè¡¨ |
| | | public byte[] ReadData(String address) { |
| | | |
| | | byte[] readcommand = new byte[20]; |
| | | readcommand[0] = (byte) 0xFE; // ç½ä¸èµæè¯´åé¢è¦å å个åºå®ç 0xFEï¼ |
| | | readcommand[1] = (byte) 0xFE; |
| | | readcommand[2] = (byte) 0xFE; |
| | | readcommand[3] = (byte) 0xFE; |
| | | readcommand[4] = (byte) 0x68;// çæ£çæ°æ®å¸§èµ·å§ä½ç½® |
| | | byte[] addressbytes = setAddrByte(address); // çµè¡¨çå°å 转æ16è¿å¶ï¼æä¸ä¸ªååºçæä½ |
| | | arraycopy(addressbytes, 0, readcommand, 5, addressbytes.length); |
| | | readcommand[11] = (byte) 0x68;// åºå®æ ¼å¼ |
| | | readcommand[12] = (byte) 0x11;// 表示 è¯»æ°æ® |
| | | readcommand[13] = (byte) 0x04;// åé¢ æ°æ®é¡¹çé¿åº¦ |
| | | // byte[] dataTypeBytes = new byte[] { (byte) 0x00, (byte) 0x00, (byte) |
| | | // 0x00, (byte) 0x00 };//读çµè¡¨çæåæ»çµè½ |
| | | byte[] dataTypeBytes = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x00 };// æ°æ®é¡¹ä»£ç ï¼ |
| | | // 读çµè¡¨çæ£åæåæ»çµè½ |
| | | |
| | | if (dataTypeBytes != null) { |
| | | for (int i = 0; i < dataTypeBytes.length; i++) { |
| | | dataTypeBytes[i] += 0x33; |
| | | } |
| | | } |
| | | arraycopy(dataTypeBytes, 0, readcommand, 14, dataTypeBytes.length); |
| | | readcommand[18] = getSigned(getCSCode(readcommand, 4, 17)); |
| | | readcommand[19] = (byte) 0x16; |
| | | return readcommand; |
| | | } |
| | | |
| | | // è§£æä»è®¾å¤è¿åçæ°æ® |
| | | public static void ReturnData(byte[] returndatas) { |
| | | float reslut =0; |
| | | if (returndatas.length > 8) { |
| | | |
| | | if (returndatas[8] == (byte) 0x91)// 对åºè¯»æ°æ®å½ä»¤11 çæ£ç¡®åºç |
| | | { |
| | | String EachByteAddress = GetBCDAddress(returndatas); // å¾å° |
| | | // å½åè¿åæ°æ®ä»£è¡¨ç |
| | | // çµè¡¨è¡¨å· |
| | | boolean check = checkData(returndatas); |
| | | if (check) { |
| | | int[] read_ints = new int[returndatas.length]; |
| | | for (int i = 0; i < returndatas.length; i++) { |
| | | if ((int) returndatas[i] > 0) { |
| | | read_ints[i] = (int) returndatas[i]; |
| | | } else { |
| | | read_ints[i] = (int) returndatas[i] + 256; |
| | | } |
| | | } |
| | | |
| | | if (read_ints[8] == 0x91) { |
| | | int lengthOfData = read_ints[9];// æ°æ®é¿åº¦; |
| | | byte[] data = new byte[lengthOfData - 4]; |
| | | for (int d = 0; d < lengthOfData - 4; d++) { |
| | | data[d] = (byte) (read_ints[14 + d] - 0x33); |
| | | } |
| | | int value = 0; |
| | | for (int v = 0; v < lengthOfData - 4; v++) { |
| | | value = v + (data[v] * 10 / 16 + (data[v]) % 16) * 100 ^ v; |
| | | } |
| | | reslut = value * 0.01f;// value *0.01 æ¯æç»ç æ£åæåæ»çµè½ |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // System.out.println(reslut); |
| | | } |
| | | |
| | | // æè¡¨å·å°å转æ16è¿å¶ |
| | | public byte[] setAddrByte(String addr) { |
| | | byte[] addressByte = new byte[6]; |
| | | for (int i = 11; i > 0; i -= 2) { |
| | | int a = addr.charAt(i); |
| | | int b = addr.charAt(i - 1); |
| | | // ç±äºå°åæ¯16è¿å¶ï¼æä»¥å
è¿è¡å¤æ |
| | | // A - F |
| | | if (a >= 65 && a <= 70) { |
| | | a -= 15; |
| | | } else if (a >= 97 && a <= 102) { |
| | | a -= 87; |
| | | } else { |
| | | a -= 48; |
| | | } |
| | | |
| | | if (b >= 65 && b <= 70) { |
| | | b -= 15; |
| | | } else if (b >= 97 && b <= 102) { |
| | | b -= 87; |
| | | } else { |
| | | b -= 48; |
| | | } |
| | | |
| | | addressByte[(11 - i) / 2] = (byte) (b * 16 + a); |
| | | } |
| | | return addressByte; |
| | | } |
| | | |
| | | // æ16è¿å¶çè¡¨å·æ°æ® 转æå符串形å¼çè¡¨å· |
| | | public static String GetBCDAddress(byte[] address) { |
| | | byte[] byteAddress = new byte[6]; |
| | | arraycopy(address, 1, byteAddress, 0, 6); |
| | | String addr = ""; |
| | | String EachByteAddress; |
| | | int bitdata; |
| | | for (byte addr_b : byteAddress) { |
| | | if (addr_b < 0) { |
| | | bitdata = addr_b + 256; |
| | | } else { |
| | | bitdata = addr_b; |
| | | } |
| | | EachByteAddress = bitdata / 16 + "" + bitdata % 16; |
| | | addr = EachByteAddress + addr; |
| | | } |
| | | return addr; |
| | | } |
| | | |
| | | // CSæ ¡éªç |
| | | private int getCSCode(byte[] byteFrame, int i, int j) { |
| | | int s = 0; |
| | | for (int k = i; k <= j; k++) { |
| | | s += (byteFrame[k] & 0xff) % 256; |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | // å°æ 符å·(å½¢å¼ä¸ç)çæ°æ®è½¬åææç¬¦å·çbyteæ°æ®å¼ |
| | | private byte getSigned(int a) { |
| | | if (a > 0x7f) |
| | | return (byte) (a - 256); |
| | | else |
| | | return (byte) (a); |
| | | } |
| | | |
| | | // æ ¡éª è¿åçæ°æ®å
å
容 |
| | | static boolean checkData(byte[] data) { |
| | | byte s = 0; |
| | | int j; |
| | | for (j = data.length - 1; j > 0; j--) { |
| | | if (data[j] == 22) { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < j - 1; i++) { |
| | | s += (data[i] & 0xff) % 256; |
| | | } |
| | | // System.out.println(s); |
| | | if (s == data[j - 1]) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.Socket; |
| | | |
| | | public class TCPClient { |
| | | public static void main(String[] args) throws IOException, IOException { |
| | | |
| | | System.out.println("TCP客æ·ç«¯å¯å¨..."); |
| | | |
| | | //1.建ç«å®¢æ·ç«¯socketæå¡ |
| | | Socket s = new Socket("192.168.3 .7 ", 8887); |
| | | |
| | | //2.è·åsocketæµä¸çè¾åºæµ |
| | | OutputStream out = s.getOutputStream(); |
| | | |
| | | //使ç¨è¾åºæµå°æå®çæ°æ®ååºå» |
| | | out.write("tcpæ¼ç¤º: Hello Java".getBytes()); |
| | | |
| | | //å
³éèµæº |
| | | s.close(); |
| | | } |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | |
| | | import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer; |
| | | import ng.devices.HexUtil; |
| | | |
| | | import java.io.*; |
| | | import java.net.Socket; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedList; |
| | | |
| | | import static druidConnect.getMeterParatermeter.meterToMysql; |
| | | |
| | | public class TcpClientHandler extends Thread { |
| | | private Socket clientSocket; |
| | | private PrintWriter out; |
| | | private InputStream in; |
| | | private Socket socket; |
| | | private LinkedList<LinkedHashMap> meterParameter; |
| | | public TcpClientHandler(Socket socket, LinkedList<LinkedHashMap> meterParameter) { |
| | | this.clientSocket = socket; |
| | | this.meterParameter=meterParameter; |
| | | } |
| | | |
| | | public void run() { |
| | | try { |
| | | while (true) { |
| | | try { |
| | | System.out.println(clientSocket.getInetAddress().getHostAddress()+"客æ·ç«¯è¿æ¥ä¸äº"); |
| | | InputStream in = clientSocket.getInputStream(); |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | |
| | | byte[] b = new byte[20]; |
| | | |
| | | int len; |
| | | while ( (len = in.read(b)) != -1) { |
| | | output.write(b, 0, len); |
| | | |
| | | try { |
| | | Thread.sleep(10); |
| | | } catch (InterruptedException e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | if(in.available() == 0) { |
| | | output.reset(); |
| | | } |
| | | |
| | | String result=new String(b, 0, len); |
| | | String HexDLT645=gethex.BinaryToHexString(b); |
| | | if(result.equals("123")){ |
| | | for (int i = 0; i <meterParameter.size() ; i++) { |
| | | String hexString=""; |
| | | if(meterParameter.get(i).get("ip").equals(clientSocket.getInetAddress().getHostAddress())){ |
| | | hexString= (String) meterParameter.get(i).get("hexdlt645"); |
| | | byte[] data = HexUtil.stringToInt(hexString); |
| | | DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream()); |
| | | out.write(data); |
| | | out.flush(); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | }else if(HexDLT645.indexOf("68")>-1){ |
| | | String HEX=HexDLT645.replace(" ", ""); |
| | | for (int i = 0; i < meterParameter.size(); i++) { |
| | | if(HEX.indexOf((String) meterParameter.get(i).get("addless"))>-1 && meterParameter.get(i).get("addless")!="" ){ |
| | | Double electricNum = gethex.toSqlElectric(HexDLT645); |
| | | String ratio = (String) meterParameter.get(i).get("ratio"); |
| | | electricNum = Math.round(electricNum * Integer.parseInt(ratio) ) * 1d; |
| | | String meterID = (String) meterParameter.get(i).get("id"); |
| | | meterToMysql(meterID,electricNum,HEX); |
| | | } |
| | | } |
| | | |
| | | //System.out.println(HEX); |
| | | } |
| | | |
| | | b = new byte[20]; |
| | | len = 0; |
| | | |
| | | } |
| | | output.close(); |
| | | in.close(); |
| | | |
| | | }catch (Exception e){ |
| | | // |
| | | System.out.println("tcpçµè¡¨å®¢æ·ç«¯å·²æå¼è¿æ¥---------"+e); |
| | | break; |
| | | } |
| | | |
| | | |
| | | //inputLine += new String(temp, 0, length); |
| | | //System.out.println(inputLine); |
| | | // if (".".equals(inputLine)) { |
| | | // System.out.println(inputLine); |
| | | // System.out.println("tcpçµè¡¨å®¢æ·ç«¯å·²æå¼è¿æ¥1---------"); |
| | | // //out.println("bye"); |
| | | // break; |
| | | // } |
| | | } |
| | | |
| | | clientSocket.close(); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | }finally { |
| | | |
| | | } |
| | | } |
| | | private static byte charToByte(char c) { |
| | | return (byte) "0123456789ABCDEF".indexOf(c); |
| | | } |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.ServerSocket; |
| | | |
| | | public class TcpMain { |
| | | public static void main(String[] args) throws Exception |
| | | { |
| | | // try{ |
| | | // new TcpMultiServer().start(55559); |
| | | // }catch (Exception e){ |
| | | // System.out.println("tcpæå¡åçé误"); |
| | | // } |
| | | getElectric(); |
| | | |
| | | } |
| | | public static void getElectric() throws Exception |
| | | { |
| | | //new ServerSocket(55550).close(); |
| | | try{ |
| | | new TcpMultiServer().start(55550); |
| | | }catch (Exception e){ |
| | | |
| | | System.out.println("tcpæå¡åçé误"+e); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void getElectric1() throws Exception |
| | | { |
| | | try{ |
| | | new TcpMultiServer().start(55550); |
| | | }catch (Exception e){ |
| | | |
| | | System.out.println("tcpæå¡åçé误"+e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | |
| | | import druidConnect.getMeterParatermeter; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.PrintStream; |
| | | import java.net.ServerSocket; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedList; |
| | | |
| | | public class TcpMultiServer { |
| | | LinkedList<LinkedHashMap> meterParameter; |
| | | |
| | | { |
| | | try { |
| | | meterParameter = getMeterParatermeter.getMeterParater(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private ServerSocket serverSocket; |
| | | |
| | | |
| | | public void start(int port) throws IOException { |
| | | serverSocket = new ServerSocket(port); |
| | | while (true) { |
| | | new TcpClientHandler(serverSocket.accept(),meterParameter).start(); |
| | | } |
| | | } |
| | | |
| | | public void stop() throws IOException { |
| | | serverSocket.close(); |
| | | } |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | import static java.lang.Integer.parseInt; |
| | | import static java.lang.Integer.toHexString; |
| | | |
| | | public class gethex { |
| | | public static byte[] hexStrToBinaryStr(String hexString) { |
| | | |
| | | |
| | | // if (TextUtils.isEmpty(hexString)) { |
| | | // return null; |
| | | // } |
| | | |
| | | hexString = hexString.replaceAll(" ", ""); |
| | | |
| | | int len = hexString.length(); |
| | | int index = 0; |
| | | |
| | | byte[] bytes = new byte[len / 2]; |
| | | |
| | | while (index < len) { |
| | | |
| | | String sub = hexString.substring(index, index + 2); |
| | | |
| | | bytes[index/2] = (byte)Integer.parseInt(sub,16); |
| | | |
| | | index += 2; |
| | | } |
| | | |
| | | //BinaryToHexString(bytes); |
| | | return bytes; |
| | | } |
| | | public static String BinaryToHexString(byte[] bytes) { |
| | | String hexStr = "0123456789ABCDEF"; |
| | | String result = ""; |
| | | String hex = ""; |
| | | for (byte b : bytes) { |
| | | hex = String.valueOf(hexStr.charAt((b & 0xF0) >> 4)); |
| | | hex += String.valueOf(hexStr.charAt(b & 0x0F)); |
| | | result += hex + " "; |
| | | } |
| | | // System.out.println("------"); |
| | | //System.out.println(result); |
| | | return result; |
| | | } |
| | | |
| | | public static double toSqlElectric(String DLT645) { |
| | | String[] data=DLT645.split(" "); |
| | | int start = 0; |
| | | int end = data.length - 1; |
| | | |
| | | while (start < end) { |
| | | String temp = data[start]; |
| | | data[start] = data[end]; |
| | | data[end] = temp; |
| | | |
| | | start++; |
| | | end--; |
| | | } |
| | | int num1 = Integer.parseInt("33", 16); |
| | | String result=""; |
| | | for (int i = 2; i <6; i++) { |
| | | |
| | | int num2 = Integer.parseInt(data[i], 16); |
| | | int num3 = num2 - num1 ; |
| | | int num4=Integer.parseInt(Integer.toHexString(num3)); |
| | | result+=String.format("%02d", num4); |
| | | } |
| | | return Math.round(Float.valueOf(result)) * 0.01d; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String DLT645="68 23 01 00 91 03 57 68 91 08 33 33 34 33 37 8A 34 33 6D 16"; |
| | | toSqlElectric(DLT645); |
| | | } |
| | | } |
| New file |
| | |
| | | package toTcp; |
| | | |
| | | import java.text.DecimalFormat; |
| | | |
| | | import static com.sun.corba.se.impl.util.RepositoryId.getByteArray; |
| | | |
| | | public class to16HEX { |
| | | |
| | | public static void to16Hex1(byte[] bytes, int len){ |
| | | byte[] afByte; |
| | | //å®ä¹16è¿å¶å符串 |
| | | String hex = ""; |
| | | for (int i = 0; i < len; i++) { |
| | | int ce = bytes[i] & 0xFF; |
| | | //è¿é䏿»¡è¶³ä¸¤ä¸ªé¿åº¦çéè¦å¡«å
0ï¼ä¸ºäºæ»¡è¶³ä¸ä¸ªåèå çæ¯å符串çä¸¤ä½ æ¯å¦ 10ç16è¿å¶å°±æ¯a 转为16è¿å¶å符串就æ¯0a |
| | | DecimalFormat df = new DecimalFormat("00"); |
| | | hex += " "+df.format(ce); |
| | | } |
| | | //afByte = getByteArray(hex); |
| | | System.out.println(hex); |
| | | System.out.println(len); |
| | | //String result=new String(afByte, 0, afByte.length); |
| | | //System.out.println(result); |
| | | } |
| | | } |