| | |
| | | })
|
| | | }
|
| | |
|
| | | export function CompleteQueue(id,frameid) {
|
| | | export function CompleteQueue(id,frameid,glassid) {
|
| | | return request({
|
| | | url: '/home/CompleteQueue?id=' + id+'&frameid='+frameid,
|
| | | url: '/home/CompleteQueue?id=' + id+'&frameid='+frameid+'&glassid='+glassid,
|
| | | method: 'post',
|
| | | data:""
|
| | | })
|
| | |
| | | {
|
| | |
|
| | | "ip": "192.168.10.101",
|
| | | "ip": "localhost",
|
| | | "systemTitle": "Login System",
|
| | | "usernamePlaceholder": "Please enter username",
|
| | | "passwordPlaceholder": "Please enter password",
|
| | |
| | | "Unable to find whether the aluminum frame is flipped or not":"Unable to find whether the aluminum frame is flipped or not",
|
| | | "You do not have this permission":"You do not have this permission",
|
| | | "This glass is already in the Queue":"This glass is already in the Queue",
|
| | | "complete":"complete",
|
| | | "Complete":"Complete",
|
| | | "Not Allow":"Not Allow",
|
| | | "ServoManualone": {
|
| | | "A01 所在格子": "A01 Current Grid",
|
| | | "数量": "Quantity",
|
| | |
| | | {
|
| | | "ip": "192.168.10.101",
|
| | | "ip": "localhost",
|
| | | "systemTitle": "登录系统",
|
| | | "usernamePlaceholder": "请输入用户名",
|
| | | "passwordPlaceholder": "请输入密码",
|
| | |
| | | "Unable to find the placement method of the aluminum frame":"查询不到铝框摆放方式",
|
| | | "Unable to find whether the aluminum frame is flipped or not":"查询不到铝框是否翻转",
|
| | | "This glass is already in the Queue":"此玻璃已在出片队列中",
|
| | | "complete":"完成",
|
| | | "Complete":"完成",
|
| | | "Not Allow":"不允许",
|
| | | "langparameter": {
|
| | | "conveyor Velocity(Auto FAST)": "D01-D06 皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "D01-D06 皮带输送自动慢速",
|
| | |
| | | <el-table-column prop="barcode" :label="$t('Complete')">
|
| | | <template slot-scope='scope'>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="!isAllowQueue"
|
| | | @click="CompleteQueue(scope.row.id,scope.row.barcode)">{{ $t('Complete') }}</el-button>
|
| | | @click="CompleteQueue(scope.row.id,scope.row.barcode,scope.row.glassId)">{{ $t('Complete') }}</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column :width="280" :label="$t('Operate')">
|
| | |
| | | created() {
|
| | | this.load();
|
| | | this.init();
|
| | | setInterval(() => {
|
| | | if(socket.readyState != 1){
|
| | | this.init();
|
| | | }
|
| | | }, 20000);
|
| | | }
|
| | | ,
|
| | | methods: {
|
| | |
| | | //打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | // setInterval(()=>{
|
| | | // if(socket){
|
| | | // if(socket.readyState==socket.OPEN){
|
| | | // socket.send('');
|
| | | // }
|
| | | // }
|
| | | // },5000);
|
| | | };
|
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息
|
| | | socket.onmessage = function (msg) {
|
| | |
| | | this.form5 = {};
|
| | | },
|
| | | //手动完成出片任务
|
| | | CompleteQueue(id,frameid) {
|
| | | CompleteQueue(id,frameid).then(res => {
|
| | | CompleteQueue(id,frameid,glassid) {
|
| | | CompleteQueue(id,frameid,glassid).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | |
| | | import com.example.springboot.service.OutSliceServive; |
| | | import com.example.springboot.service.SpianService; |
| | | |
| | | |
| | | public class Plchome extends Thread { |
| | | |
| | | @Autowired |
| | |
| | | public static String FrameNo; |
| | | //是否需要手动确认玻璃 |
| | | public static Boolean isConfirm=false; |
| | | |
| | | // public static Map b=new HashMap<>(); |
| | | // b.put() |
| | | @Override |
| | |
| | | // 查询报警信息 |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | // 读去Plc进片车与出片车位置W |
| | | List<String> addressList = new ArrayList<String>(); |
| | | addressList.add("DB106.12"); |
| | | addressList.add("DB106.0"); |
| | | List<Short> paramlist = S7control.getinstance().ReadWord(addressList); |
| | | if (paramlist != null) { |
| | | jsonObject.append("params", paramlist); |
| | | } |
| | | // // 读去Plc进片车与出片车位置W |
| | | // List<String> addressList = new ArrayList<String>(); |
| | | // addressList.add("DB106.12"); |
| | | // addressList.add("DB106.0"); |
| | | // List<Short> paramlist = S7control.getinstance().ReadWord(addressList); |
| | | // if (paramlist != null) { |
| | | // jsonObject.append("params", paramlist); |
| | | // } |
| | | // // 获取进片车状态 |
| | | // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", |
| | | // 1);// 获取进片车状态 |
| | | // boolean exist1 = datas1ListState.contains((short) 0); |
| | | // jsonObject.append("zhuangtai", exist1); |
| | | //获取进片玻璃信息 |
| | | List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1); |
| | | if (inglassInfo != null) { |
| | | if (inglassInfo.size() > 0) |
| | | jsonObject.append("loadglassheight", inglassInfo.get(0) * 70); |
| | | } |
| | | // // 获取进片玻璃信息 |
| | | // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1); |
| | | // if (inglassInfo != null) { |
| | | // if (inglassInfo.size() > 0) |
| | | // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70); |
| | | // } |
| | | |
| | | // 伍 获取进是否有待确认的玻璃id |
| | | String queid = spianMapper.Selectqueueid(); |
| | |
| | | //获取当前出片队列状态 |
| | | jsonObject.append("isAllowQueue",Plchome.isAllowQueue); |
| | | |
| | | //获取铝框idDB106.DBW64 |
| | | // // 获取铝框idDB106.DBW64 |
| | | // String frameno=spianService.queGlassid("DB106.24",14).toString(); |
| | | // if(frameno!=Plchome.FrameNo){ |
| | | // Plchome.FrameNo=frameno; |
| | | // } |
| | | // Plchome.FrameNo="123"; |
| | | // try { |
| | | // north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo); |
| | | // } catch (SQLException e) { |
| | |
| | | // S7control.getinstance().WriteWord("铝框翻转发送地址", (short)send); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | boolean dbconnected = false; |
| | | try { |
| | |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | //new PlcHold().start(); |
| | | // |
| | | // |
| | | // new Plchome().start(); |
| | | new Plchome().start(); |
| | | //// // |
| | | // new PlcParameter().start(); |
| | | // // |
| | |
| | | // new Plcstate().start(); |
| | | // new PlcPositioning1().start(); |
| | | // new PlcPositioning2().start(); |
| | | new PlcParameter2().start(); |
| | | // new PlcParameter2().start(); |
| | | // new PlcParameter1().start(); |
| | | // new PLCAutomaticParameterSetting().start(); |
| | | // |
| | |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types); |
| | | homeMapper.UpdateTask(types,glassid); |
| | | StorageCage glass = homeMapper.SelectGlassInfo(glassid); |
| | | if (types == 0) { |
| | | homeMapper.UpdateCageTask1(glassid); |
| | |
| | | |
| | | //手动完成任务 |
| | | @PostMapping("/CompleteQueue") |
| | | public Result CompleteQueue(String id,String frameid) { |
| | | return outSliceServive.CompleteQueue(id,frameid); |
| | | public Result CompleteQueue(String id,String frameid,String glassid) { |
| | | return outSliceServive.CompleteQueue(id,frameid,glassid); |
| | | |
| | | } |
| | | |
| | |
| | | short SelectInTask(); |
| | | |
| | | // 手动完成任务 |
| | | @Update("update storage_task set task_state=1 where task_type=#{task_type} and task_state=0") |
| | | void UpdateTask(@Param("task_type") Integer task_type); |
| | | @Update("update storage_task set task_state=1 where task_type=#{task_type} and task_state=0 and glass_id=#{glassid}") |
| | | void UpdateTask(@Param("task_type") Integer task_type,String glassid); |
| | | |
| | | // 手动完成进片任务修改笼子数据 |
| | | @Update("update storage_cage set state=1 where glass_id=#{glassid} and state=2") |
| | |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoProperties.Storage; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | |
| | | @Service |
| | | public class OutSliceServive { |
| | | |
| | | @Autowired |
| | | private HomeMapper homeMapper; |
| | | @Autowired |
| | | private SpianMapper spianMapper; |
| | | |
| | | @Autowired |
| | | private JdbcConnections jdbcConnections; |
| | |
| | | return listoutslice; |
| | | } |
| | | |
| | | public Result CompleteQueue(String id, String frameid) { |
| | | public Result CompleteQueue(String id, String frameid, String glassid) { |
| | | homeMapper.CompleteQueue(id); |
| | | Short num=homeMapper.SelectCountByFrameNo(frameid); |
| | | if(num==0){ |
| | | homeMapper.CompleteQueueByFrameNo(frameid); |
| | | } |
| | | StorageCage storageCage = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); |
| | | |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |