| | |
| | | package com.zy.api.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | import com.zy.asrs.entity.param.OpenOrderPakoutParam; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Api(value = "HMES对接") |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("/api") |
| | | public class HmesApiController { |
| | | |
| | |
| | | @ApiOperation("下发生产任务") |
| | | @PostMapping("/work/tasks") |
| | | public R menauWork(@RequestBody OpenOrderPakoutParam params) { |
| | | log.info("下发生产任务={}", JSONObject.toJSONString(params)); |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | |
| | | import com.zy.asrs.service.impl.OrderDetlPakoutServiceImpl; |
| | | import com.zy.asrs.service.impl.OrderPakoutServiceImpl; |
| | | import com.zy.common.model.DetlDto; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class HmesApiServiceImpl implements HmesApiService { |
| | | |
| | | @Autowired |
| | |
| | | // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据 |
| | | if (!Cools.isEmpty(order)) { |
| | | if (order.getSettle() > 1L) { |
| | | log.error(param.getOrderNo() + "正在出库,无法修改单据"); |
| | | throw new CoolException(param.getOrderNo() + "正在出库,无法修改单据"); |
| | | } |
| | | orderPakoutService.remove(order.getId()); |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(param.getBillType(), Boolean.FALSE); |
| | | Date now = new Date(); |
| | | |
| | | // 单据明细档 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getMatList(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getDevNo(),detail.getStandby2(),detail.getStandby3(),detail.getLineNumber(), |
| | | detail.getBoxType1(),detail.getBoxType2(),detail.getBoxType3(), detail.getAnfme()); |
| | | if (DetlDto.hasLineNumber(list, dto)) { |
| | | DetlDto detlDto = DetlDto.findLineNumber(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getDevNo(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber(), |
| | | dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | | list.add(dto); |
| | | } |
| | | } |
| | | //下发的订单明细,查看库存是否有足够的库存,排除机台的库位 |
| | | for (DetlDto detail : list) { |
| | | List<LocDetl> matnr = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", detail.getMatnr())); |
| | | Double count=0.0; |
| | | for (LocDetl detl : matnr) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", detl.getLocNo()).eq("loc_sts","F")); |
| | | if (locMast != null) { |
| | | LocAroundBind bLocNo = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>().eq("b_loc_no", locMast.getLocNo())); |
| | | if (Cools.isEmpty(bLocNo)) { |
| | | count=detl.getAnfme()+count; |
| | | } |
| | | } |
| | | } |
| | | if (count<detail.getAnfme()) { |
| | | return R.error("物料="+detail.getMatnr()+"库存不足无法生成订单"); |
| | | } |
| | | } |
| | | // 单据主档 |
| | | order = new OrderPakout( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | |
| | | ); |
| | | if (!orderPakoutService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | // 单据明细档 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getMatList(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getDevNo(),detail.getStandby2(),detail.getStandby3(),detail.getLineNumber(), |
| | | detail.getBoxType1(),detail.getBoxType2(),detail.getBoxType3(), detail.getAnfme()); |
| | | if (DetlDto.hasLineNumber(list, dto)) { |
| | | DetlDto detlDto = DetlDto.findLineNumber(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getDevNo(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber(), |
| | | dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | | list.add(dto); |
| | | } |
| | | } |
| | | //下发的订单明细,查看库存是否有足够的库存,排除机台的库位 |
| | | for (DetlDto detail : list) { |
| | | List<LocDetl> matnr = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", detail.getMatnr())); |
| | | Double count=0.0; |
| | | for (LocDetl detl : matnr) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", detl.getLocNo()).eq("loc_sts","F")); |
| | | if (locMast != null) { |
| | | LocAroundBind bLocNo = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>().eq("b_loc_no", locMast.getLocNo())); |
| | | if (Cools.isEmpty(bLocNo)) { |
| | | count=detl.getAnfme()+count; |
| | | } |
| | | } |
| | | } |
| | | if (count<detail.getAnfme()) { |
| | | return R.error("物料="+detail.getMatnr()+"库存不足无法生成订单"); |
| | | } |
| | | } |
| | | for (DetlDto detlDto : list) { |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | |
| | | }else if (!Objects.isNull(params.getType()) && params.getType().equals("move")) { |
| | | url = createLocMoveTask; |
| | | } |
| | | String response; |
| | | String response = null; |
| | | R r = R.ok(); |
| | | try { |
| | | log.info("下发搬运任务给wcs="+JSON.toJSONString(params)); |
| | |
| | | } |
| | | } |
| | | } |
| | | }else if (wrkMast.getIoType()==101){ |
| | | }else if (wrkMast.getIoType()==101 || wrkMast.getIoType()==110) { |
| | | wrkMast.setWrkSts(12L); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | |
| | | } |
| | | //TODO 上报是否成功 |
| | | }else { |
| | | r =R.error(); |
| | | String msg = jsonObject.getString("msg"); |
| | | if (Cools.isEmpty(msg)) { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | r = R.error(Cools.isEmpty(msg) ? "下发任务失败" : msg); |
| | | } |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | log.error("下发任务给wcs异常, request={}", JSON.toJSONString(params), e); |
| | | return R.error("调用WCS接口失败:" + e.getMessage()); |
| | | } catch (Exception e) { |
| | | log.error("解析WCS下发结果异常, request={}, response={}", JSON.toJSONString(params), response, e); |
| | | return R.error("WCS返回结果异常:" + e.getMessage()); |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 上报锁定/释放库位信息 |
| | | * |
| | |
| | | url = MesConstant.RELEASE_LOCS_URL; |
| | | } |
| | | } |
| | | String response; |
| | | String response = null; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URL) |
| | |
| | | } |
| | | } else { |
| | | throw new CoolException("任务号截取失败,请检查主任务档任档wrkCode字段"); |
| | | } |
| | | }else{ |
| | | String wrkNo = mast.getWrkCode(); |
| | | WrkMast orgWrk = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkNo)); |
| | | if (Objects.isNull(orgWrk)) { |
| | | throw new CoolException("数据错误,主任务档不存在或已删除!!"); |
| | | } |
| | | mast.setOveMk("Y"); |
| | | orgWrk.setOveMk("Y"); |
| | | if (!wrkMastService.updateById(orgWrk)) { |
| | | throw new CoolException("任务档修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | |
| | | return locAround; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | * Created by vincent on 2022/3/26 |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | public class OutController extends BaseController { |
| | | |
| | |
| | | if (issued <= 0.0D) { |
| | | continue; |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(null, exist,orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(null, exist, orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(), orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | |
| | | if (issued <= 0.0D) { |
| | | continue; |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(null, exist,orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(null, exist, orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(), orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | @Transactional |
| | | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | List<LocDto> locDtoArrayList = new ArrayList<>(); |
| | | for (LocDto locDto : locDtos){ |
| | | if (locDto.getFrozen()!=1 && locDto.getFrozenLoc()!=1){ |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.getFrozen() != 1 && locDto.getFrozenLoc() != 1) { |
| | | locDtoArrayList.add(locDto); |
| | | } |
| | | } |
| | |
| | | List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.isLack()) { continue; } |
| | | if (locDto.isLack()) { |
| | | continue; |
| | | } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getStaNo(), locDto, locDto.getStandby1()); |
| | | if (TaskDto.has(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | |
| | | } |
| | | } |
| | | // ----------------------------------------------------------------------------------------------- |
| | | int failCount = 0; |
| | | for (TaskDto taskDto : taskDtos) { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | if (!Objects.isNull(taskDto.getDeviceNo())) { |
| | | //生成出库任务 |
| | | workService.stockOut(staNo, taskDto, taskDto.getDeviceNo(), getUserId()); |
| | | } else { |
| | | workService.stockOut(staNo, taskDto, null, getUserId()); |
| | | if (!stockOutSafely(taskDto, getUserId(), "手动订单出库")) { |
| | | failCount++; |
| | | } |
| | | } |
| | | if (failCount > 0) { |
| | | return R.ok("部分出库任务已生成,成功" + (taskDtos.size() - failCount) + "条,失败" + failCount + "条,请查看日志"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private boolean stockOutSafely(TaskDto taskDto, Long userId, String scene) { |
| | | try { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | workService.stockOut(staNo, taskDto, taskDto.getDeviceNo(), userId); |
| | | return true; |
| | | } catch (Exception e) { |
| | | log.error("{}失败[locNo={}, staNo={}, deviceNo={}, orderNos={}],原因: {}", |
| | | scene, |
| | | taskDto.getLocNo(), |
| | | taskDto.getStaNo(), |
| | | taskDto.getDeviceNo(), |
| | | collectOrderNos(taskDto), |
| | | getErrorMessage(e)); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | private String collectOrderNos(TaskDto taskDto) { |
| | | Set<String> orderNos = new LinkedHashSet<>(); |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (!Cools.isEmpty(locDto.getOrderNo())) { |
| | | orderNos.add(locDto.getOrderNo()); |
| | | } |
| | | } |
| | | return orderNos.toString(); |
| | | } |
| | | |
| | | private String getErrorMessage(Exception e) { |
| | | return Cools.isEmpty(e.getMessage()) ? e.getClass().getSimpleName() : e.getMessage(); |
| | | } |
| | | } |
| | |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty("任务类型: agv, crn") |
| | | @TableField("task_type") |
| | | @TableId(value = "task_type") |
| | | private String taskType; |
| | | |
| | | @ApiModelProperty("任务编码") |
| | |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | |
| | | , @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3 |
| | | , @Param("boxType1")String boxType1, @Param("boxType2")String boxType2, @Param("boxType3")String boxType3, @Param("crnNo") Integer crnNo); |
| | | |
| | | int updatePublishError(@Param("wrkNo") Integer wrkNo, |
| | | @Param("updMk") String updMk, |
| | | @Param("errorTime") Date errorTime, |
| | | @Param("errorMemo") String errorMemo); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.result.FindLocNoAttributeVo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public interface WrkMastService extends IService<WrkMast> { |
| | |
| | | |
| | | List<WrkMast> selectWrkMastWrkDetl(Integer ioType, FindLocNoAttributeVo findLocNoAttributeVo, Integer crnNo); |
| | | |
| | | int updatePublishError(Integer wrkNo, String updMk, Date errorTime, String errorMemo); |
| | | |
| | | } |
| | |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn() + ""); // 源站 |
| | | wrkMast.setStaNo(staDesc.getStnNo() + ""); // 目标站 |
| | | wrkMast.setOveMk(staDesc.getStnNo()==1076? "Y":"N"); |
| | | wrkMast.setSourceLocNo(dto.getLocNo()); // 源库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | |
| | | .eq("dev_no", basDevice.getType()).orderBy("order_no")); |
| | | |
| | | if (Objects.isNull(binds)) { |
| | | throw new CoolException("机台未设置默认工作位!!"); |
| | | log.error(deviceNo+"---"+basDevice.getType()+"--没有可用机台"); |
| | | return; |
| | | } |
| | | // |
| | | // Set<String> locs = binds.stream().map(LocAroundBind::getBlocNo).collect(Collectors.toSet()); |
| | |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk("Y"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setOveMk("Y"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | |
| | | ,findLocNoAttributeVo.getBoxType1(),findLocNoAttributeVo.getBoxType2(),findLocNoAttributeVo.getBoxType3() |
| | | ,crnNo); |
| | | } |
| | | |
| | | @Override |
| | | public int updatePublishError(Integer wrkNo, String updMk, Date errorTime, String errorMemo) { |
| | | return this.baseMapper.updatePublishError(wrkNo, updMk, errorTime, errorMemo); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(null, exist, detl.getMatnr(), detl.getBatch(), |
| | | detl.getBrand(), detl.getStandby1(), detl.getStandby2(), detl.getStandby3(), detl.getBoxType1(), detl.getBoxType2(), detl.getBoxType3()); |
| | | for (LocDetl locDetl : locDetls) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo()).eq("loc_sts","F")); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo()).eq("loc_sts", "F")); |
| | | if (locMast != null) { |
| | | LocAroundBind bLocNo = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>().eq("b_loc_no", locMast.getLocNo())); |
| | | if (!Cools.isEmpty(bLocNo)) { |
| | |
| | | List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.isLack()) { continue; } |
| | | if (locDto.isLack()) { |
| | | continue; |
| | | } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getStaNo(), locDto, locDto.getStandby1()); |
| | | if (TaskDto.has(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | |
| | | } |
| | | } |
| | | // ----------------------------------------------------------------------------------------------- |
| | | int failCount = 0; |
| | | for (TaskDto taskDto : taskDtos) { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | if (!Objects.isNull(taskDto.getDeviceNo())) { |
| | | //生成出库任务 |
| | | workService.stockOut(staNo, taskDto, taskDto.getDeviceNo(), 9995L); |
| | | } else { |
| | | workService.stockOut(staNo, taskDto, null, 9995L); |
| | | if (!stockOutSafely(taskDto, 9995L, "自动订单出库")) { |
| | | failCount++; |
| | | } |
| | | } |
| | | if (failCount > 0) { |
| | | log.warn("自动订单出库部分失败[orderNo={}],成功{}条,失败{}条", |
| | | order.getOrderNo(), taskDtos.size() - failCount, failCount); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | private boolean stockOutSafely(TaskDto taskDto, Long userId, String scene) { |
| | | try { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | workService.stockOut(staNo, taskDto, taskDto.getDeviceNo(), userId); |
| | | return true; |
| | | } catch (Exception e) { |
| | | log.error("{}失败[locNo={}, staNo={}, deviceNo={}, orderNos={}],原因: {}", |
| | | scene, |
| | | taskDto.getLocNo(), |
| | | taskDto.getStaNo(), |
| | | taskDto.getDeviceNo(), |
| | | collectOrderNos(taskDto), |
| | | getErrorMessage(e)); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | private String collectOrderNos(TaskDto taskDto) { |
| | | Set<String> orderNos = new LinkedHashSet<>(); |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (!Cools.isEmpty(locDto.getOrderNo())) { |
| | | orderNos.add(locDto.getOrderNo()); |
| | | } |
| | | } |
| | | return orderNos.toString(); |
| | | } |
| | | |
| | | private String getErrorMessage(Exception e) { |
| | | return Cools.isEmpty(e.getMessage()) ? e.getClass().getSimpleName() : e.getMessage(); |
| | | } |
| | | } |
| | |
| | | import com.zy.api.service.WcsApiService; |
| | | import com.zy.asrs.entity.LocAroundBind; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.TaskMapper; |
| | | import com.zy.asrs.service.LocAroundBindService; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | |
| | | } |
| | | Collections.shuffle(wrkMasts); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | //查看下发任务是否为冻结库位,是冻结库位则跳过下发任务 |
| | | LocAroundBind locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (Cools.isEmpty(locAroundBind)) { |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | try { |
| | | //查看下发任务是否为冻结库位,是冻结库位则跳过下发任务 |
| | | LocAroundBind locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | if (Cools.isEmpty(locAroundBind)) { |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("源库位被冻结")); |
| | | continue; |
| | | } |
| | | } else { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("目标库位被冻结")); |
| | | continue; |
| | | } |
| | | }else { |
| | | continue; |
| | | } |
| | | Integer crnNo = wrkMast.getCrnNo(); |
| | | //该堆垛机已经下发任务给wcs后不再下发新的搬运任务 |
| | | List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", Arrays.asList(2L, 12L))); |
| | | if (!wrkMasts1.isEmpty()) { |
| | | continue; |
| | | } |
| | | //源库位为冻结库位时禁止下发搬运任务给堆垛机 |
| | | if (!Cools.isEmpty(wrkMast.getSourceLocNo())){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("frozen",0)); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | // Integer crnNo = wrkMast.getCrnNo(); |
| | | // //该堆垛机已经下发任务给wcs后不再下发新的搬运任务 |
| | | // List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", Arrays.asList(2L, 12L))); |
| | | // if (!wrkMasts1.isEmpty()) { |
| | | // continue; |
| | | // } |
| | | //源库位为冻结库位时禁止下发搬运任务给堆垛机 |
| | | if (!Cools.isEmpty(wrkMast.getSourceLocNo())) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("frozen", 0)); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //目标库位为冻结库位时禁止下发搬运任务给堆垛机 |
| | | if (!Cools.isEmpty(wrkMast.getLocNo())){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", wrkMast.getLocNo()) |
| | | .eq("frozen",0)); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | //目标库位为冻结库位时禁止下发搬运任务给堆垛机 |
| | | if (!Cools.isEmpty(wrkMast.getLocNo())) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", wrkMast.getLocNo()) |
| | | .eq("frozen", 0)); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String wcsSourceLocNo = Cools.isEmpty(wrkMast.getSourceLocNo()) ? "" : Utils.WMSLocToWCSLoc(wrkMast.getSourceLocNo()); |
| | | String wcsLocNo = Cools.isEmpty(wrkMast.getLocNo()) ? "" : Utils.WMSLocToWCSLoc(wrkMast.getLocNo()); |
| | | WorkTaskParams params = new WorkTaskParams(); |
| | | //出库和移库 |
| | | if(wrkMast.getIoType()==101&&!Cools.isEmpty(wrkMast.getStaNo())&& !wrkMast.getStaNo().equals("0")) { |
| | | params.setType("out") |
| | | .setTaskNo(wrkMast.getWrkNo()+"") |
| | | .setSourceLocNo(wcsSourceLocNo) |
| | | .setLocNo(wcsLocNo) |
| | | .setStaNo(wrkMast.getStaNo()) |
| | | .setTaskPri(wrkMast.getIoPri().intValue()) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | }else if(wrkMast.getIoType()==2&& !Cools.isEmpty(wrkMast.getSourceStaNo())){ |
| | | params.setType("in") |
| | | .setTaskNo(wrkMast.getWrkNo()+"") |
| | | .setSourceStaNo(wrkMast.getSourceStaNo()) |
| | | .setLocNo(wcsLocNo) |
| | | .setTaskPri(wrkMast.getIoPri().intValue()) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | } else { |
| | | params.setType("move") |
| | | .setTaskNo(wrkMast.getWrkNo()+"") |
| | | .setSourceLocNo(wcsSourceLocNo) |
| | | .setLocNo(wcsLocNo) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | String wcsSourceLocNo = Cools.isEmpty(wrkMast.getSourceLocNo()) ? "" : Utils.WMSLocToWCSLoc(wrkMast.getSourceLocNo()); |
| | | String wcsLocNo = Cools.isEmpty(wrkMast.getLocNo()) ? "" : Utils.WMSLocToWCSLoc(wrkMast.getLocNo()); |
| | | Integer taskPri = wrkMast.getIoPri() == null ? null : wrkMast.getIoPri().intValue(); |
| | | WorkTaskParams params = new WorkTaskParams(); |
| | | //出库和移库 |
| | | if ((wrkMast.getIoType() == 101 || wrkMast.getIoType() == 110) && !Cools.isEmpty(wrkMast.getStaNo()) && !wrkMast.getStaNo().equals("0")) { |
| | | params.setType("out") |
| | | .setTaskNo(wrkMast.getWrkNo() + "") |
| | | .setSourceLocNo(wcsSourceLocNo) |
| | | .setLocNo(wcsLocNo) |
| | | .setStaNo(wrkMast.getStaNo()) |
| | | .setTaskPri(taskPri) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | } else if (wrkMast.getIoType() == 2 && !Cools.isEmpty(wrkMast.getSourceStaNo())) { |
| | | params.setType("in") |
| | | .setTaskNo(wrkMast.getWrkNo() + "") |
| | | .setSourceStaNo(wrkMast.getSourceStaNo()) |
| | | .setStaNo(wrkMast.getStaNo()) |
| | | .setLocNo(wcsLocNo) |
| | | .setTaskPri(taskPri) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | } else { |
| | | params.setType("move") |
| | | .setTaskNo(wrkMast.getWrkNo() + "") |
| | | .setSourceLocNo(wcsSourceLocNo) |
| | | .setLocNo(wcsLocNo) |
| | | .setBarcode(wrkMast.getBarcode()); |
| | | } |
| | | R r = wcsApiService.pubWrkToWcs(params); |
| | | if (isSuccess(r)) { |
| | | clearPublishError(wrkMast.getWrkNo()); |
| | | break; |
| | | } |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf(r.get("msg"))); |
| | | } catch (Exception e) { |
| | | log.error("工作档[wrkNo={}]下发任务异常", wrkMast.getWrkNo(), e); |
| | | markPublishError(wrkMast.getWrkNo(), e.getMessage()); |
| | | } |
| | | R r = wcsApiService.pubWrkToWcs(params); |
| | | if (r.get("code").equals(200)){ |
| | | break; |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | |
| | | private boolean isSuccess(R r) { |
| | | return r != null && "200".equals(String.valueOf(r.get("code"))); |
| | | } |
| | | |
| | | private void markPublishError(Integer wrkNo, String msg) { |
| | | if (wrkMastService.updatePublishError(wrkNo, "X", new Date(), buildPublishErrorMsg(msg)) <= 0) { |
| | | log.error("工作档[wrkNo={}]回写下发异常失败", wrkNo); |
| | | } |
| | | } |
| | | |
| | | private void clearPublishError(Integer wrkNo) { |
| | | if (wrkMastService.updatePublishError(wrkNo, null, null, null) <= 0) { |
| | | log.error("工作档[wrkNo={}]清理下发异常失败", wrkNo); |
| | | } |
| | | } |
| | | |
| | | private String buildPublishErrorMsg(String msg) { |
| | | return Cools.isEmpty(msg) || "null".equalsIgnoreCase(msg) ? "下发任务失败" : "下发任务失败:" + msg; |
| | | } |
| | | |
| | | /** |
| | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber * 2; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | if (basCrnpService.checkSiteError(crnNo, true)) { |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | |
| | | .eq("whs_type", rowLastnoType.getType().longValue())); |
| | | int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100)); |
| | | if (locMasts.size() - crnCountO <= 2) { |
| | | if(curRow+2==7){ |
| | | |
| | | } |
| | | log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | nearRow = 0; |
| | | times++; |
| | |
| | | } |
| | | if (nearRow == 0) { |
| | | throw new CoolException("无可用堆垛机"); |
| | | } |
| | | |
| | | boolean signRule1 = false; |
| | | boolean signRule2 = false; |
| | | |
| | | |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | // 靠近摆放规则 --- 同天同规格物料 //分离版 |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) { |
| | | signRule1 = true; |
| | | } |
| | | // 靠近摆放规则 --- 同天同规格物料 //互通版 |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) { |
| | | signRule2 = true; |
| | | } |
| | | |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) { |
| | | signRule1 = true; |
| | | } |
| | | } |
| | | |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "O") |
| | | .eq("whs_type", rowLastnoType.getType().longValue())); |
| | | for (LocMast locMast1 : locMasts) { |
| | | //获取巷道 |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow); |
| | | // LocMast locMastGro = locMastService.selectById(wrkMast.getLocNo()); |
| | | //获取目标库位所在巷道最浅非空库位 |
| | | LocMast locMastF = locMastService.selectLocByLocStsPakInF(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMastF) && locMastF.getLocSts().equals("F")) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMastF.getLocNo())); |
| | | if (!Cools.isEmpty(locDetl) && findLocNoAttributeVo.beSimilar(locDetl)) { |
| | | //获取目标库位所在巷道最深空库位 |
| | | locMast = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (signRule2) { |
| | | List<String> locNos = locDetlService.getSameDetlToday(findLocNoAttributeVo.getMatnr(), sRow, eRow); |
| | | for (String locNo : locNos) { |
| | | if (Utils.isShallowLoc(slaveProperties, locNo)) { |
| | | continue; |
| | | } |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | locMast = shallowLoc; |
| | | crnNo = locMast.getCrnNo(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // // 靠近摆放规则 --- 空托 //分离版 |
| | | // if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(whsType)) { |
| | | // List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); |
| | | // for (LocMast locMast1:locMasts){ |
| | | // if (VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | // continue; |
| | | // } |
| | | // String shallowLoc = Utils.getDeepLoc(slaveProperties,locMast1.getLocNo()); |
| | | // LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",shallowLoc)); |
| | | // if (!Cools.isEmpty(locMast2) && locMast2.getLocSts().equals("D")){ |
| | | // locMast = locMast1; |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "D").eq("frozen", 0).eq("deleted", 0) |
| | | .ge("row1", sRow).le("row1", eRow).eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!locMasts.isEmpty()) { |
| | | for (LocMast loc : locMasts) { |
| | | if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { |
| | | continue; |
| | | } |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | locMast = shallowLoc; |
| | | crnNo = locMast.getCrnNo(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | Wrapper<StaDesc> wrapper = null; |
| | |
| | | @PostMapping("/pakin/loc/v1") |
| | | @ResponseBody |
| | | public synchronized R getLocNo(@RequestBody SearchLocParam param) { |
| | | StartupDto dto = null; |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | |
| | | //3S19000677895,M22003772,3 ,KP, 0A2030 ,0A2030202306050023 |
| | | //3S箱码号 ,端子物料号 ,数量,单位,供应商编号,供应商批次号 |
| | | //数量和重量转换出来的是否差不多 |
| | | //weight 为 43.39 去皮2.35 = 41.05 |
| | | //weight 为 43.39 去皮2.45 = 40.95 |
| | | //托盘码例子 845000820308,M11000787,1000,MT,0A1263,0A126320260120 |
| | | //换算需要41.05*24.36约等于1000 |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | |
| | | String threeCode = param.getBarcode(); |
| | | param.setBarcode(barcode); |
| | | //实际称重数量 |
| | | Double m = param.getWeight() -2.35; |
| | | Double m = param.getWeight() -2.45; |
| | | |
| | | |
| | | WrkMast wrkMast1 = wrkMastService.selectByBarcode(barcode); |
| | | if (!Cools.isEmpty(wrkMast1)&&wrkMast1.getWrkSts()==2) { |
| | | StartupDto dto1 =new StartupDto(); |
| | | dto1.setBarcode(barcode); |
| | | dto1.setSourceStaNo(Integer.valueOf(wrkMast1.getSourceStaNo())); |
| | | dto1.setStaNo(Integer.valueOf(wrkMast1.getStaNo())); |
| | | String s = Utils.WMSLocToWCSLoc(wrkMast1.getLocNo()); |
| | | dto1.setLocNo(s); |
| | | dto1.setCrnNo(wrkMast1.getCrnNo()); |
| | | dto1.setWorkNo(wrkMast1.getWrkNo()); |
| | | dto1.setTaskPri((int) Math.round(wrkMast1.getIoPri())); |
| | | return R.ok(dto1); |
| | | } |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if(mat==null){ |
| | | log.info("没有找到该物料档案--"+matnr+"组托时自动新增物料,默认24.36KG/M"); |
| | |
| | | waitPakin.setZpallet(param.getBarcode()); |
| | | waitPakin.setAnfme(m); |
| | | waitPakin.setThreeCode(threeCode); |
| | | waitPakins.add(waitPakin); |
| | | waitPakinService.insert(waitPakin); |
| | | }else { |
| | | for(WaitPakin waitPakin : waitPakins){ |
| | |
| | | if(Cools.isEmpty(waitPakin.getBeBatch())||waitPakin.getBeBatch()!=1){ |
| | | flag = true; |
| | | } |
| | | if (flag && (weight - m < -2.0 || weight - m > 2.0)) { |
| | | //2.5KG * 每公斤长度 = 误差值 |
| | | Double dou= 2.5*mat.getVolume(); |
| | | if (flag && (weight - m < -dou || weight - m > dou)) { |
| | | return R.error("二维码="+threeCode+"的物料实际称重转换成的米数和物料标签提供的米数相差较大需要退回或者标记后才能入库!"); |
| | | } |
| | | |
| | |
| | | sourceStaNo.setLocType1(param.getLocType1()); |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | |
| | | StartupDto dto = null; |
| | | switch (param.getIoType()) { |
| | | case 1://满托盘入库 |
| | | assert waitPakins != null; |
| | |
| | | logger.info("++++++++ 开始加载许可证 ++++++++"); |
| | | |
| | | try { |
| | | // String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath(); |
| | | // File publicKeysStoreFile = new File(publicKeysStoreFileName); |
| | | // |
| | | // String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath(); |
| | | // File licensePathFile = new File(licensePathFileName); |
| | | String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath(); |
| | | File publicKeysStoreFile = new File(publicKeysStoreFileName); |
| | | |
| | | String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath(); |
| | | File licensePathFile = new File(licensePathFileName); |
| | | |
| | | LicenseVerifyParam param = new LicenseVerifyParam(); |
| | | param.setSubject(subject); |
| | |
| | | |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | //安装证书 |
| | | // LicenseContent install = licenseVerify.install(param); |
| | | LicenseContent install = licenseVerify.install(param); |
| | | |
| | | logger.info("++++++++ 许可证加载结束 ++++++++"); |
| | | |
| | | logger.info("++++++++ 许可证加载标记,搜索修改 ++++++++"); |
| | | licenseTimer.setSystemSupport(true); |
| | | licenseTimer.setLicenseDays(9999); |
| | | return true; |
| | | // licenseTimer.setLicenseDays(9999); |
| | | // return true; |
| | | |
| | | // licenseTimer.setSystemSupport(install!=null); |
| | | // |
| | | // if (install != null) { |
| | | // Date start = new Date(); |
| | | // Date end = install.getNotAfter(); |
| | | // Long starTime = start.getTime(); |
| | | // Long endTime = end.getTime(); |
| | | // Long num = endTime - starTime;//时间戳相差的毫秒数 |
| | | // int day = (int) (num / 24 / 60 / 60 / 1000); |
| | | // licenseTimer.setLicenseDays(day); |
| | | // } |
| | | // |
| | | // |
| | | // return install != null; |
| | | licenseTimer.setSystemSupport(install!=null); |
| | | |
| | | if (install != null) { |
| | | Date start = new Date(); |
| | | Date end = install.getNotAfter(); |
| | | Long starTime = start.getTime(); |
| | | Long endTime = end.getTime(); |
| | | Long num = endTime - starTime;//时间戳相差的毫秒数 |
| | | int day = (int) (num / 24 / 60 / 60 / 1000); |
| | | licenseTimer.setLicenseDays(day); |
| | | } |
| | | |
| | | |
| | | return install != null; |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: integrationasrs |
| | | subject: jxhtasrs |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="area_id" property="areaId" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | |
| | | <result column="full_plt" property="fullPlt" /> |
| | | <result column="pre_have" property="preHave" /> |
| | | <result column="take_none" property="takeNone" /> |
| | | <result column="task_type" property="taskType" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectToBeCompleteData" resultMap="BaseResultMap"> |
| | |
| | | </choose> |
| | | </select> |
| | | |
| | | <update id="updatePublishError"> |
| | | update asr_wrk_mast |
| | | set upd_mk = #{updMk}, |
| | | error_time = #{errorTime}, |
| | | error_memo = #{errorMemo} |
| | | where wrk_no = #{wrkNo} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | , {field: 'blocNo', align: 'center', title: '工位'} |
| | | , {field: 'locType$', align: 'center', title: '工位状态'} |
| | | , {field: 'def$', align: 'center', title: '工位类型'} |
| | | , {field: 'freeze', align: 'center', title: '是否冻结'} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 240} |
| | | ]], |
| | | request: { |
| | |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | ,{field: 'isSuplus$', align: 'center', title: '回库类型', hide: false, width: 120} |
| | | ,{field: 'errorMemo', align: 'center',title: '下发/异常信息', minWidth: 220} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true, width: 160} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:350} |
| | |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | | |
| | |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">编号:</label> |
| | | <label class="layui-form-label">机台号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="dev_no" placeholder="机台号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">内部编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="type" placeholder="内部编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |