Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
# Conflicts:
# Albania_Mes-ui/src/views/home/index.vue
# springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
# springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java
| | |
| | | }) |
| | | } |
| | | |
| | | export function UpdateStroageCageByCell(cell,num) { |
| | | return request({ |
| | | url: '/home/UpdateStroageCageByCell?cell='+cell+'&num='+num, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | export function FinishTask(tasktype,id) { |
| | | return request({ |
| | | url: '/home/FinishTask?tasktype='+tasktype+'&id='+id, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | export function SelectGlassInfo(width,height,thickness,films) { |
| | | return request({ |
| | | url: '/home/SelectGlassInfo?width='+width+'&height='+height+'&thickness='+thickness+'&films='+films, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | export function StorageCageAddGlass(cell,data) { |
| | | return request({ |
| | | url: '/home/StorageCageAddGlass?cell='+cell, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function ClaimTasks(flowcard,state) { |
| | | return request({ |
| | | url: '/home/ClaimTasks?flowcard='+flowcard+'&state='+state, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | export function ModeChange(flowcard,method) { |
| | | return request({ |
| | | url: '/home/ModeChange?flowcard='+flowcard+'&method='+method, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | export function UpdateQueue(data) { |
| | | return request({ |
| | | url: '/home/UpdateQueue', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | { |
| | | "Flowcard":"Flowcard", |
| | | "Glasstype":"Glasstype", |
| | | "Mode Change":"Mode Change", |
| | | "Start Task":"Start Task", |
| | | "Stop Task":"Stop Task", |
| | | "No Of Cage":"No Of Cage", |
| | | "Task State":"Task State", |
| | | "Task Method":"Task Method", |
| | | "Task Line":"Task Line", |
| | | "'No Of Cage":"'No Of Cage", |
| | | "Finish No":"Finish No", |
| | | "Mate No":"Mate No", |
| | | "Order":"Order", |
| | | "Select":"Select", |
| | | "GlassType":"GlassType", |
| | | "Films":"Films", |
| | | "StorageCageAdd":"StorageCageAdd", |
| | | "Reduce":"Reduce", |
| | | "number":"number", |
| | | "Import order":"Importorder", |
| | | "Measure":"Measure", |
| | | "StorageCage":"StorageCage", |
| | |
| | | |
| | | .occupy { |
| | | height: 100%; |
| | | width: 10%; |
| | | width: 20%; |
| | | background-color: white; |
| | | margin: 0px 8px 0px 8px; |
| | | border: 1px #EBEEF5 solid; |
| | |
| | | } |
| | | |
| | | .blocks { |
| | | background-image: url('../../img/xmjc.png'); |
| | | margin: 0 auto; |
| | | background-image: url('../../img/device.png'); |
| | | /* margin: 0 auto; */ |
| | | /* clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); */ |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 55vh; |
| | | width: 1400px; |
| | | max-width: 94vw; |
| | | background-size: 1200px 510px; |
| | | margin: 0 auto; |
| | | min-height: 118vh; |
| | | width: 1124px; |
| | | max-width: 57%; |
| | | background-size: 1050px 1400px; |
| | | margin-top: -280px; |
| | | /* width: 1660px; |
| | | max-width: 100vw; |
| | | background-size: 1660px 560px; */ |
| | |
| | | font-size: 25px; |
| | | } |
| | | |
| | | /* |
| | | @media screen and (min-width: 1900px) { |
| | | .blocks { |
| | | transform: scale(1.5, 1.05); |
| | | width: 1210px; |
| | | } |
| | | } |
| | | } */ |
| | | |
| | | .el-message-box__btns { |
| | | padding: 0px 15px 0; |
| | |
| | | <el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | {{ $t('Measure') }}</el-button> |
| | | <el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState" |
| | | <el-button type="primary" @click="showform(3)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | {{ $t('StorageCage') }}</el-button> |
| | | <el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState" |
| | | <el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | {{ $t('Task queue') }}</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table :data="this.tasklist1" border style="width: 100%"> |
| | | <el-table-column :min-width="180" prop="glassId" :label="$t('Outfeed glass barcode')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column> |
| | | <el-table-column prop="orderId" :label="$t('List No')"></el-table-column> |
| | | <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column> |
| | | <el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :label="$t('Terminate Task')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task') |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table :data="this.tasklist2" border style="width: 100%"> |
| | | <el-table-column :min-width="180" prop="glassId" :label="$t('Infeed glass barcode')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column> |
| | | <el-table-column prop="orderId" :label="$t('List No')"></el-table-column> |
| | | <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column> |
| | | <el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }} |
| | | </template> |
| | | </el-table-column> |
| | | <div style="display: flex;align-items: center;"> |
| | | <div class="blocks" style="position: relative;width: 100%;"> |
| | | |
| | | <el-table-column :label="$t('Terminate Task')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task') |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="padding: 10px;display: flex;height:85px;"> |
| | | <div v-for="item in tableData" :key="item['cageno']" class="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#{{ item['cage'] }}</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span class="biao">{{ $t('Usage') }}</span><span class="zhi">{{ item['cell'] }}%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span class="biao">{{ $t('Space (Pieces)') }}</span><span class="zhi">{{ item['state'] }}</span> |
| | | </el-col> |
| | | </div> |
| | | <div> |
| | | <div style="padding: 10px;display: flex;height:100px;"> |
| | | <div v-for="item in tableData" :key="item['cageno']" class="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#{{ item['cage'] }}</el-col> |
| | | <el-col |
| | | style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span class="biao">{{ $t('Usage') }}</span><span class="zhi">{{ item['cell'] }}%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col |
| | | style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span class="biao">{{ $t('Space (Pieces)') }}</span><span class="zhi">{{ item['state'] |
| | | }}</span> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <el-table :data="this.tasklist1" border style="width: 700px;"> |
| | | <el-table-column prop="glasstype" :label="$t('Glasstype')"></el-table-column> |
| | | <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column prop="storageCage.glassWidth" :label="$t('Width')"></el-table-column> |
| | | <el-table-column prop="storageCage.glassHeight" :label="$t('Height')"></el-table-column> |
| | | <el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column> |
| | | <el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column> |
| | | <el-table-column :min-width="100" :label="$t('Terminate Task')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="FinishTask(0, scope.row.id)">{{ $t('Complete') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table :data="this.tasklist2" border style="width: 100%"> |
| | | <el-table-column prop="glassId" :label="$t('Glasstype')"></el-table-column> |
| | | <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column prop="storageCage.glassWidth" :label="$t('Width')"></el-table-column> |
| | | <el-table-column prop="storageCage.glassHeight" :label="$t('Height')"></el-table-column> |
| | | <el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column> |
| | | <el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column> |
| | | |
| | | <el-table-column :min-width="100" :label="$t('Terminate Task')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="FinishTask(1, scope.row.id)">{{ $t('Complete') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </el-main> |
| | | <el-dialog :visible.sync="Importorder" :title="$t('Import order')" |
| | | top="5vh"> |
| | | <el-dialog :visible.sync="Importorder" :title="$t('Import order')" top="5vh"> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="Measure" :title="$t('Measure')" top="5vh"><!--测量页面--> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="StorageCage" :title="$t('StorageCage')" |
| | | top="5vh"> |
| | | <el-dialog :visible.sync="StorageCage" :title="$t('StorageCage')" top="5vh"> |
| | | <el-table :data="this.StorageCageInfo" :height="700" border style="width: 100%;overflow: auto;"> |
| | | <el-table-column :min-width="50" prop="cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column :min-width="145" prop="glassId" :label="$t('Barcode')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="height" :label="$t('Height')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="cage" :label="$t('Cage No')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="cell" :label="$t('Slot No')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="glasstype" :label="$t('GlassType')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="glassWidth" :label="$t('Width')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="glassHeight" :label="$t('Height')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="thickness" :label="$t('Thickness')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="number" :label="$t('number')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column> |
| | | <el-table-column :min-width="250" :label="$t('Operate')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.state == 1 ? false : true" |
| | | @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)"> |
| | | {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.glassId != null ? true : false" |
| | | @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add') |
| | | :disabled="(scope.row.width < scope.row.glassWidth + 100 ? true : false)" |
| | | @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 1)">{{ $t('Add') |
| | | }} |
| | | </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, -1)">{{ $t('Reduce') |
| | | }}</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-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="Taskqueue" :title="$t('Task queue')" |
| | | top="5vh"> |
| | | |
| | | <el-dialog :visible.sync="Taskqueue" :title="$t('Task queue')" top="5vh"> |
| | | <el-table :data="tableData1" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy |
| | | default-expand-all :tree-props="{ children: 'glassinfo', hasChildren: 'hasChildren' }"> |
| | | <el-table-column prop="flowcard" :label="$t('Order')"> |
| | | </el-table-column> |
| | | <el-table-column prop="glasstype" :label="$t('GlassType')"> |
| | | </el-table-column> |
| | | <el-table-column prop="number" :label="$t('Order No')"> |
| | | </el-table-column> |
| | | <el-table-column prop="" :label="$t('No Of Cage')"> |
| | | </el-table-column> |
| | | <el-table-column prop="finishnumber" :label="$t('Finish No')"> |
| | | </el-table-column> |
| | | <el-table-column prop="mateid" :label="$t('Mate No')"> |
| | | </el-table-column> |
| | | <el-table-column prop="films" :label="$t('Films')"> |
| | | </el-table-column> |
| | | <el-table-column prop="thickness" :label="$t('Thickness')"> |
| | | </el-table-column> |
| | | <el-table-column prop="width" :label="$t('Width')"> |
| | | </el-table-column> |
| | | <el-table-column prop="height" :label="$t('Height')"> |
| | | </el-table-column> |
| | | <el-table-column prop="state" :label="$t('Task State')"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.state == 0 ? $t('Start') : $t('Finished') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="method" :label="$t('Task Method')"> |
| | | </el-table-column> |
| | | <el-table-column prop="line" :label="$t('Task Line')"> |
| | | </el-table-column> |
| | | <el-table-column width="220" :label="$t('Operate')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | v-show="scope.row.state >= 0 ? true : false" |
| | | @click="ClaimTasks(scope.row.flowcard, scope.row.state)"> |
| | | {{ scope.row.status == '0' ? $t('Start Task') : $t('Stop Task') }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | v-show="scope.row.state >= 0 ? true : false" |
| | | @click="ModeChange(scope.row.flowcard, scope.row.method)"> |
| | | {{ $t('Mode Change') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog :visible.sync="StorageCageAdd" :title="$t('StorageCageAdd')" top="5vh" width="80%"> |
| | | <div style="display: flex;height: 40px;line-height: 40px;"> |
| | | <label for="">{{ $t('Width') }}</label> |
| | | <el-input v-model="StorageCageForm.width" autocomplete="off" style="width:15%;" /> |
| | | <label for="">{{ $t('Height') }}</label> |
| | | <el-input v-model="StorageCageForm.height" autocomplete="off" style="width:15%;" /> |
| | | <label for="">{{ $t('Thickness') }}</label> |
| | | <el-input v-model="StorageCageForm.thickness" autocomplete="off" style="width:15%;" /> |
| | | <label for="">{{ $t('Films') }}</label> |
| | | <el-input v-model="StorageCageForm.films" autocomplete="off" style="width:15%;" /> |
| | | <el-button @click="SelectGlassInfo()" type="primary"> |
| | | {{ $t('Select') }}</el-button> |
| | | </div> |
| | | <el-table :data="this.StorageCageAddInfo" :height="700" border style="width: 100%;overflow: auto;"> |
| | | <el-table-column prop="flowcard" :label="$t('Flowcard')"></el-table-column> |
| | | <el-table-column prop="glasstype" :label="$t('GlassType')"></el-table-column> |
| | | <el-table-column prop="width" :label="$t('Width')"></el-table-column> |
| | | <el-table-column prop="height" :label="$t('Height')"></el-table-column> |
| | | <el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column> |
| | | <el-table-column prop="films" :label="$t('Films')"></el-table-column> |
| | | <el-table-column :label="$t('Operate')"> |
| | | <template slot-scope='scope'> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="StorageCageAddGlass(scope.$index)"> |
| | | {{ $t('Add') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | </el-container> |
| | | </template> |
| | | <script> |
| | | |
| | | import { |
| | | home, home2, UpdateTask, SelectCageInfo, DeleteByGlassID, |
| | | SelectPassword, Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue, |
| | | isAllowReorderings |
| | | home, home2, SelectCageInfo, |
| | | Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue, |
| | | isAllowReorderings, |
| | | |
| | | UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue |
| | | } from "../../api/home"; |
| | | |
| | | |
| | |
| | | name: "Home", |
| | | data() { |
| | | return { |
| | | tableData1:[], |
| | | Measuermode: false, |
| | | confirm1: false, |
| | | confirm2: false, |
| | | insertcage: 0, |
| | |
| | | dialogFormVisible: false, |
| | | dialogFormVisible1: false, |
| | | dialogFormVisible2: false, |
| | | Importorder:false, |
| | | Measure:false, |
| | | StorageCage:false, |
| | | Taskqueue:false, |
| | | StorageCageInfo:[], |
| | | TaskqueueInfo:[], |
| | | Importorder: false, |
| | | Measure: false, |
| | | StorageCage: false, |
| | | Taskqueue: false, |
| | | StorageCageAdd: false, |
| | | StorageCageInfo: [], |
| | | StorageCageForm: { |
| | | width: "", |
| | | height: "", |
| | | thickness: "", |
| | | films: "" |
| | | }, |
| | | StorageCageAddInfo: [], |
| | | TaskqueueInfo: [], |
| | | cell: "", |
| | | form1: {}, |
| | | form2: {}, |
| | | form3: {}, |
| | |
| | | } |
| | | , |
| | | methods: { |
| | | showform(i){ |
| | | if(i==1){ |
| | | this.Importorder=true; |
| | | }else if(i==2){ |
| | | this.Measure=true; |
| | | }else if(i==3){ |
| | | this.StorageCage=true; |
| | | }else if(i==4){ |
| | | this.Taskqueue=true; |
| | | showform(i) { |
| | | if (i == 1) { |
| | | this.Importorder = true; |
| | | } else if (i == 2) { |
| | | this.Measure = true; |
| | | } else if (i == 3) { |
| | | this.StorageCage = true; |
| | | } else if (i == 4) { |
| | | this.Taskqueue = true; |
| | | } |
| | | }, |
| | | init() { |
| | |
| | | this.cagelist2 = obj.cagelist2[0]; |
| | | this.cagelist3 = obj.cagelist3[0]; |
| | | this.cagelist4 = obj.cagelist4[0]; |
| | | this.tasklist1 = obj.tasklist1[0]; |
| | | this.tasklist2 = obj.tasklist2[0]; |
| | | this.tasklist2 = obj.StoragTaskeTaskFeed[0]; |
| | | this.tasklist1 = obj.StoragTaskeTaskOut[0]; |
| | | console.log(this.tasklist1); |
| | | this.alarm = obj.alarmmg[0]; |
| | | |
| | | |
| | | this.tableData1 = obj.OrderTask[0]; |
| | | |
| | | |
| | | //是否允许出片 |
| | |
| | | this.cageinfo = res.data.cageinfo; |
| | | }); |
| | | } |
| | | if(obj.StorageCageInfo!=null){ |
| | | this.StorageCageInfo=obj.StorageCageInfo[0]; |
| | | console.log(this.StorageCageInfo); |
| | | if (obj.StorageCageInfo != null) { |
| | | this.StorageCageInfo = obj.StorageCageInfo[0]; |
| | | } |
| | | this.$forceUpdate(); |
| | | |
| | |
| | | this.cagelist3 = res.data.list3; |
| | | this.cagelist4 = res.data.list4; |
| | | }); |
| | | //加载确认密码 |
| | | SelectPassword().then(res => { |
| | | this.password = res.data.password; |
| | | }); |
| | | }, |
| | | |
| | | //结束进/出片任务 |
| | | endtask(type, glassid, cell) { |
| | | this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), { |
| | | inputType: 'password', |
| | | inputPlaceholder: this.$t('Please enter the password'), |
| | | confirmButtonText: this.$t('Yes'), |
| | | cancelButtonText: this.$t('No'), |
| | | type: 'warning' |
| | | }).then(({ value }) => { |
| | | if (this.password == value) { |
| | | UpdateTask(type, glassid, cell).then(res => { |
| | | if (res.data.message3 == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$message.error(this.$t('Password error'));//密码错误 |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: this.$t('Operation canceled') |
| | | }); |
| | | }); |
| | | }, |
| | | //删除理片笼玻璃 |
| | | deleteglass(glassid, state) { |
| | | this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), { |
| | | inputType: 'password', |
| | | inputPlaceholder: this.$t('Please enter the password'), |
| | | confirmButtonText: this.$t('Yes'), |
| | | cancelButtonText: this.$t('No'), |
| | | type: 'warning' |
| | | }).then(({ value }) => { |
| | | if (this.password == value) { |
| | | if (state == 1) { |
| | | DeleteByGlassID(glassid).then(res => { |
| | | if (res.data.message3 == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$message.error(this.$t('No delete allowed')); |
| | | //添加理片笼玻璃 |
| | | StorageCageAddGlass(index) { |
| | | if (this.Measuermode == true) { |
| | | StorageCageAddGlass(this.cell, this.StorageCageAddInfo[index]).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | } else { |
| | | this.$message.error(this.$t('Password error'));//密码错误 |
| | | } |
| | | |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: this.$t('Operation canceled') |
| | | }) |
| | | } else { |
| | | UpdateQueue(this.StorageCageAddInfo[index]).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | //领取/暂停任务 |
| | | ClaimTasks(flowcard, state) { |
| | | console.log(flowcard, state); |
| | | ClaimTasks(flowcard, state).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | }, |
| | | //修改出片方式 |
| | | ModeChange(flowcard, method) { |
| | | ModeChange(flowcard, method).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | }, |
| | | //查询玻璃信息 |
| | | SelectGlassInfo() { |
| | | SelectGlassInfo(this.StorageCageForm.width, this.StorageCageForm.height, this.StorageCageForm.thickness, this.StorageCageForm.films).then(res => { |
| | | this.StorageCageAddInfo = res.data.StorageCageAddInfo; |
| | | }) |
| | | }, |
| | | //完成进/出片任务 |
| | | FinishTask(tasktype, id) { |
| | | FinishTask(tasktype, id).then(res => { |
| | | if (res.data.message3 == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | }, |
| | | //修改理片笼玻璃信息 |
| | | UpdateStroageCageByCell(cell, nownum, num) { |
| | | if (nownum == null && num == 1) { |
| | | this.StorageCageAdd = true; |
| | | this.cell = cell; |
| | | } else { |
| | | if (nownum + num == 0) { |
| | | num = 0; |
| | | } |
| | | UpdateStroageCageByCell(cell, num).then(res => { |
| | | if (res.data.message3 == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | //启用//理片笼禁用 |
| | | UpdateDisabled(cage, cell, disabled) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | |
| | | //改变每页容纳的数据量 |
| | | handleSizeChange: function (size) { |
| | | this.pagesize = size; |
| | |
| | | handleCurrentChanges: function (currentPage) { |
| | | this.currentPages = currentPage; |
| | | }, |
| | | |
| | | |
| | | //是否允许出片队列排序 |
| | | isAllowReorderings() { |
| | | isAllowReorderings(!this.isAllowReordering, this.OutSlice).then(res => { |
| | |
| | | ManualMatching() { |
| | | console.log(11111111); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | // \\ TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | // if (S7control.getinstance().CheckConnected() == false) { |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class); |
| | | albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class); |
| | | |
| | | //读取DB105区文件 |
| | | spianService.selectAll(albaniaMapper.SelectGlass()); |
| | | //读取DB14区文件 |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | //读106 |
| | | //PlcParameterObject plcread=PLCAutoMes.PlcReadObject; |
| | | //读103 |
| | | |
| | | |
| | | String OutRequest=plcmes.getPlcParameter("OutRequest").getValue();//出片请求一线 |
| | | String OutActivate=plcmes.getPlcParameter("OutActivate").getValue();//出片请求二线 |
| | | String AddRequest=plcmes.getPlcParameter("AddRequest").getValue();//进片请求 |
| | | String CarRequest=plcmes.getPlcParameter("CatReque").getValue();//运送车请求 |
| | | String Tastoverid=plcmes.getPlcParameter("Tastoverid").getValue();//任务完成 |
| | | String glassid=plcmes.getPlcParameter("glassid").getValue();//玻璃id |
| | | String ExportTOMES1=plcmes.getPlcParameter("ExportTOMES1").getValue();//出片请求一线 |
| | | String ExportToMES2=plcmes.getPlcParameter("ExportToMES2").getValue();//出片请求二线 |
| | | String PLCToMES=plcmes.getPlcParameter("PLCToMES").getValue();//进片请求 |
| | | String B01State=plcmes.getPlcParameter("B01State").getValue();//运送车请求 |
| | | String TastState=plcmes.getPlcParameter("MESToPLCStatus1").getValue();//任务完成 |
| | | |
| | | |
| | | //调用出片任务 |
| | | if (OutActivate.equals("1") == false&&CarRequest.equals("0")==true) { |
| | | //一号线请求 |
| | | if (ExportTOMES1.equals("1") == true&&B01State.equals("0")==true) { |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1); |
| | | spianService.selectout(glassid); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(1); |
| | | } |
| | | //调用进片任务 |
| | | if(AddRequest.equals("1")==true&&CarRequest.equals("0")==true){ |
| | | //二线号请求时 |
| | | if (ExportToMES2.equals("1") == true&&B01State.equals("0")==true) { |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(2); |
| | | } |
| | | //进片请求时 |
| | | if(PLCToMES.equals("1")==true&&B01State.equals("0")==true){ |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | |
| | | spianService.selectAll(albaniaMapper.SelectGlass()); |
| | | } |
| | | |
| | | |
| | | ///////////// 进片任务 |
| | | //任务完成时 |
| | | if(TastState.equals("1")==true){ |
| | | |
| | | //完成确认字 |
| | | for(int i=1;i<7;i++){ |
| | | String Tastover=plcmes.getPlcParameter("IDStatus"+i).getValue();//依次获取任务类型 |
| | | String Glassid=plcmes.getPlcParameter("MESID"+i).getValue();//依次获取任务类型 |
| | | if(Tastover.equals("1")){ |
| | | |
| | | // String B01backs = plcread.getPlcParameter("B01CompleteTheReport").getValue();// b01汇报 |
| | | // String B02backs = plcread.getPlcParameter("B02CompleteTheReport").getValue();// b02汇报 |
| | | |
| | | // String B01glassid = plcstate.getPlcParameter("B01ID1").getValue();// BO1的玻璃id |
| | | // String B02glassid = plcstate.getPlcParameter("B02ID1").getValue();// B02的玻璃id |
| | | //调用完成任务 Glassid |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCStatus"+i).getAddress(), (short) 1);//完成确认字 |
| | | } |
| | | } |
| | | } |
| | | |
| | | // // 当进片小车完成任务时 |
| | | // if (B01backs.equals("1") == true) { |
| | | // // 判断是否汇报正确的id |
| | | // int HB = spianMapper.SelectHB(B01glassid.toString()); |
| | | // if (HB > 0) { |
| | | // // 恢复B01小车应答改为1 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1); |
| | | // String yingda =plcmes.getPlcParameter("B01report").getValue();// b01汇报 |
| | | // if (yingda.equals("1")) { |
| | | // spianService.overtask(B01glassid.toString());// 完成任务 |
| | | // } |
| | | // } |
| | | |
| | | // }else{ |
| | | // // 恢复B01小车应答改为0 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 0); |
| | | // } |
| | | |
| | | // // 当出片小车完成任务时 |
| | | // if (B02backs.equals("1") == true) { |
| | | // // 判断是否汇报正确的id |
| | | // int HB = spianMapper.SelectHB(B02glassid); |
| | | // if (HB > 0) { |
| | | // // 恢复B02小车应答改为1 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 1); |
| | | // String yingda =plcmes.getPlcParameter("B01report").getValue();// b02应答 |
| | | // if (yingda.equals("1") == true) { |
| | | // spianService.overtask(B02glassid);// 完成任务 |
| | | // } |
| | | // } |
| | | // }else{ |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 0); |
| | | // } |
| | | |
| | | |
| | | // // 获取DO1数据 |
| | | // String Do1ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清 |
| | | // // 获取DO2数据 |
| | | // String Do2ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清 |
| | | |
| | | |
| | | // int questate = spianMapper.Selectquecount(Do1ID.toString());// 判断扫码位是否有玻璃已确认 |
| | | // // queueid1.toString().isEmpty() |
| | | // north_glass_buffer1 glass1 = spianMapper.selectGlass(Do1ID);// D01的玻璃信息 |
| | | // north_glass_buffer1 glass2 = spianMapper.selectGlass(Do2ID);// D02玻璃信息 |
| | | // // 当扫码位玻璃id为空时 宽度为0 |
| | | // if (Do1ID != null && questate == 0) { |
| | | // // 写入D01的数据到上片队列表 |
| | | // if (glass1 == null) { // 当没有值时传空 |
| | | // spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1); |
| | | // } else { |
| | | // spianMapper.Updatequeue(Do1ID.toString(), glass1.getordernumber(), glass1.getlistnumber(), |
| | | // glass1.getboxnumber(), 0, glass1.getglasslengthmm().toString(), glass1.getglassheightmm().toString(), |
| | | // glass1.getglasslength().toString(), glass1.getglassheight().toString(), 1); |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // if (Do2ID != null) { |
| | | // // 写入D02的数据到上片队列表 |
| | | // if (glass2 == null) { |
| | | // spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2); |
| | | // } else { |
| | | // spianMapper.Updatequeue(Do2ID.toString(), glass2.getordernumber(), glass2.getlistnumber(), |
| | | // glass2.getboxnumber(), 0, glass2.getglasslengthmm().toString(), glass2.getglassheightmm().toString(), |
| | | // glass2.getglasslength().toString(), glass2.getglassheight().toString(), 2); |
| | | // spianMapper.overqueue2(Do2ID.toString(), 0, 1);// 更改扫码位任务表的状态为0 |
| | | // S7control.getinstance().WriteWord("DB105.16", (short) 0);// 关闭任务启动 |
| | | // } |
| | | |
| | | // } |
| | | |
| | | |
| | | // 查询数据库 |
| | | // 推送到前端 |
| | | |
| | |
| | | package com.example.springboot.component; |
| | | import cn.hutool.json.JSONObject; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import com.example.springboot.service.*; |
| | |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import com.example.springboot.entity.FlowCard; |
| | | import com.example.springboot.entity.FlowCard; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.MeasureSetting; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | |
| | | private OutSliceServive outSliceServive; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | private North_Glass_Buffer1Service north_Glass_Buffer1Service; |
| | | private JdbcConnections dbserve; |
| | | |
| | | // 出片队列是否允许出片 |
| | | public static Boolean isAllowQueue = true; |
| | |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class); |
| | | north_Glass_Buffer1Service = WebSocketServer.applicationContext |
| | | .getBean(North_Glass_Buffer1Service.class); |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | |
| | | // 笼子使用情况 |
| | | List<StorageCage> tableData = homeMapper.selectAll(); |
| | |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | |
| | | // 获取扫码位与上片位玻璃信息 |
| | | Queue form2 = homeMapper.GetQueueInfo(2); |
| | | Queue form3 = homeMapper.GetQueueInfo(1); |
| | | if (form2.getglassId() != null && form2.getglassId() != "") { |
| | | jsonObject.append("form2", form2); |
| | | } |
| | | if (form3.getglassId() != null && form3.getglassId() != "") { |
| | | jsonObject.append("form3", form3); |
| | | } |
| | | |
| | | // 获取出片队列信息 |
| | | List<Out_slice> listoutslice = outSliceServive.SelectProductionqueue(); |
| | | jsonObject.append("listoutslice", listoutslice); |
| | |
| | | // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14)); |
| | | |
| | | |
| | | //查询理片笼信息 |
| | | List<StorageCage> StorageCageInfo = storageCageService.SelectStorageCageInfo(); |
| | | jsonObject.append("StorageCageInfo", StorageCageInfo); |
| | | |
| | | //查询当前进片任务 |
| | | List<StorageTask> StoragTaskeTaskFeed = storageCageService.SelectStorageTask(0); |
| | | jsonObject.append("StoragTaskeTaskFeed", StoragTaskeTaskFeed); |
| | | |
| | | //查询当前出片任务 |
| | | List<StorageTask> StoragTaskeTaskOut = storageCageService.SelectStorageTask(1); |
| | | jsonObject.append("StoragTaskeTaskOut", StoragTaskeTaskOut); |
| | | |
| | | //查询当前订单任务 |
| | | List<FlowCard> OrderTask = storageCageService.SelectOrderTask(); |
| | | jsonObject.append("OrderTask", OrderTask); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home"); |
| | | if (sendwServer != null) { |
| | |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | System.out.println("启动完成"); |
| | | |
| | | // new PlcHold().start(); |
| | | //new PlcHoldNew().start(); |
| | | // new PlcHoldNew().start(); |
| | | // new PLCAutoMes().start(); |
| | | |
| | | new Plchome().start(); |
| | |
| | | import com.example.springboot.component.Plchome; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 切换PLC获取二维码方式 |
| | | @PostMapping("/UpdateStroageCageByCell") |
| | | public Result UpdateStroageCageByCell(Integer cell,Integer num) { |
| | | return storageCageService.UpdateStroageCageByCell(cell,num); |
| | | } |
| | | |
| | | //手动完成任务 |
| | | @PostMapping("/FinishTask") |
| | | public Result FinishTask(Integer tasktype,Integer id) { |
| | | return storageCageService.FinishTask(tasktype,id); |
| | | } |
| | | |
| | | //查询玻璃信息 |
| | | @PostMapping("/SelectGlassInfo") |
| | | public Result SelectGlassInfo(String width,String height,String thickness,String films) { |
| | | return storageCageService.SelectGlassInfo(width,height,thickness,films); |
| | | } |
| | | |
| | | //添加玻璃信息到笼子 |
| | | @PostMapping("/StorageCageAddGlass") |
| | | public Result StorageCageAddGlass(String cell,@RequestBody GlassInfo glassInfo) { |
| | | return storageCageService.StorageCageAddGlass(cell,glassInfo); |
| | | } |
| | | |
| | | //领取/暂停任务 |
| | | @PostMapping("/ClaimTasks") |
| | | public Result ClaimTasks(String flowcard,Integer state) { |
| | | return storageCageService.ClaimTasks(flowcard,state); |
| | | } |
| | | |
| | | //修改出片方式 |
| | | @PostMapping("/ModeChange") |
| | | public Result ModeChange(String flowcard,Integer method) { |
| | | return storageCageService.ModeChange(flowcard,method); |
| | | } |
| | | |
| | | //添加玻璃信息到测量信息 |
| | | @PostMapping("/UpdateQueue") |
| | | public Result UpdateQueue(@RequestBody GlassInfo glassInfo) { |
| | | return storageCageService.UpdateQueue(glassInfo); |
| | | } |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | import java.util.Date; |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | |
| | | |
| | | @Data |
| | | @TableName("`flowcard`") |
| | | public class flowcard { |
| | | public class FlowCard { |
| | | private Integer id;// 自增id |
| | | private String flowcard;// 流程卡id |
| | | private Integer number;// 玻璃数量 |
| | | private Integer line;// 任务路线 |
| | | private Integer state;// 状态 |
| | | |
| | | private Integer method;// 出片方式 |
| | | private Date starttime;// 任务领取时间 |
| | | |
| | | public List<GlassInfo> glassinfo;// 玻璃信息 |
| | | |
| | | public void setglassinfo(List<GlassInfo> glassinfo) { |
| | | this.glassinfo = glassinfo; |
| | | } |
| | | |
| | | public List<GlassInfo> getglassinfo() { |
| | | return glassinfo; |
| | | } |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | |
| | | private Double thickness;// 厚 |
| | | private Integer number;// 数量 |
| | | private Integer finishnumber;// 完成数量 |
| | | |
| | | } |
| | |
| | | */ |
| | | private Double glassHeightMm; |
| | | /** |
| | | * 编号 |
| | | * 厚度 |
| | | */ |
| | | private String thickness; |
| | | private Integer thickness; |
| | | /** |
| | | * 箱子号 |
| | | * 膜系 |
| | | */ |
| | | private String films; |
| | | /** |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | |
| | | //出片任务表 |
| | | |
| | | public class StorageTask{ |
| | | private Integer id;//自序 |
| | | private String taskType;//类型 |
| | |
| | | private String shelfRack;//起始位 |
| | | private String loadrack;//目标位 |
| | | private Integer count;//玻璃数量 |
| | | |
| | | private Integer glasstype;//玻璃类型 |
| | | private Integer flowcard;//流程卡 |
| | | private Integer mateid;//配片id |
| | | private Integer tier;//片序 |
| | | |
| | | private StorageCage storageCage; |
| | | public void setstorageCage(StorageCage storageCage) { |
| | | this.storageCage = storageCage; |
| | | } |
| | | |
| | | public StorageCage getstorageCage() { |
| | | return storageCage; |
| | | } |
| | | |
| | | public Integer id() { |
| | | return id; |
| | |
| | | this.loadrack = loadrack; |
| | | } |
| | | |
| | | |
| | | public Integer getGlasstype() { |
| | | return glasstype; |
| | | } |
| | | |
| | | public void setGlasstype(Integer glasstype) { |
| | | this.glasstype = glasstype; |
| | | } |
| | | public Integer getFlowcard() { |
| | | return flowcard; |
| | | } |
| | | |
| | | public void setFlowcard(Integer flowcard) { |
| | | this.flowcard = flowcard; |
| | | } public Integer getMateid() { |
| | | return mateid; |
| | | } |
| | | |
| | | public void setMateid(Integer mateid) { |
| | | this.mateid = mateid; |
| | | } |
| | | public Integer geTier() { |
| | | return tier; |
| | | } |
| | | |
| | | public void setTier(Integer tier) { |
| | | this.tier = tier; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | import java.util.Date; |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | |
| | | |
| | | @Data |
| | | @TableName("`flowcard`") |
| | | public class flowcard { |
| | | public class FlowCard { |
| | | private Integer id;// 自增id |
| | | private String flowcard;// 流程卡id |
| | | private Integer number;// 玻璃数量 |
| | | private Integer line;// 任务路线 |
| | | private Integer state;// 状态 |
| | | |
| | | private Integer method;// 出片方式 |
| | | private Date starttime;// 任务领取时间 |
| | | |
| | | public List<GlassInfo> glassinfo;// 玻璃信息 |
| | | |
| | | public void setglassinfo(List<GlassInfo> glassinfo) { |
| | | this.glassinfo = glassinfo; |
| | | } |
| | | |
| | | public List<GlassInfo> getglassinfo() { |
| | | return glassinfo; |
| | | } |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | |
| | | private Double thickness;// 厚 |
| | | private Integer number;// 数量 |
| | | private Integer finishnumber;// 完成数量 |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.StorageCage; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AlbaniaMapper { |
| | | //判断笼内是否有合适的类型空格 |
| | | @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} order by id limit 1") |
| | | @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 order by id limit 1") |
| | | int SelectCage(int glasstype,Double width,int widths); |
| | | //判断笼内没有玻璃的空格 |
| | | @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} order by id limit 1") |
| | |
| | | @Update("update storage_cage set number=number-1,width=width+glasswidth where id=#{id}") |
| | | void UpdateCageNumberOut(int id); |
| | | //增加任务记录 |
| | | @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,count,finsh_time) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count},#{qidong});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count,int qidong); |
| | | @Insert("INSERT INTO `albania`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,glasstype,flowcard,mateid,tier) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{glasstype},#{flowcard},#{mateid},#{tier});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int glasstype,String flowcard,int mateid,int tier); |
| | | //新增一条笼子数据 |
| | | @Update("UPDATE `albania`.`storage_cage` SET `glass_id` =#{glassid}, `width` =width-#{glasswidth}, `glasswidth` =#{glasswidth}, `glassheight` =#{glassheight}, `glasswidthmm` =#{glasswidthmm}, `glassheightmm` = #{glassheightmm}, `state` = #{state}, `glasstype` = #{glasstype}, `number` = #{number} WHERE `id` =#{id};") |
| | | void AddCage(int id,String glassid,Double glasswidth,Double glassheight,Double glasswidthmm,Double glassheightmm,int state,int glasstype,int number); |
| | | //获取进片数据 |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where glasstype=1") |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where state=0 limit 1") |
| | | GlassInfo SelectGlass(); |
| | | //一号线查询任务 |
| | | @Select("select * from v_cagerelease1 where mateid not in(select mateid from v_cagerelease1 where surplus=0 group by mateid);") |
| | | GlassInfo SelectOutGlass1(); |
| | | //二号线查询任务 |
| | | @Select("select * from v_cagerelease2 where mateid not in(select mateid from v_cagerelease2 where surplus=0 group by mateid)LIMIT 1;") |
| | | GlassInfo SelectOutGlass2(); |
| | | //流程卡任务查询 |
| | | @Select("select G.flowcard,G.glasstype,G.number,G.mateid,G.tier,G.starttime,G.finishnumber,IF((G.number-G.finishnumber-ku.KuCount)<0,G.number,ku.KuCount) as 'surplus',G.totaltier as id from (select Gfd.flowcard,Ggf.glasstype,Ggf.number,Ggf.mateid,Ggf.tier,Ggf.finishnumber,Gfd.starttime,Gfd.totaltier from flowcard as Gfd LEFT JOIN glassinfo as Ggf on Gfd.flowcard=Ggf.flowcard where Gfd.state=1 and Gfd.line=#{line}) as G left join (select glasstype,sum(number) AS KuCount from storage_cage where flowcard is not null group by glasstype) as ku on G.glasstype=ku.glasstype where G.mateid not in(select mateid from v_cagerelease1 where surplus=0 group by mateid)order by `g`.`starttime`,`g`.`mateid`,`g`.`finishnumber`,`g`.`tier`LIMIT 1;") |
| | | GlassInfo SelectOutGlass(int line); |
| | | //获取该类型在库存的位置 |
| | | @Select("select * from storage_cage where glasstype=#{glasstype} and number>0 limit 1") |
| | | StorageCage SelectCageGlass(int glasstype); |
| | | //发送出片后增加已发数量 |
| | | @Update("update glassinfo set finishnumber=finishnumber+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{tier};") |
| | | void AddFinishNumber(String flowcard,int mateid,int tier); |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.FlowCard; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.entity.alarmmg; |
| | |
| | | @Select("select dianqimima from user where id=1") |
| | | String SelectPassword(); |
| | | |
| | | //根据玻璃id查询理片笼信息 |
| | | @Select("select * from storage_cage where glass_id=#{glassid}") |
| | | StorageCage SelectGlassInfo(String glassid); |
| | | // //根据玻璃id查询理片笼信息 |
| | | // @Select("select * from storage_cage where glass_id=#{glassid}") |
| | | // StorageCage SelectGlassInfo(String glassid); |
| | | |
| | | //根据玻璃id查询理片笼信息 |
| | | @Select("select * from storage_cage where glass_id=#{glassid}") |
| | |
| | | //查询理片笼内信息 |
| | | @Select("select * from storage_cage") |
| | | List<StorageCage> SelectStorageCageInfo(); |
| | | |
| | | //删除格子内玻璃信息 |
| | | @Update("update storage_cage set width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}") |
| | | void DeleteStroageCageByCell(Integer cell); |
| | | |
| | | //修改格子玻璃数量 |
| | | @Update("update storage_cage set number=number+#{num} where cell=#{cell}") |
| | | void updateStroageCageByCell(Integer cell, Integer num); |
| | | |
| | | //计算格子内剩余宽度 |
| | | @Update("update storage_cage set width=5000-(glasswidth+100)*number where cell=#{cell}") |
| | | void UpdateStroageCageWidthByCell(Integer cell); |
| | | |
| | | //根据任务类型获取任务 |
| | | @Select("select * from storage_task where task_type=#{task_type} and task_state=0") |
| | | List<StorageTask> SelectStorageTask(int task_type); |
| | | |
| | | //根据id任务 |
| | | @Select("select * from storage_task where id=#{id}") |
| | | StorageTask SelectStorageTaskById(int id); |
| | | |
| | | //根据格子查询玻璃信息 |
| | | @Select("select * from storage_cage where cell=#{cell}") |
| | | StorageCage SelectStorageByCell(String cell); |
| | | |
| | | //手动完成任务 |
| | | @Select("update storage_task set task_state=1 where id=1429") |
| | | void FinishTask(Integer id); |
| | | |
| | | @Select("select gi.* from glassinfo gi inner join flowcard fc on gi.flowcard=fc.flowcard where fc.state!=2 and position(#{width} in gi.width) and position(#{height} in gi.height) and position(#{thickness} in gi.thickness) and position(#{films} in gi.films) group by gi.id") |
| | | List<GlassInfo> SelectGlassInfo(String width,String height,String thickness,String films); |
| | | |
| | | @Update("update storage_cage set glasstype=#{glassInfo.glasstype},glasswidth=#{glassInfo.width},glassheight=#{glassInfo.height},thickness=#{glassInfo.thickness},films=#{glassInfo.films},number=0 where cell=#{cell}") |
| | | void StorageCageAddGlass(String cell, GlassInfo glassInfo); |
| | | |
| | | @Select("select * from flowcard where state!=2") |
| | | List<FlowCard> SelectOrderTask(); |
| | | |
| | | @Select("select * from glassinfo where flowcard=#{flowcard} order by mateid,tier") |
| | | List<GlassInfo> SelectOrderView(String flowcard); |
| | | |
| | | @Update("update flowcard set state=#{state} where flowcard=#{flowcard}") |
| | | void ClaimTasks(String flowcard, int state); |
| | | |
| | | @Update("update flowcard set method=#{method} where flowcard=#{flowcard}") |
| | | void ModeChange(String flowcard, int method); |
| | | |
| | | @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype} where state=0") |
| | | void UpdateQueue(String flowcard,double width,double height,Integer glasstype); |
| | | |
| | | @Update("update glassinfo set finishnumber=finishnumber+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}") |
| | | void AddGlassNo(Integer flowcard, Integer mateid, Integer geTier); |
| | | |
| | | |
| | | } |
| | |
| | | ids = cages1.getId();// 数据库ID |
| | | tiers = cages1.getTier();// 内外片 |
| | | cells = cages1.getCell();// 格子号 |
| | | prcid = cages1.getPrcId();// 传给prc的目标地id |
| | | //prcid = cages1.getPrcId();// 传给prc的目标地id |
| | | width = cages1.getWidth();// 格子剩余宽度 |
| | | widths = glasslist.getglasslengthmm(); |
| | | |
| | | // 执行进片 |
| | | datas.add((short) 1000);// 起始位置 |
| | | datas.add((short) prcid);// 目标位置 |
| | | datas.add((short) 1);// 目标位置 |
| | | datas.add((short) widths);// 进片玻璃宽 |
| | | datas.add((short) prctier); // 玻璃数 |
| | | datas.add((short) 1);// 任务启动 |
| | |
| | | int cage = cageout.getCage(); // 储存出片位置,笼子格子几号玻璃 |
| | | int cell = cageout.getCell();// 出片格号 |
| | | int tier = cageout.getTier();// 出片内外片 |
| | | int prcid = cageout.getPrcId();// prcid |
| | | //int prcid = cageout.getPrcId();// prcid |
| | | int prcid2; |
| | | int ids; |
| | | int cages; |
| | |
| | | int state = spianMapper.selectGlassState(cage, cell);// 获取格子数量 |
| | | // 判断玻璃可直接出片时 |
| | | // 修改数据库笼子表(出片) |
| | | datas.add((short) prcid); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1000); |
| | | datas.add((short) state); |
| | | datas.add((short) 1); |
| | |
| | | // 判断内片是否需要调拨 |
| | | if (state == 1) { |
| | | // spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3); |
| | | datas.add((short) prcid); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1000); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | |
| | | return (300); |
| | | } |
| | | // 获取调拨位置进行调拨 |
| | | prcid2 = cagecell.getPrcId();// 调拨目标位PRCID |
| | | //prcid2 = cagecell.getPrcId();// 调拨目标位PRCID |
| | | ids = cagecell.getId();// 调拨目标位ID |
| | | cages = cagecell.getCage();// 调拨目标位笼子 |
| | | cells = cagecell.getCell();// 调拨目标位格子 |
| | | |
| | | // 填入调拨数据 |
| | | datas.add((short) prcid);// 调拨外片起始位置 |
| | | datas.add((short) prcid2); |
| | | datas.add((short) 1);// 调拨外片起始位置 |
| | | datas.add((short) 1); |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | // 更换玻璃的笼子 |
| | |
| | | return (300); |
| | | } |
| | | // 获取调拨位置进行调拨 |
| | | prcid2 = cagecell.getPrcId();// 调拨目标位prcID |
| | | //prcid2 = cagecell.getPrcId();// 调拨目标位prcID |
| | | ids = cagecell.getId();// 调拨目标位ID |
| | | cages = cagecell.getCage();// 调拨目标位笼子 |
| | | cells = cagecell.getCell();// 调拨目标位格子 |
| | | // 填入调拨数据 |
| | | datas.add((short) prcid); |
| | | datas.add((short) prcid2); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id |
| | |
| | | import com.example.springboot.component.PLCAutoMes; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.example.springboot.mapper.AlbaniaMapper; |
| | | import com.google.common.primitives.Bytes; |
| | |
| | | int cageid; |
| | | String glassid=glassInfo.getGlassid(); |
| | | Double width=glassInfo.getWidth(); |
| | | Double height=glassInfo.getHeight(); |
| | | //int mateid=glassInfo.getMateid(); |
| | | String flowcard=glassInfo.getFlowcard(); |
| | | int glasstype=glassInfo.getGlasstype(); |
| | | |
| | | |
| | | |
| | | //判断是否有同类型的 |
| | | cageid=albaniaMapper.SelectCage(glassInfo.getGlasstype(), glassInfo.getWidth(), 50); |
| | | cageid=albaniaMapper.SelectCage(glasstype,width, 50); |
| | | //如果有同类型时直接增加 |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | //发送plc任务 |
| | | //Mestast(glassid,1001,cageid,1); |
| | | |
| | | //任务完成后增加数量 |
| | | albaniaMapper.UpdateCageNumberAdd(cageid); |
| | | }else{ |
| | | }else{ |
| | | //判断玻璃是否进入大片笼 |
| | | if(glassInfo.getThickness()>=15){ |
| | | cageid=albaniaMapper.SelectNewCell(3,5); |
| | |
| | | //发送plc任务 |
| | | } |
| | | //当返回的格子号为空时,返回400笼子已满 |
| | | if(cageid==Integer.MIN_VALUE){ |
| | | return(400); |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | Mestast(glassid,1001,cageid,1); |
| | | //发送plc任务 |
| | | |
| | | }else{ |
| | | //判断完成任务后增加数量 |
| | | albaniaMapper.AddCage(cageid, glassid, width, height, width, height, 0, glasstype, 1); |
| | | return(400); |
| | | } |
| | | } |
| | | //增加任务记录 |
| | | albaniaMapper.Inserttask(0, 0, 0, cageid, glassInfo.getGlassid(), 0, 0); |
| | | albaniaMapper.Inserttask(0, 0, 1001, cageid, glassid,glasstype, flowcard,0,0); |
| | | return(200); |
| | | |
| | | } |
| | | |
| | | |
| | | public Short selectout(String glasstype) { |
| | | //判断笼子最先出哪片 |
| | | |
| | | //出片 |
| | | public Short selectout(int line) { |
| | | int mateid; |
| | | int glasstype; |
| | | int tier; |
| | | int sumid; |
| | | String flowcard; |
| | | GlassInfo glassmate=new GlassInfo(); |
| | | |
| | | for(int i=1;i<=7;i++){ |
| | | glassmate= albaniaMapper.SelectOutGlass(line); |
| | | mateid=glassmate.getMateid(); |
| | | glasstype=glassmate.getGlasstype(); |
| | | tier=glassmate.getTier(); |
| | | sumid=glassmate.getId(); |
| | | flowcard=glassmate.getFlowcard(); |
| | | |
| | | StorageCage glass= albaniaMapper.SelectCageGlass(glasstype); |
| | | //发送配片数据 |
| | | Mestast(glassmate.getGlasstype()+"i", glass.getId(),2002, 0); |
| | | albaniaMapper.AddFinishNumber(flowcard, mateid, tier); |
| | | albaniaMapper.Inserttask(1, 0, glass.getId(), 2002, glassmate.getGlassid()+i, glasstype,glass.getFlowcard(),mateid,tier); |
| | | if(tier==sumid){ |
| | | //本次配片完成发送启动命令 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short)2);//出片任务启动 |
| | | return (200);//结束 |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return(200);// 结束 |
| | | } |
| | |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | System.out.println("outmesidbytes:" + bytes.length); |
| | | S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(plcmes.getPlcParameter(address).getAddressIndex()),bytes); |
| | | S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(),bytes); |
| | | //S7control.getinstance().WriteByte(address, bytes);// 派发出片id |
| | | |
| | | } |
| | |
| | | writedstrIdOut.append((char) iditem); |
| | | } |
| | | } |
| | | return writedstrIdOut; |
| | | return writedstrIdOut; |
| | | } |
| | | |
| | | // char数组转化成bit数组 |
| | |
| | | return listbool; |
| | | } |
| | | |
| | | // 根据玻璃id完成在进行中的任务 |
| | | public void overtask(String glassid) { |
| | | |
| | | // spianMapper.UpdatetaskOut(glassid.toString());// 完成上一次 出片或者进片任务 |
| | | // spianMapper.OverOutSlice(glassid.toString(), 2, 1);// 完成出片队列任务 |
| | | // spianMapper.UpdataGlassCage(glassid.toString(), 0);// 清除出片格子玻璃信息 |
| | | // spianMapper.UpdateCageOver(glassid.toString(), 0);// 更改笼子表出片状态 |
| | | // spianMapper.UpdateCageadd(glassid.toString(), 1);// 更改笼子表进片状态 |
| | | // spianMapper.UpdateAddQueue(glassid.toString());// 把进片的玻璃更新到出片队列中 |
| | | //下发理片任务 |
| | | public void Mestast(String glassid,int MESToPLCStart1,int MESToPLCTarget1,int MESToPLC) { |
| | | outmesid(glassid, "MESID1");//下发玻璃id |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCStart1").getAddress(), (short) MESToPLCStart1);//起始位置 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCTarget1").getAddress(), (short) MESToPLCTarget1);//目标位置 |
| | | if(MESToPLC!=0){ |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short)MESToPLC);//mes理片任务类型 |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.springboot.service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.Plchome; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.FlowCard; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | |
| | | return homeMapper.SelectStorageCageInfo(); |
| | | } |
| | | |
| | | // 增加/减少理片笼玻璃数 |
| | | public Result UpdateStroageCageByCell(Integer cell, Integer num) { |
| | | if (num == 0) { |
| | | homeMapper.DeleteStroageCageByCell(cell); |
| | | } else { |
| | | homeMapper.updateStroageCageByCell(cell, num); |
| | | homeMapper.UpdateStroageCageWidthByCell(cell); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询进/出片任务 |
| | | public List<StorageTask> SelectStorageTask(int task_type) { |
| | | List<StorageTask> storageTasks = new ArrayList<>(); |
| | | if (task_type == 0) { |
| | | storageTasks = homeMapper.SelectStorageTask(task_type); |
| | | } else { |
| | | storageTasks = homeMapper.SelectStorageTask(task_type); |
| | | } |
| | | for (StorageTask storageTask : storageTasks) { |
| | | storageTask.setstorageCage(homeMapper.SelectStorageByCell(storageTask.getLoadrack())); |
| | | } |
| | | return storageTasks; |
| | | } |
| | | |
| | | //手动完成任务 |
| | | public Result FinishTask(Integer tasktype, Integer id) { |
| | | StorageTask storageTask = homeMapper.SelectStorageTaskById(id);//获取任务信息 |
| | | homeMapper.FinishTask(storageTask.getId());//完成任务 |
| | | if(storageTask.getTaskType().equals("0")){ |
| | | UpdateStroageCageByCell(Integer.parseInt(storageTask.getLoadrack()),1);//玻璃数量+1 |
| | | }else{ |
| | | StorageCage storageCage = homeMapper.SelectStorageByCell(storageTask.getShelfRack()); |
| | | if(storageCage.getNumber()>1){ |
| | | UpdateStroageCageByCell(Integer.parseInt(storageTask.getShelfRack()),-1);//玻璃数量-1 |
| | | }else{ |
| | | UpdateStroageCageByCell(Integer.parseInt(storageTask.getShelfRack()),0);//清除格内信息 |
| | | } |
| | | homeMapper.AddGlassNo(storageTask.getFlowcard(),storageTask.getMateid(),storageTask.geTier());//添加出片完成数量 |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | |
| | | //查询玻璃信息 |
| | | public Result SelectGlassInfo(String width,String height,String thickness,String films) { |
| | | List<GlassInfo> glassInfoList = homeMapper.SelectGlassInfo(width,height,thickness,films); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("StorageCageAddInfo", glassInfoList); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //添加玻璃到格子内 |
| | | public Result StorageCageAddGlass(String cell,GlassInfo glassInfo) { |
| | | homeMapper.StorageCageAddGlass(cell,glassInfo); |
| | | UpdateStroageCageByCell(Integer.parseInt(cell),1); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询订单任务 |
| | | public List<FlowCard> SelectOrderTask() { |
| | | List<FlowCard> OrderTask=homeMapper.SelectOrderTask(); |
| | | for (FlowCard flowcard : OrderTask) { |
| | | flowcard.setglassinfo(homeMapper.SelectOrderView(flowcard.getFlowcard())); |
| | | } |
| | | return OrderTask; |
| | | } |
| | | |
| | | //开始任务 |
| | | public Result ClaimTasks(String flowcard, Integer state) { |
| | | if(state==1){ |
| | | homeMapper.ClaimTasks(flowcard,0); |
| | | }else{ |
| | | homeMapper.ClaimTasks(flowcard,1); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //任务模式修改 |
| | | public Result ModeChange(String flowcard, Integer method) { |
| | | if(method==1){ |
| | | homeMapper.ModeChange(flowcard,0); |
| | | }else{ |
| | | homeMapper.ModeChange(flowcard,1); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //修改测量信息 |
| | | public Result UpdateQueue(GlassInfo glassInfo) { |
| | | homeMapper.UpdateQueue(glassInfo.getFlowcard(),glassInfo.getWidth(),glassInfo.getHeight(),glassInfo.getGlasstype()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |