Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# CanadaMes-ui/src/lang/locales/en-US.json
| | |
| | | "This glass is already in the Queue":"此玻璃已在出片队列中",
|
| | | "Complete":"完成",
|
| | | "Not Allow":"不允许",
|
| | | "Completed":"已完成",
|
| | | "Waiting":"等待中",
|
| | | "Deleted":"已删除",
|
| | | "Glass State":"玻璃状态",
|
| | | "Absent":"不存在",
|
| | | "langparameter": {
|
| | | "conveyor Velocity(Auto FAST)": "D01-D06 皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "D01-D06 皮带输送自动慢速",
|
| | |
| | | </el-form>
|
| | | <template #footer>
|
| | | <span class="dialog-footer">
|
| | | <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }"
|
| | | <!-- <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }"
|
| | | type="primary">{{
|
| | | $t('confirm') }}</el-button>
|
| | | $t('confirm') }}</el-button> -->
|
| | | <el-button @click="FeedInglassid()" :style="{ display: confirm2 == true ? '' : 'none' }"
|
| | | type="primary">{{
|
| | | $t('confirm') }}</el-button>
|
| | |
| | | <el-table-column :min-width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
|
| | | <el-table-column :min-width="80" prop="listId" :label="$t('List No')"></el-table-column>
|
| | | <el-table-column :min-width="100" prop="boxId" :label="$t('Box No')"></el-table-column>
|
| | | <el-table-column :min-width="90" prop="state" :label="$t('State')">
|
| | | <el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
|
| | | <template slot-scope='scope'>
|
| | | {{
|
| | | scope.row.state == 1 ? $t('Normal') : scope.row.state == 2 ? $t('Entering') : scope.row.state == 3 ?
|
| | |
| | | </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;"
|
| | | <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;"
|
| | | :disabled="scope.row.state == 1 ? false : true"
|
| | |
| | | }}</el-button>
|
| | | <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border :cell-style="cellStyle"
|
| | | style="width: 100%;overflow: auto;">
|
| | | <el-table-column prop="glassId" :label="$t('Barcode')"></el-table-column>
|
| | | <el-table-column :min-width="100" prop="glassId" :label="$t('Barcode')"></el-table-column>
|
| | | <el-table-column prop="storageCage.orderId" :label="$t('Order No')"></el-table-column>
|
| | | <el-table-column prop="storageCage.listId" :label="$t('List No')"></el-table-column>
|
| | | <el-table-column prop="storageCage.boxId" :label="$t('Box No')"></el-table-column>
|
| | | <el-table-column prop="storageCage.glasswidthmm" :label="$t('Length')"></el-table-column>
|
| | | <el-table-column prop="storageCage.glassheightmm" :label="$t('Width')"></el-table-column>
|
| | | <el-table-column prop="state" :label="$t('State')">
|
| | | <el-table-column prop="state" :label="$t('Glass State')">
|
| | | <template slot-scope='scope'>
|
| | | {{ scope.row.state == 0 ? "Waiting" : scope.row.state == 1 ?"Outing":"Completed" }}
|
| | | {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ? $t('Outing') : scope.row.state == 2 ? $t('Completed') :scope.row.state == 3 ? $t('Absent') :$t('Deleted') }}
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column prop="sequence" :label="$t('Sequence')"></el-table-column>
|
| | | <el-table-column prop="position" :label="$t('Position')">
|
| | | <el-table-column prop="position" :label="$t('Position')" style="font-size: 20px;">
|
| | | <template slot-scope='scope'>
|
| | | {{ scope.row.position==1?$t('Yes'):$t('No') }}
|
| | | {{ scope.row.position == 1 ? "▄▄▄" : "▋" }}
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column prop="position" :label="$t('Flip')">
|
| | | <template slot-scope='scope'>
|
| | | {{ scope.row.flip==1?$t('Yes'):$t('No') }}
|
| | | {{ scope.row.flip == 1 ? $t('Yes') : $t('No') }}
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
|
| | |
|
| | | <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,scope.row.glassId)">{{ $t('Complete') }}</el-button>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="(!isAllowQueue||scope.row.state!=1)"
|
| | | @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')">
|
| | |
| | | OutingQueue: true,
|
| | | OrderInfo: true,
|
| | | CageDetails: true,
|
| | | |
| | |
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | | }
|
| | | ,
|
| | | methods: {
|
| | | |
| | | |
| | |
|
| | |
|
| | | init() {
|
| | | let viewname = "Home";
|
| | | if (typeof (WebSocket) == "undefined") {
|
| | |
| | | if (res.data.message == 200) {
|
| | | this.dialogFormVisible1 = false;
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | |
|
| | | } else {
|
| | | this.$message.error(this.$t('There is no glass for this order'));
|
| | | }
|
| | |
| | | },
|
| | | //手动上片
|
| | | FeedInglassid() {
|
| | | Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
|
| | | if (this.form.barcode != "") {
|
| | | if (this.form.glassId != ""&&this.form.glassId != null) {
|
| | | Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | this.dialogFormVisible = false;
|
| | | } else {
|
| | | }
|
| | | else if (res.data.message == 400) {
|
| | | this.$message.error(this.$t('The glass size is not within the range'));
|
| | | }
|
| | | else if (res.data.message == 300) {
|
| | | this.$message.error(this.$t('This glass is already in the cage'));
|
| | | }
|
| | | } else {
|
| | | this.$message.error(this.$t('There is no such glass'));
|
| | | }
|
| | | });
|
| | | } else {
|
| | | this.$message.error(this.$t('There is no such glass'));
|
| | | }
|
| | |
|
| | | });
|
| | |
|
| | | },
|
| | | //启用//理片笼禁用
|
| | | UpdateDisabled(cage, cell, disabled) {
|
| | |
| | | });
|
| | | }
|
| | | ,
|
| | | cellStyle({ row, column, rowIndex, columnIndex }) {
|
| | | // console.log(row, column, "ss");
|
| | | column=rowIndex;
|
| | | rowIndex=column;
|
| | | let style="";
|
| | | if (columnIndex === 8&&row.position==1) {
|
| | | style="background-Color:yellow;";
|
| | | }
|
| | | if (columnIndex === 9&&row.flip==1) {
|
| | | style="background-Color:yellow;";
|
| | | }
|
| | | return style;
|
| | | }
|
| | | cellStyle({ row, column, rowIndex, columnIndex }) {
|
| | | // console.log(row, column, "ss");
|
| | | column = rowIndex;
|
| | | rowIndex = column;
|
| | | let style = "";
|
| | | if (columnIndex === 8 ) {
|
| | | style = "font-size:25px;text-align: center;";
|
| | | }
|
| | | if (columnIndex === 9 && row.flip == 1) {
|
| | | style = "background-Color:yellow;";
|
| | | }
|
| | | if (columnIndex === 6 && row.state == 3) {
|
| | | style = "background-Color:gray;";
|
| | | }
|
| | | style
|
| | | return style;
|
| | | }
|
| | | ,
|
| | | //合并行
|
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
| | |
| | | this.form5 = {};
|
| | | },
|
| | | //手动完成出片任务
|
| | | CompleteQueue(id,frameid,glassid) {
|
| | | CompleteQueue(id,frameid,glassid).then(res => {
|
| | | CompleteQueue(id, frameid, glassid) {
|
| | | CompleteQueue(id, frameid, glassid).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.example.springboot.service.JdbcConnections; |
| | |
| | | private JdbcConnections jdbcConnections; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | |
| | | |
| | | @Override |
| | | public void run() { |
| | | boolean inglassbegin = false; |
| | |
| | | // \\ TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | // 根据玻璃id获取订单号,单独数据源 |
| | |
| | | // // System.out.println(glass.getOrderId()); |
| | | // } catch (SQLException e) { |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // e.printStackTrace(); |
| | | // } |
| | | //spianService.selectAll("X12345610102GV"); |
| | | List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 获取prc进片请求数据 |
| | | List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态 |
| | | List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动 |
| | |
| | | StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id |
| | | // 当进片小车完成任务时 |
| | | if (B01backs == true) { |
| | | // 当B01小车汇报完成时更改玻璃状态 为1 |
| | | spianMapper.UpdateCageOver(B01glassid.toString(), 1);// 更改笼子表进片状态 |
| | | spianMapper.Updatetask(1, 0);// 更改进片任务状态为1 |
| | | spianMapper.UpdatetaskOut(B01glassid.toString()); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(B01glassid.toString(), 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 清除出片格子玻璃信息 |
| | | // 当B01小车汇报完成时更改玻璃状态 为1 |
| | | spianService.overtask(B01glassid.toString());// 完成任务 |
| | | S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0 |
| | | System.out.println("汇报时B01|" + B01glassid); |
| | | |
| | | // S7control.getinstance().WriteWord("DB105.48", (short) 1);//汇报B01小车收到 |
| | | } |
| | | |
| | | // 当出片小车完成任务时 |
| | | if (B02backs == true) { |
| | | // 当B02小车汇报完成时更改玻璃状态为0 |
| | | spianMapper.UpdateCageOver(B02glassid.toString(), 0);// 更改笼子表出片状态 |
| | | spianMapper.UpdatetaskOut(B02glassid.toString()); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(B02glassid.toString(), 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 清除出片格子玻璃信息 |
| | | spianService.overtask(B02glassid.toString());// 完成任务 |
| | | S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0 |
| | | // S7control.getinstance().WriteWord("DB105.50", (short) 1);//汇报B02小车收到 |
| | | System.out.println("汇报时B02|" + B02glassid); |
| | | } |
| | | |
| | |
| | | StringBuilder queueid1 = spianService.queGlassid("DB106.26", 14);// 获取请求的id跟DO1同时清 |
| | | // 获取DO2数据 |
| | | StringBuilder queueid2 = spianService.queGlassid("DB103.58", 14); |
| | | // System.out.println("D01|" + queueid1); |
| | | // System.out.println("D02|" + queueid2); |
| | | |
| | | |
| | | int questate = spianMapper.Selectquecount(queueid1.toString());// 判断扫码位是否有玻璃已确认 |
| | | // queueid1.toString().isEmpty() |
| | |
| | | boolean outstate = false;// 出片车空闲判断 |
| | | boolean outstate1 = false;// 出片车任务是否启动 |
| | | if (outlist != null && outlist1 != null) { |
| | | // 判断按订单出片 |
| | | |
| | | outstate = outlist.contains((short) 0);// 出片车空闲判断 当出片车空闲时为true |
| | | outstate1 = outlist1.contains((short) 1);// 出片车任务是否启动 当出片车任务启动时为true |
| | | |
| | | north_glass_buffer1 glass = spianMapper.SelectDBOut();// 判断是否有调拨后的出片任务未完成 |
| | | |
| | | if (!outglassbegin & !outstate)// 当任务还未开始,且出片车不空闲时,任务状态改为开始 |
| | | { |
| | | outglassbegin = true; |
| | | } |
| | | if (outglassbegin & outstate)// 当任务开始且出片车空闲时 |
| | | { |
| | | outglassbegin = false; |
| | | } |
| | | |
| | | if (outstate == true & glass.getbarcode() != null&&Plchome.isAllowQueue==true) { // 当出片车空闲且有出片任务待完成时 |
| | | // 判断有两个出片或调拨任务时并且出片id和未完成的出片任务id不一样时执行出片 |
| | | if (!writedstrIdOut.toString().equals(glass.getbarcode().toString())) { |
| | | spianService.selectout2(glass.getbarcode().toString()); |
| | | outstate = false; |
| | | } |
| | | } |
| | | |
| | | // 判断当前是否有未执行的任务 |
| | | int outnum = spianMapper.SelectOutSliceshu(); |
| | | // 当没有任务执行并且出片车空闲时 |
| | | if (outnum == 0 && outstate == true&&Plchome.isAllowQueue==true) { |
| | | if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true) { |
| | | // 判断铝框出片队列表是否有待出片的玻璃 |
| | | String outglassid = spianMapper.SelectOutSlice(); |
| | | if (outglassid != null) { |
| | | |
| | | |
| | | spianService.selectout2(outglassid); |
| | | outstate = false; |
| | | } |
| | |
| | | |
| | | // 获取当前登录用户权限 |
| | | @GetMapping("/SelectPermissionByUserName") |
| | | public Result SelectPermissionByUserName(String username) { |
| | | public Result SelectPermissionByUserName(String username) throws SQLException { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<RolePermission> permission = homeMapper.SelectPermissionByUserName(username); |
| | | map.put("permission", permission); |
| | |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types,glassid); |
| | | homeMapper.UpdateTask(types, glassid); |
| | | StorageCage glass = homeMapper.SelectGlassInfo(glassid); |
| | | if (types == 0) { |
| | | homeMapper.UpdateCageTask1(glassid); |
| | |
| | | int sequence = homeMapper.SelectMaxSquence(); |
| | | homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(), |
| | | north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), |
| | | sequence, position); |
| | | sequence, position, (short)0); |
| | | map.put("message2", "200"); |
| | | } else { |
| | | map.put("message2", "300"); |
| | |
| | | public Result Inglassid(short cage, short cell, short tier, @RequestBody Queue queue) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | Double cagewidth = homeMapper.SelectCageWidth(cage, cell); |
| | | if (cagewidth - queue.getglasswidth() - 400 < 0 || (cagewidth == 2750 && queue.getglasswidth() > cagewidth)) { |
| | | map.put("message", "400"); |
| | | } else { |
| | | homeMapper.Inglassid(queue, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(queue.getglasswidth(), cage, cell); |
| | | map.put("message", "200"); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.Inglassid(queue, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(queue.getglasswidth(), cage, cell); |
| | | map.put("message", "200"); |
| | | } |
| | | } |
| | | return Result.success(map); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询玻璃信息 |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 根据玻璃id删除出片队列玻璃 |
| | | // 根据铝框id删除出片队列玻璃 |
| | | @PostMapping("/DeleteProductionQueueGlass") |
| | | public Result DeleteProductionQueueGlass(String FrameNo) { |
| | | homeMapper.DeleteProductionQueueGlass(FrameNo); |
| | | homeMapper.CompleteQueueByFrameNo(FrameNo); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //手动完成任务 |
| | | // 手动完成任务 |
| | | @PostMapping("/CompleteQueue") |
| | | public Result CompleteQueue(String id,String frameid,String glassid) { |
| | | return outSliceServive.CompleteQueue(id,frameid,glassid); |
| | | |
| | | public Result CompleteQueue(String id, String frameid, String glassid) { |
| | | return outSliceServive.CompleteQueue(id, frameid, glassid); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | north_glass_buffer1 SelectBoxNo(String glassid); |
| | | |
| | | //查询出片队列信息 |
| | | @Select("select * from out_slice where state=0 or state=1 or state=2 order by sequence") |
| | | @Select("select * from out_slice order by sequence") |
| | | List<Out_slice> SelectProductionqueue(); |
| | | |
| | | //根据玻璃id查询笼内玻璃信息 |
| | |
| | | StorageCage SelectStorageGlassById(String glassid); |
| | | |
| | | |
| | | //根据玻璃id删除出片队列玻璃 |
| | | @Update("update out_slice set state=4 where barcode=#{FrameNo} and (state=0 or state=1 or state=2)") |
| | | void DeleteProductionQueueGlass(String id); |
| | | // //根据玻璃id删除出片队列玻璃 |
| | | // @Update("update out_slice set state=4 where barcode=#{FrameNo} and (state=0 or state=1 or state=2)") |
| | | // void DeleteProductionQueueGlass(String id); |
| | | |
| | | //根据铝框id查询对应玻璃信息 |
| | | @Select("select * from north_glass_buffer1 where FrameBarcode=#{FrameBarcode}") |
| | |
| | | |
| | | |
| | | //查询玻璃是否已存在于出片队列 |
| | | @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1 or state=2)") |
| | | @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1 or state=2 or state=3)") |
| | | Out_slice SelectQueueByglassid(String getbarcode); |
| | | |
| | | //添加出片队列 |
| | | @Insert("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`, `sequence`, `time` ,`position`) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, 0, #{flip}, #{sequence}, now(), #{position});") |
| | | void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm, int sequence, String position); |
| | | @Insert("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`, `sequence`, `time` ,`position`) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, #{state}, #{flip}, #{sequence}, now(), #{position});") |
| | | void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm, int sequence, String position, Short state); |
| | | |
| | | //出片队列调序 |
| | | @Update("update out_slice set sequence=#{sequence} where glassid=#{glassId}") |
| | |
| | | @Select("select count(*) from out_slice where barcode=#{frameid} and state<2") |
| | | Short SelectCountByFrameNo(String frameid); |
| | | |
| | | //铝框id对应玻璃改完全部完成状态 |
| | | @Update("update out_slice set state=3 where barcode=#{frameid} and state=2") |
| | | //删除已完成的任务 |
| | | @Update("delete from out_slice where Barcode=#{frameid}") |
| | | void CompleteQueueByFrameNo(String frameid); |
| | | |
| | | @Select("Select width from storage_cage where cage=#{cage} and cell=#{cell} limit 1") |
| | | Double SelectCageWidth(short cage, short cell); |
| | | |
| | | } |
| | |
| | | //更新出片队列的任务状态 |
| | | @Update("update out_slice set state=#{state} where glassid=#{glassid}") |
| | | void OverOutSlice(String glassid,int state); |
| | | |
| | | //获取玻璃的铝框id |
| | | @Select("select barcode from out_slice where glassid=#{glassid};") |
| | | String SelectBarcode(String glassId); |
| | | //获取出片队列的铝框是否全部完成 |
| | | @Select("select MIN(state) from out_slice where barcode=#{barcode};") |
| | | int SelectOverState(String barcode); |
| | | //删除出片队列该铝框的id |
| | | @Delete("delete from out_slice where barcode=#{barcode};") |
| | | void DeleteQueue(String barcode); |
| | | //把该进片的玻璃更新到出片队列 |
| | | @Select("update out_slice set state=0 where glassId=#{glassId} and state=3") |
| | | void UpdateAddQueue(String glassId); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private JdbcConnections jdbcConnections; |
| | | |
| | | //获取玻璃是否在笼子,是否在出片队列 |
| | | public List<north_glass_buffer1> SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException { |
| | | List<north_glass_buffer1> listAluminumFrame = jdbcConnections |
| | | .SelectGlassByGlassIdOrderIdFrameIdss(FrameBarcode); |
| | |
| | | return listAluminumFrame; |
| | | } |
| | | |
| | | //根据铝框id添加玻璃到出片队列 |
| | | public void AddOutSliceS(String FrameBarcode) throws SQLException{ |
| | | List<north_glass_buffer1> north_glass_buffer1s=SelectAluminumFrameInfoById(FrameBarcode); |
| | | String flip = jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode); |
| | | String position =jdbcConnections.SelectPositionByFrameBarcode(FrameBarcode); |
| | | int sequence=homeMapper.SelectMaxSquence(); |
| | | |
| | | for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) { |
| | | if(north_glass_buffer1.getstorageCage()!=null&&north_glass_buffer1.getOut_slice()==null){ |
| | | homeMapper.AddOutSliceS(north_glass_buffer1.getbarcode(), flip, FrameBarcode, north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), sequence, position); |
| | | Short state=0; |
| | | if(north_glass_buffer1.getOut_slice()==null){ |
| | | if(north_glass_buffer1.getstorageCage()==null){ |
| | | state=3; |
| | | } |
| | | homeMapper.AddOutSliceS(north_glass_buffer1.getbarcode(), flip, FrameBarcode, north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), sequence, position, state); |
| | | sequence+=1; |
| | | } |
| | | } |
| | |
| | | // 添加到数据库 |
| | | for (String[] item : AluminumFrames) { |
| | | if (item[1] == "true") { |
| | | Short state=0; |
| | | String position = jdbcConnections.SelectPositionByFrameBarcode(item[3]); |
| | | homeMapper.AddOutSliceS(item[0], item[2], item[3], item[4], item[5], sequence, position); |
| | | homeMapper.AddOutSliceS(item[0], item[2], item[3], item[4], item[5], sequence, position,state ); |
| | | sequence += 1; |
| | | } |
| | | } |
| | |
| | | homeMapper.CompleteQueueByFrameNo(frameid); |
| | | } |
| | | StorageCage storageCage = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); |
| | | |
| | | if(storageCage!=null){ |
| | | spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); |
| | | } |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | boolean listbool = list.contains((short) 1); |
| | | return listbool; |
| | | } |
| | | //根据玻璃id完成在进行中的任务 |
| | | public void overtask(String glassid){ |
| | | spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态 |
| | | spianMapper.UpdatetaskOut(glassid); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(glassid, 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(glassid,0);// 清除出片格子玻璃信息 |
| | | String barcode=spianMapper.SelectBarcode(glassid);//获取该玻璃的铝框id |
| | | spianMapper.UpdateAddQueue(glassid);//把进片的玻璃更新到出片队列中 |
| | | int barcodeState=spianMapper.SelectOverState(barcode);//获取该铝框的状态 |
| | | if(barcodeState==2){//当该铝框所有的玻璃都是完成状态时删除在出片队列的数据 |
| | | spianMapper.DeleteQueue(barcode); |
| | | } |
| | | } |
| | | } |