| | |
| | | |
| | | /** |
| | | * 编号 |
| | | * |
| | | * |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | |
| | | |
| | | locMast.setPackStatus(1); |
| | | locMast.setModiTime(now); |
| | | |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(1); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){ |
| | | throw new CoolException("申请测试失败"); |
| | | } |
| | |
| | | matNew.setTagId(tag.getId()); |
| | | matNew.setMatnr(param.getPackName()); |
| | | matNew.setMaktx(param.getPackName()); |
| | | matNew.setDeadWarn(param.getSettingTimes()); |
| | | matNew.setDeadWarn(mat.getDeadWarn()); |
| | | matNew.setCreateBy(9999L);//9999表示erp下发 |
| | | matNew.setCreateTime(new Date()); |
| | | matNew.setUpdateBy(9999L);//9999表示erp下发 |
| | |
| | | throw new CoolException("更新测试状态失败"); |
| | | } |
| | | locMast.setPackStatus(2); |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(2); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | |
| | | |
| | | throw new CoolException("更新产品状态失败"); |
| | | } |
| | | } else if (Cools.isEmpty(testMast.getStatus())){ |
| | |
| | | } |
| | | |
| | | Integer outSta = staNo.getDevNo(); |
| | | //2号堆垛机全板出库站指定为204站,拣料站指定为202 |
| | | //2号堆垛机全板出库站指定为103 |
| | | if(locMast.getCrnNo()==2){ |
| | | outSta = ioType == 101 ? 204 : 202; |
| | | outSta = 103; |
| | | //出库站点为205, |
| | | }else if(staNo.getDevNo()==205){ |
| | | |
| | | } |
| | | |
| | | // 获取路径 |
| | |
| | | // exceptionHandle("全板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | }else { |
| | | //2.入库完成 |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(2); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | } |
| | | } |
| | | break; |
| | |
| | | throw new CoolException("更改测试状态失败"); |
| | | } |
| | | } |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(5); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | } |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // Map<String, Object> map = new HashMap<>() |
| | | // map.put("appkey","ea1f0459efc02a79f046f982767939ae"); |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(map) |
| | |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) { |
| | | |
| | | if (sourceStaNo.equals(100)) { |
| | | if (sourceStaNo.equals(202)) { |
| | | whsType = 1; |
| | | locTypeDto.setLocType1((short) 1); |
| | | } else if (sourceStaNo.equals(200)) { |
| | | } else if (sourceStaNo.equals(209)) { |
| | | whsType = 2; |
| | | locTypeDto.setLocType1((short) 2); |
| | | } |
| | |
| | | Short locType2 = getLocType2Small(curRow, locTypeDto.getLocType1()); |
| | | locMast = locMastService.queryFreeLocMast2(curRow, locTypeDto.getLocType1(), locType2); |
| | | } else { //默认规则 |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.PostMesDataUtils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | |
| | | import com.zy.common.web.param.SearchLocParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @Value("mes.url") |
| | | private String mesUrl; |
| | | |
| | | @Value("mes.inPath") |
| | | private String inpath; |
| | | |
| | | @PostMapping("/pakin/loc/v1") |
| | | @ResponseBody |
| | |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)){ |
| | | throw new CoolException("改变库位状态失败"); |
| | | }else{ |
| | | //1.扫码上报 |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(1); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo()+"目标库位已被占用"); |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=zjfnasrs |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=zjfnasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | # 充放电测试通道 |
| | | channel: |
| | | # 最大通道数 |
| | | channelMax: 48 |
| | | channelMax: 24 |
| | | # 充放电测试柜数量 |
| | | equipmentCount: 6 |
| | | # 测试库位所在排号 |
| | |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单箱体积</label> |
| | | <label class="layui-form-label">静置时长(分钟)</label> |
| | | <div class="layui-input-block"> |
| | | <input name="threeCode" placeholder="请输入箱子尺寸" class="layui-input"> |
| | | <input name="deadWarn" placeholder="请输入静置时长" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |