| | |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | export function AddOutGlass(cell,glasstype) { |
| | | return request({ |
| | | url: '/home/AddOutGlass?cell='+cell+'&glasstype='+glasstype, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | export function FinishTask(id) { |
| | | return request({ |
| | | url: '/home/FinishTask?id='+id, |
| | |
| | | "Films":"Films", |
| | | "StorageCageAdd":"StorageCageAdd", |
| | | "Reduce":"Reduce", |
| | | "OutGlass":"OutGlass", |
| | | "number":"number", |
| | | "Import order":"Import order", |
| | | "Measure":"Measure", |
| | |
| | | |
| | | |
| | | |
| | | "ip2":"192.168.10.2", |
| | | "ip":"localhost", |
| | | "ip":"192.168.10.2", |
| | | "ip2":"localhost", |
| | | "systemTitle": "Login System", |
| | | "usernamePlaceholder": "Please enter username", |
| | | "passwordPlaceholder": "Please enter password", |
| | |
| | | "Films":"膜系", |
| | | "StorageCageAdd":"笼子玻璃添加", |
| | | "Reduce":"减少", |
| | | "OutGlass":"出片", |
| | | "number":"数量", |
| | | "Import order":"导入订单", |
| | | "Measure":"测量", |
| | |
| | | "Save":"保存", |
| | | "Select file":"选择文件", |
| | | |
| | | "ip2":"192.168.10.2", |
| | | "ip":"localhost", |
| | | "ip":"192.168.10.2", |
| | | "ip2":"localhost", |
| | | "systemTitle": "登录系统", |
| | | "usernamePlaceholder": "请输入用户名", |
| | | "passwordPlaceholder": "请输入密码", |
| | |
| | | <el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState" style="z-index: 999;" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | {{ $t('Task queue') }}</el-button> |
| | | <el-button type="primary" @click="showform(5)" :disabled="SoftEmergencyStopState" style="z-index: 999;" |
| | | |
| | | <!-- <el-button type="primary" @click="showform(5)" :disabled="SoftEmergencyStopState" style="z-index: 999;" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | {{ $t('Outing Queue') }}</el-button> |
| | | {{ $t('Outing Queue') }}</el-button> --> |
| | | |
| | | </div> |
| | | <div style="display: flex;align-items: center;overflow: hidden;"> |
| | |
| | | }}</el-button> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.number >= 1 ? false : true" |
| | | @click="AddOutGlass(scope.row.cell,scope.row.glasstype)">{{ $t('OutGlass') |
| | | }}</el-button> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.number >= 1 ? false : true" |
| | | @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 0)">{{ $t('Delete') |
| | | }}</el-button> |
| | | </template> |
| | |
| | | </el-table> |
| | | </el-dialog> |
| | | <!-- 出片队列显示表 --> |
| | | <el-dialog :visible.sync="Outqueue" :title="$t('Outing Queue')" top="5vh"> |
| | | <!-- <el-dialog :visible.sync="Outqueue" :title="$t('Outing Queue')" top="5vh"> |
| | | <el-table :data="tableData2" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy |
| | | :tree-props="{ children: 'glassinfo', hasChildren: 'hasChildren' }"> |
| | | <el-table-column prop="flowcard" :label="$t('Order')" width="150" align="center"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="state" :label="$t('Task State')" align="center"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }} |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column prop="method" :label="$t('Task Method')" align="center"> |
| | | <template slot-scope='scope'> |
| | | <div style="text-align: center;width: 105%;"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <!-- 人工匹配 --> |
| | | <el-dialog :visible.sync="StorageCageAdd" :title="$t('StorageCageAdd')" top="5vh" width="80%"> |
| | | <div style="display: flex;height: 40px;line-height: 40px;"> |
| | |
| | | Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue, |
| | | isAllowReorderings, |
| | | |
| | | UpdateStroageCageByCell, FinishTask,TerminateTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure, StartChange, deleteTasks,SaveMeasure |
| | | UpdateStroageCageByCell,AddOutGlass, FinishTask,TerminateTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure, StartChange, deleteTasks,SaveMeasure |
| | | } from "../../api/home"; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | }, |
| | | AddOutGlass(cell,glasstype) { |
| | | AddOutGlass(cell,glasstype).then(res => { |
| | | if (res.data.message == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | }else { |
| | | this.$message.error(this.$t('Operation failed')); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | //启用//理片笼禁用 |
| | | UpdateDisabled(cage, cell, disabled) { |
| | | Disabled(cage, cell, disabled).then(res => { |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 切换PLC获取二维码方式 |
| | | // 更改笼子数量 |
| | | @PostMapping("/UpdateStroageCageByCell") |
| | | public Result UpdateStroageCageByCell(Integer cell, Integer num) { |
| | | return storageCageService.UpdateStroageCageByCell(cell, num); |
| | | } |
| | | @PostMapping("/AddOutGlass") |
| | | public Result AddOutGlass(Integer cell, Integer glasstype) { |
| | | return storageCageService.AddOutGlass(cell,glasstype); |
| | | } |
| | | |
| | | |
| | | // 手动完成任务 |
| | | @PostMapping("/FinishTask") |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 指定格子出片 |
| | | public Result AddOutGlass(Integer cell,Integer glasstype) { |
| | | GlassInfo glass = albaniaMapper.SelectGlassInfo(glasstype); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(glass!=null){ |
| | | albaniaMapper.AddFinishNumber(glass.getFlowcard(),glass.getMateid(), glass.getTier()); |
| | | UpdateStroageCageByCell(cell, -1);// 玻璃数量-1 |
| | | // 增加出片队列的任务 |
| | | albaniaMapper.InsertOutTask(1, 0, cell, 2001,glass.getGlassid(), |
| | | glass.getGlasstype(), glass.getFlowcard(),glass.getMateid(),glass.getTier()); |
| | | map.put("message", "200"); |
| | | }else{ |
| | | map.put("message", "300"); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询进/出片任务 |
| | | public List<StorageTask> SelectStorageTask(int task_type) { |
| | | List<StorageTask> storageTasks = new ArrayList<>(); |
| | |
| | | } |
| | | // storageTask.setstorageCage(homeMapper.SelectStorageByCell(loadrack)); |
| | | storageTask.setstorageCage(homeMapper.SelectStorageByCellGlass(storageTask.getId())); |
| | | |
| | | |
| | | } |
| | | return storageTasks; |
| | | } |
| | |
| | | public Map StorageCageForm() { |
| | | return homeMapper.SelectMeasureWidthHeight(); |
| | | } |
| | | //手动结束任务 |
| | | |
| | | // 手动结束任务 |
| | | public Result TerminateTask(int id) { |
| | | for (int i = 1; i < 7; i++) { |
| | | int taskcont = albaniaMapper.SelectTaskcount(); // 正在进行的任务数量 |
| | |
| | | System.out.println("结束进片任务:" + storageTask.getId()); |
| | | homeMapper.FinishTask(storageTask.getId(), 2);// 完成任务 |
| | | homeMapper.DeletequeueByGlassid(storageTask.getGlasstype().toString()); |
| | | glassInfoMapper.updateGlassNumber(storageTask.getGlasstype());//减少扫描次数 |
| | | glassInfoMapper.updateGlassNumber(storageTask.getGlasstype());// 减少扫描次数 |
| | | } else { |
| | | System.out.println("结束出片任务:" + storageTask.getId()); |
| | | homeMapper.FinishTask(storageTask.getId(), 2);// 完成任务 |
| | |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | map.put("message", "200"); |
| | | }else { |
| | | } else { |
| | | map.put("message", "300"); |
| | | } |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | |
| | | glasstype = Integer.valueOf(value); |
| | | } |
| | | // |
| | | |
| | | |
| | | homeMapper.AddGlassinfo(map.get("order").toString(), glasstype, |
| | | Integer.parseInt(map.get("matching").toString()) // 需要计算 配片ID |
| | | , map.get("order").toString() + "-" + count + "" // 需要计算 玻璃ID |