Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
| | |
| | | "exit": "exit",
|
| | | "changePassword": "changePassword",
|
| | | "resetPassword": "resetPassword",
|
| | | "Old password":"Old password",
|
| | | "New password":"New password",
|
| | | "Confirm password":"Confirm password",
|
| | | "home": "Home",
|
| | | "role": "role",
|
| | | "langRoleManagement": "Role Management",
|
| | |
| | | <el-menu-item index="1-1" @click="logout">{{ $t('exit') }}</el-menu-item> |
| | | <el-menu-item index="1-2" @click="showChangePasswordDialog">{{ $t('changePassword') }}</el-menu-item> |
| | | </el-submenu> |
| | | |
| | | </template> |
| | | <template> |
| | | <el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form ref="form" :model="formData" label-width="100px"> |
| | | <el-form-item label="旧密码"> |
| | | <el-dialog :title="$t('changePassword')" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form ref="form" :model="formData" label-width="200px"> |
| | | <el-form-item :label="$t('Old password')"> |
| | | <el-input v-model="formData.oldPassword" type="password" show-password></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="新密码"> |
| | | <el-form-item :label="$t('New password')"> |
| | | <el-input v-model="formData.newPassword" type="password" show-password></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="确认新密码"> |
| | | <el-form-item :label="$t('Confirm password')"> |
| | | <el-input v-model="formData.confirmPassword" type="password" show-password></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="savePassword">保存</el-button> |
| | | <el-button @click="dialogVisible = false">{{ $t('cancel') }}</el-button> |
| | | <el-button type="primary" @click="savePassword">{{ $t('confirm') }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | // Tag |
| | | // }, |
| | | created() { |
| | | |
| | | |
| | | |
| | | selectList(this.menuListForm).then(res => { |
| | | this.menuList = res.data |
| | | |
| | |
| | | // this.$store.commit('tags/addTag', tag); |
| | | // } |
| | | }, |
| | | |
| | | |
| | | removeTag() { |
| | | // this.$store.commit('tags/removeTag', index); // 从 Vuex Store 中移除标签 |
| | |
| | | }, |
| | | |
| | | updateButtonValue(dataGroup, itemIndex) { |
| | | if (dataGroup[itemIndex].button.value === 1) { |
| | | if (dataGroup[itemIndex].button.value2 === 1) { |
| | | // 如果当前按钮的值是 0,将其设为 1 |
| | | this.$set(dataGroup[itemIndex].button, "value", 0); |
| | | this.$set(dataGroup[itemIndex].button, "value2", 0); |
| | | } else { |
| | | // 否则将其设为 0 |
| | | this.$set(dataGroup[itemIndex].button, "value", 1); |
| | | this.$set(dataGroup[itemIndex].button, "value2", 1); |
| | | } |
| | | }, |
| | | //范围 0-100 |
| | |
| | | ["清除ID", "Clear ID"].includes(subItem.button.name) |
| | | ); |
| | | |
| | | return buttonItem ? buttonItem.button.value : null; |
| | | return buttonItem ? buttonItem.button.value2 : null; |
| | | }) |
| | | .filter((value) => value !== null); |
| | | .filter((value2) => value2 !== null); |
| | | |
| | | // 将得到的值添加到 data 数组中 |
| | | data2.push(resetButtonValues.flat()); |
| | | data2.push([]); |
| | | data2.push([],[]); |
| | | // 在 data2 数组前面添加两个空数组 |
| | | |
| | | // 创建 jsonObject2 对象,并添加 data2 属性 |
| | |
| | | currentButtonName === "A02终止/继续" |
| | | ) { |
| | | const data3 = []; |
| | | const resetButtonValues3 = [this.jsonData[13][0].button.value,this.jsonData[14][0].button.value]; |
| | | const resetButtonValues3 = [this.jsonData[13][0].button.value2,this.jsonData[14][0].button.value2]; |
| | | |
| | | // 将得到的值添加到 data 数组中 |
| | | data3.push(resetButtonValues3.flat()); |
| | | data3.unshift([]); |
| | | data3.push([]); |
| | | // 在 data3 数组前面添加两个空数组 |
| | | |
| | | // 创建 jsonObject3 对象,并添加 data3 属性 |
| | |
| | | console.log("websocket已打开"); |
| | | }; |
| | | let isMouseInInputBox = false; // 标记鼠标是否在输入框内 |
| | | |
| | | let isUpdated = false; // 定义标志变量 |
| | | const inputBox = document.querySelectorAll('.input-box2'); |
| | | inputBox.forEach(box => { |
| | | box.addEventListener('mouseenter', () => { |
| | |
| | | |
| | | jsonData2[15][0].value = obj.timeout[0]; |
| | | |
| | | |
| | | if (!isUpdated) { |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | for (let j = 0; j < jsonData2[i].length; j++) { |
| | | if(jsonData2[i][j].button){ |
| | | |
| | | |
| | | jsonData2[i][j].button.value2 = jsonData2[i][j].button.value; |
| | | } |
| | | } |
| | | } |
| | | isUpdated = true; // 更新标志变量的值 |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | this.alarm = obj.alarmmg[0];
|
| | | if (this.alarm.length > 0&&this.alarm!=obj.alarmmg[0]) {
|
| | | this.dialogFormVisible2 = true;
|
| | | } else {
|
| | | this.dialogFormVisible2 = false;
|
| | | }
|
| | | // else {
|
| | | // this.dialogFormVisible2 = false;
|
| | | // }
|
| | | //是否急停
|
| | | if (obj.emergencystop != null) {
|
| | | this.EmergencyStop = obj.emergencystop[0];
|
| | |
| | | this.form5 = {};
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | } else {
|
| | | alert(1);
|
| | | this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
|
| | | }
|
| | | });
|
| | |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | spianService.selectAll("X12345610402GV"); |
| | | //spianService.selectAll("X12345610402GV"); |
| | | // 出片任务//////////////////////////////// |
| | | List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态 |
| | | List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动 |
| | |
| | | addresses2.add("DB100.118");
|
| | | addresses2.add("DB100.192");
|
| | |
|
| | | addresses2.add("DB103.22");
|
| | | addresses2.add("DB106.14");
|
| | | List<Short> arraylist2 = S7control.getinstance().readWords(addresses2);
|
| | |
|
| | | List<String> addresses9 = new ArrayList<>();
|
| | |
| | | } |
| | | } |
| | | //完成出片 |
| | | boolean containsOne = data.stream().anyMatch(number -> number == 1); |
| | | for (int i = 1; i <= 5; i++) { |
| | | boolean value = sValue.get(i); |
| | | if (value) { |
| | | String id=paramlist.get(i); |
| | | //判断是否自动状态 |
| | | if(!containsOne) { |
| | | //判断id是否包含数字 |
| | | if(id.matches(".*\\d.*")){ |
| | | //判断清楚id是否true |
| | | if (value) { |
| | | System.out.println(id); |
| | | switch (i) { |
| | | case 1: |
| | | StorageCageService.UpdateTask(2, 0, paramlist.get(i)); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | // 检查布尔值列表是否为空 |
| | | if (!sValue.isEmpty()) { |
| | | |
| | |
| | | // 是否需要人工确认上片玻璃
|
| | | jsonObject.append("isConfirm", isConfirm);
|
| | |
|
| | | // // 读去Plc进片车与出片车位置W
|
| | | // List<String> addressList = new ArrayList<String>();
|
| | | // addressList.add("DB106.12");
|
| | | // addressList.add("DB106.0");
|
| | | // List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
|
| | | // if (paramlist != null) {
|
| | | // jsonObject.append("params", paramlist);
|
| | | // }
|
| | | // // 获取进片车状态
|
| | | // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
|
| | | // 1);// 获取进片车状态
|
| | | // boolean exist1 = datas1ListState.contains((short) 0);
|
| | | // jsonObject.append("zhuangtai", exist1);
|
| | | // // 获取进片玻璃信息
|
| | | // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | // if (inglassInfo != null) {
|
| | | // if (inglassInfo.size() > 0)
|
| | | // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
|
| | | // }
|
| | | // 读去Plc进片车与出片车位置W
|
| | | List<String> addressList = new ArrayList<String>();
|
| | | addressList.add("DB106.12");
|
| | | addressList.add("DB106.0");
|
| | | List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
|
| | | if (paramlist != null) {
|
| | | jsonObject.append("params", paramlist);
|
| | | }
|
| | | // 获取进片车状态
|
| | | List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
|
| | | 1);// 获取进片车状态
|
| | | boolean exist1 = datas1ListState.contains((short) 0);
|
| | | jsonObject.append("zhuangtai", exist1);
|
| | | // 获取进片玻璃信息
|
| | | List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | if (inglassInfo != null) {
|
| | | if (inglassInfo.size() > 0)
|
| | | jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
|
| | | }
|
| | |
|
| | | // // 获取铝框idDB106.DBW64
|
| | | // String frameno = spianService.queGlassid("DB103.270", 14).toString();
|
| | | // // String frameno="X12345611002GV";
|
| | | // if (!frameno.equals(Plchome.FrameNo)) {
|
| | | // Plchome.FrameNo = frameno;
|
| | | // try {
|
| | | // north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
|
| | | // } catch (SQLException e) {
|
| | | // // TODO Auto-generated catch block
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // }
|
| | | // 获取铝框idDB106.DBW64
|
| | | String frameno = spianService.queGlassid("DB103.270", 14).toString();
|
| | | // String frameno="X12345611002GV";
|
| | | if (!frameno.equals(Plchome.FrameNo)) {
|
| | | Plchome.FrameNo = frameno;
|
| | | try {
|
| | | north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // // 获取进片请求状态
|
| | | // List<Short> D01Request = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | // boolean D01RequestState = D01Request.contains((short) 1);
|
| | | // // boolean D01RequestState =true;
|
| | | // jsonObject.append("D01RequestState", D01RequestState);
|
| | | // 获取进片请求状态
|
| | | List<Short> D01Request = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | boolean D01RequestState = D01Request.contains((short) 1);
|
| | | // boolean D01RequestState =true;
|
| | | jsonObject.append("D01RequestState", D01RequestState);
|
| | |
|
| | | // // 复位倒计时
|
| | | // // 地址104.9.6
|
| | | // List<Boolean> countdown = S7control.getinstance().ReadBits("DB104.9.6", 1);
|
| | | // for (Boolean countdowns : countdown) {
|
| | | // jsonObject.append("countdown", countdowns);
|
| | | // }
|
| | | // // jsonObject.append("countdown", true);
|
| | | // // 复位完成信号
|
| | | // List<Boolean> resets = S7control.getinstance().ReadBits("DB103.284", 1);
|
| | | // for (Boolean reset : resets) {
|
| | | // jsonObject.append("reset", reset);
|
| | | // }
|
| | | // 复位倒计时
|
| | | // 地址104.9.6
|
| | | List<Boolean> countdown = S7control.getinstance().ReadBits("DB104.9.6", 1);
|
| | | for (Boolean countdowns : countdown) {
|
| | | jsonObject.append("countdown", countdowns);
|
| | | }
|
| | | // jsonObject.append("countdown", true);
|
| | | // 复位完成信号
|
| | | List<Boolean> resets = S7control.getinstance().ReadBits("DB103.284", 1);
|
| | | for (Boolean reset : resets) {
|
| | | jsonObject.append("reset", reset);
|
| | | }
|
| | |
|
| | | // // 是否急停
|
| | | // List<Boolean> emergencystops = S7control.getinstance().ReadBits("DB104.5.1", 1);
|
| | | // for (Boolean emergencystop : emergencystops) {
|
| | | // jsonObject.append("emergencystop", emergencystop);
|
| | | // }
|
| | | // 是否急停
|
| | | List<Boolean> emergencystops = S7control.getinstance().ReadBits("DB104.5.1", 1);
|
| | | for (Boolean emergencystop : emergencystops) {
|
| | | jsonObject.append("emergencystop", emergencystop);
|
| | | }
|
| | |
|
| | | // 铝框线交互
|
| | |
|
| | |
| | | if (s7PLC==null) |
| | | return null; |
| | | // List<String> addresslist = GetAddressList(address, count, 16); |
| | | return s7PLC.readByte(address,count); |
| | | |
| | | try { |
| | | return s7PLC.readByte(address, count); |
| | | }catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | new PlcHold().start(); |
| | | new PlcHold().start(); |
| | | |
| | | new Plchome().start(); |
| | | |
| | | new Plcalarm().start(); |
| | | new Plcalarm().start(); |
| | | |
| | | new Plcsign().start(); |
| | | new Plcsign().start(); |
| | | |
| | | |
| | | new Plcstate().start(); |
| | | new PlcPositioning1().start(); |
| | | new Plcstate().start(); |
| | | new PlcPositioning1().start(); |
| | | |
| | | new PlcParameter2().start(); |
| | | new PlcParameter2().start(); |
| | | |
| | | new PLCAutomaticParameterSetting().start(); |
| | | |
| | | new PlcManualonePosition().start(); |
| | | new PlcManualonePosition2().start(); |
| | | new PlcServoManualone().start(); |
| | | new PLCManualJog().start(); |
| | | new PLCAutomaticParameterSetting().start(); |
| | | new PlcManualonePosition().start(); |
| | | new PlcManualonePosition2().start(); |
| | | new PlcServoManualone().start(); |
| | | new PLCManualJog().start(); |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | import com.example.springboot.security.constant.SystemConstant; |
| | | import com.example.springboot.security.util.JwtUtil; |
| | | import com.example.springboot.security.util.SecurityUtil; |
| | | import com.example.springboot.service.HomeService; |
| | | import com.example.springboot.service.JdbcConnections; |
| | | import com.example.springboot.service.North_Glass_Buffer1Service; |
| | | import com.example.springboot.service.OutSliceServive; |
| | | import com.example.springboot.service.PermissionService; |
| | | import com.example.springboot.service.SpianService; |
| | | import com.example.springboot.service.StorageCageService; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.Plchome; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.entity.User; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Permission; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.RolePermission; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | @RestController |
| | | @RequestMapping("/home") |
| | |
| | | OutSliceServive outSliceServive; |
| | | |
| | | @Autowired |
| | | StorageCageService StorageCageService; |
| | | StorageCageService storageCageService; |
| | | |
| | | @Autowired |
| | | North_Glass_Buffer1Service north_Glass_Buffer1Service; |
| | |
| | | // 查询理片笼使用情况 |
| | | @GetMapping("/load") |
| | | public Result selectAll() { |
| | | // storageCageService.EndTask(1); |
| | | // UpdateTask(2,0,"X12345610402GV"); |
| | | List<StorageCage> storageCagelist = homeMapper.selectAll(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCagelist); |
| | |
| | | // 手动完成进/出片任务 终止进片/出片任务 |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | StorageCageService.UpdateTask(types, shelfrack, glassid); |
| | | storageCageService.UpdateTask(types, shelfrack, glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | |
| | | //终止进片/出片任务 |
| | | @GetMapping("/EndTask") |
| | | public Result EndTask(int types) { |
| | | StorageCageService.EndTask(types); |
| | | storageCageService.EndTask(types); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message3", "200"); |
| | |
| | | // 手动删除理片笼玻璃 |
| | | @GetMapping("/DeleteByGlassID") |
| | | public Result DeleteByGlassID(String glassid) { |
| | | outSliceServive.DeleteByGlassID(glassid); |
| | | outSliceServive.DeleteByGlassIDs(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | |
| | | // 根据玻璃id手动出片 |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) throws SQLException { |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Out_slice result = homeMapper.SelectQueueByglassid(glassid); |
| | | if (result == null) { |
| | |
| | | String position = jdbcConnections.SelectPositionByFrameBarcode(north_glass_buffer1.getFrameBarcode()); |
| | | if (position != null) { |
| | | int sequence = homeMapper.SelectMaxSquence(); |
| | | |
| | | homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(), |
| | | north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), |
| | | sequence, position, (short) 0, north_glass_buffer1.getordernumber(), north_glass_buffer1.getlistnumber(), |
| | |
| | | } else { |
| | | map.put("message2", "400"); |
| | | } |
| | | |
| | | } else { |
| | | map.put("message2", "500"); |
| | | } |
| | |
| | | List<StorageCage> SelectCageInfo(String cage); |
| | | |
| | | // 手动完成出片任务修改笼子数据 |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null where glass_id=#{glassid}") |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null,FrameBarcode=null where glass_id=#{glassid}") |
| | | void DeleteByGlassID(String glassid); |
| | | |
| | | //查询小车位置 |
| | |
| | | public void StopTask(String glassid, int i) { |
| | | if (i == 0) {// 进片终止 |
| | | spianService.overtask(glassid); |
| | | DeleteByGlassID(glassid); |
| | | DeleteByGlassIDs(glassid); |
| | | homeMapper.UpdateOutSliceGlass(glassid); |
| | | } else {// 出片终止 |
| | | spianMapper.UpdatetaskOut(glassid);//完成出片任务 |
| | | spianMapper.UpdataGlassCage(glassid, 0);// 清除出片格子玻璃信息 |
| | | spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态 |
| | | homeMapper.UpdateOutSliceGlass(glassid);//修改出片队列此玻璃状态为缺失 |
| | | |
| | | } |
| | | } |
| | | |
| | | //删除笼内玻璃还原宽度 |
| | | public void DeleteByGlassID(String glassid) { |
| | | public void DeleteByGlassIDs(String glassid) { |
| | | StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell()); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | |
| | | spianMapper.UpdateCageadd(glassid, 1);// 更改笼子表进片状态 |
| | | String barcode = spianMapper.SelectBarcode(glassid);// 获取该玻璃的铝框id |
| | | spianMapper.UpdateAddQueue(glassid);// 把进片的玻璃更新到出片队列中 |
| | | if (barcode != null) { |
| | | int barcodeState = spianMapper.SelectOverState(barcode);// 获取该铝框的状态 |
| | | if (barcodeState == 0) {// 当该铝框所有的玻璃都是完成状态时删除在出片队列的数据 |
| | | spianMapper.DeleteQueue(barcode); |
| | | } |
| | | } |
| | | // if (barcode != null) { |
| | | // int barcodeState = spianMapper.SelectOverState(barcode);// 获取该铝框的状态 |
| | | // if (barcodeState == 0) {// 当该铝框所有的玻璃都是完成状态时删除在出片队列的数据 |
| | | // spianMapper.DeleteQueue(barcode); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class StorageCageService { |
| | | @Autowired |
| | | private HomeMapper homeMapper; |
| | | |
| | | @Autowired |
| | | private OutSliceServive outSliceServive; |
| | | |
| | | @Autowired |
| | | private SpianService spianService; |
| | | |
| | | public void EndTask(int types) { |
| | | if (types == 0) {// 终止进片任务 |
| | | List<StorageTask> cageList = homeMapper.SelectTaskByState(types); |
| | | for (StorageTask storageTask : cageList) { |
| | | outSliceServive.StopTask(storageTask.getGlassId(), types); |
| | | } |
| | | // 发送终止进片任务信号 |
| | | } else {// 终止出片任务 |
| | | List<StorageCage> storageCages =homeMapper.selectinout(types); |
| | | for (StorageCage storageCage : storageCages) { |
| | | List<StorageCage> storageCagess=homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); |
| | | for (StorageCage storageCagez : storageCagess) { |
| | | if (storageCagez.getState().equals("2")) {//调拨进片 |
| | | outSliceServive.StopTask(storageCagez.getGlassId(), 0); |
| | | }else{//出片 |
| | | outSliceServive.StopTask(storageCagez.getGlassId(), types); |
| | | } |
| | | List<StorageTask> cageList = homeMapper.SelectTaskByState(types); |
| | | for (StorageTask storageTask : cageList) { |
| | | outSliceServive.StopTask(storageTask.getGlassId(), types); |
| | | } |
| | | // 发送终止进片任务信号 |
| | | } else {// 终止出片任务 |
| | | List<StorageCage> storageCages = homeMapper.selectinout(3); |
| | | for (StorageCage storageCage : storageCages) { |
| | | List<StorageCage> storageCagess = homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); |
| | | for (StorageCage storageCagez : storageCagess) { |
| | | if (storageCagez.getState().equals("2")) {// 调拨进片 |
| | | outSliceServive.StopTask(storageCagez.getGlassId(), 0); |
| | | } else {// 出片 |
| | | outSliceServive.StopTask(storageCagez.getGlassId(), types); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | if (types == 0) {// 完成进片 |
| | | spianService.overtask(glassid); |
| | | } else if (types == 1) {// 完成出片 |
| | | } else if (types == 1) {// 完成出片 |
| | | spianService.overtask(glassid); |
| | | } else if (types == 2) {// 终止进片任务 |
| | | } else if (types == 2) {// 终止进片任务 |
| | | outSliceServive.StopTask(glassid, 0); |
| | | // 发送终止进片任务信号 |
| | | } else {// 终止出片任务 |
| | | } else {// 终止出片任务 |
| | | outSliceServive.StopTask(glassid, 1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |