| | |
| | | } |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | // 2.重组数据 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | } |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetlPakin orderDetl : param.getOrderDetlPakinList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getLineNumber(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | // 2.重组数据 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetlPakin orderDetl : param.getOrderDetlPakinList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand() |
| | | ,orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | } |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetlPakout orderDetl : param.getOrderDetlPakoutList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | // 2.重组数据 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetlPakout orderDetl : param.getOrderDetlPakoutList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3()); |
| | | OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | // if (!orderDetlService.decrease(entity.getOrderNo(), entity.getMatnr(), entity.getBatch(), entity.getAnfme())) { |
| | | // return R.error("订单数据回滚失败"); |
| | | // } |
| | | OrderInAndOutUtil.decrease(Boolean.TRUE, entity.getOrderNo(), entity.getMatnr(), entity.getBatch(),entity.getBrand(),entity.getStandby1(),entity.getStandby2(),entity.getStandby3(), entity.getAnfme()); |
| | | OrderInAndOutUtil.decrease(Boolean.TRUE, entity.getOrderNo(), entity.getMatnr(), entity.getBatch(),entity.getBrand() |
| | | ,entity.getStandby1(),entity.getStandby2(),entity.getStandby3() |
| | | ,entity.getBoxType1(),entity.getBoxType2(),entity.getBoxType3() |
| | | , entity.getAnfme()); |
| | | } |
| | | } |
| | | return R.ok(); |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | /** |
| | | * 是否冻结 |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public OrderDetl() {} |
| | | |
| | |
| | | && this.standby1.equals(orderDetl.getStandby1()) |
| | | && this.standby2.equals(orderDetl.getStandby2()) |
| | | && this.standby3.equals(orderDetl.getStandby3()) |
| | | && this.boxType1.equals(orderDetl.getBoxType1()) |
| | | && this.boxType2.equals(orderDetl.getBoxType2()) |
| | | && this.boxType3.equals(orderDetl.getBoxType3()) |
| | | ); |
| | | } |
| | | |
| | | public static OrderDetl find(List<OrderDetl> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public static OrderDetl find(List<OrderDetl> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (OrderDetl detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1()) |
| | | && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3())) { |
| | | && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3()) |
| | | && boxType1.equals(detlDto.getBoxType1()) |
| | | && boxType2.equals(detlDto.getBoxType2()) && boxType3.equals(detlDto.getBoxType3()) |
| | | ) { |
| | | return detlDto; |
| | | } |
| | | } |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public OrderDetlPakin() {} |
| | | |
| | |
| | | && this.standby1.equals(orderDetlPakin.getStandby1()) |
| | | && this.standby2.equals(orderDetlPakin.getStandby2()) |
| | | && this.standby3.equals(orderDetlPakin.getStandby3()) |
| | | && this.boxType1.equals(orderDetlPakin.getBoxType1()) |
| | | && this.boxType2.equals(orderDetlPakin.getBoxType2()) |
| | | && this.boxType3.equals(orderDetlPakin.getBoxType3()) |
| | | ); |
| | | } |
| | | |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public OrderDetlPakout() {} |
| | | |
| | |
| | | && this.standby1.equals(orderDetlPakout.getStandby1()) |
| | | && this.standby2.equals(orderDetlPakout.getStandby2()) |
| | | && this.standby3.equals(orderDetlPakout.getStandby3()) |
| | | && this.boxType1.equals(orderDetlPakout.getBoxType1()) |
| | | && this.boxType2.equals(orderDetlPakout.getBoxType2()) |
| | | && this.boxType3.equals(orderDetlPakout.getBoxType3()) |
| | | ); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1; |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2; |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3; |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | // 物料数量 |
| | | private Double anfme; |
| | | |
| | |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | // 物料数量 |
| | | private Double anfme; |
| | |
| | | |
| | | private String lgort; |
| | | |
| | | public static void main(String[] args) { |
| | | OpenOrderPakoutParam param = new OpenOrderPakoutParam(); |
| | | param.setOrderNo("LXT12321321"); |
| | | param.setOrderType("交货单"); |
| | | param.setOrderTime(DateUtils.convert(new Date())); |
| | | List<DetlDto> orderDetails = new ArrayList<>(); |
| | | param.setOrderDetails(orderDetails); |
| | | DetlDto detlDto = new DetlDto("15099-10000", 3.0); |
| | | orderDetails.add(detlDto); |
| | | System.out.println(JSON.toJSONString(param)); |
| | | } |
| | | // public static void main(String[] args) { |
| | | // OpenOrderPakoutParam param = new OpenOrderPakoutParam(); |
| | | // param.setOrderNo("LXT12321321"); |
| | | // param.setOrderType("交货单"); |
| | | // param.setOrderTime(DateUtils.convert(new Date())); |
| | | // List<DetlDto> orderDetails = new ArrayList<>(); |
| | | // param.setOrderDetails(orderDetails); |
| | | // DetlDto detlDto = new DetlDto("15099-10000", 3.0); |
| | | // orderDetails.add(detlDto); |
| | | // System.out.println(JSON.toJSONString(param)); |
| | | // } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.entity.result; |
| | | |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | |
| | | public class FindLocNoAttributeVo { |
| | | private String matnr = ""; |
| | | private String specs = ""; |
| | |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | public FindLocNoAttributeVo() { |
| | | } |
| | |
| | | public FindLocNoAttributeVo(String matnr, String batch) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | } |
| | | |
| | | public FindLocNoAttributeVo(String matnr, String specs, String batch, String grade, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | this.matnr = matnr; |
| | | this.specs = specs; |
| | | this.batch = batch; |
| | | this.grade = grade; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public FindLocNoAttributeVo(String matnr, String batch, String brand) { |
| | |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | } |
| | | |
| | | public String getBoxType1() { |
| | | return boxType1; |
| | | } |
| | | |
| | | public void setBoxType1(String boxType1) { |
| | | this.boxType1 = boxType1; |
| | | } |
| | | |
| | | public String getBoxType2() { |
| | | return boxType2; |
| | | } |
| | | |
| | | public void setBoxType2(String boxType2) { |
| | | this.boxType2 = boxType2; |
| | | } |
| | | |
| | | public String getBoxType3() { |
| | | return boxType3; |
| | | } |
| | | |
| | | public void setBoxType3(String boxType3) { |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public String getMatnr() { |
| | |
| | | public void setStandby3(String standby3) { |
| | | this.standby3 = standby3; |
| | | } |
| | | |
| | | |
| | | public boolean beSimilar(LocDetl locDetl){ |
| | | return (this.matnr.equals(locDetl.getMatnr()) |
| | | && this.batch.equals(locDetl.getBatch()) |
| | | && this.brand.equals(locDetl.getBrand()) |
| | | && this.standby1.equals(locDetl.getStandby1()) |
| | | && this.standby2.equals(locDetl.getStandby2()) |
| | | && this.standby3.equals(locDetl.getStandby3()) |
| | | && this.boxType1.equals(locDetl.getBoxType1()) |
| | | && this.boxType2.equals(locDetl.getBoxType2()) |
| | | && this.boxType3.equals(locDetl.getBoxType3()) |
| | | ); |
| | | } |
| | | |
| | | public boolean beSimilar(WrkDetl wrkDetl){ |
| | | return (this.matnr.equals(wrkDetl.getMatnr()) |
| | | && this.batch.equals(wrkDetl.getBatch()) |
| | | && this.brand.equals(wrkDetl.getBrand()) |
| | | && this.standby1.equals(wrkDetl.getStandby1()) |
| | | && this.standby2.equals(wrkDetl.getStandby2()) |
| | | && this.standby3.equals(wrkDetl.getStandby3()) |
| | | && this.boxType1.equals(wrkDetl.getBoxType1()) |
| | | && this.boxType2.equals(wrkDetl.getBoxType2()) |
| | | && this.boxType3.equals(wrkDetl.getBoxType3()) |
| | | ); |
| | | } |
| | | } |
| | |
| | | @Repository |
| | | public interface OrderDetlMapper extends BaseMapper<OrderDetl> { |
| | | |
| | | OrderDetl selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetl selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, |
| | | @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3 |
| | | , @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3); |
| | | |
| | | OrderDetl selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetl selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, |
| | | @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3 |
| | | , @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3); |
| | | |
| | | List<OrderDetl> selectWorkingDetls(Long orderId); |
| | | |
| | |
| | | |
| | | Integer getPakoutPageCount(Map<String, Object> map); |
| | | |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | int addToLogTable(OrderDetl orderDetl); |
| | | |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, |
| | | @Param("brand")String brand, @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("qty")Double qty); |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("workQty")Double workQty); |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("workQty")Double workQty); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface OrderDetlPakinMapper extends BaseMapper<OrderDetlPakin> { |
| | | |
| | | OrderDetlPakin selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetlPakin selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand |
| | | , @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3 |
| | | , @Param("boxType1")String boxType1, @Param("boxType2")String boxType2, @Param("boxType3")String boxType3); |
| | | |
| | | OrderDetlPakin selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetlPakin selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, |
| | | @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3 |
| | | , @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3); |
| | | |
| | | List<OrderDetlPakin> selectWorkingDetls(Long orderId); |
| | | |
| | |
| | | |
| | | Integer getPakoutPageCount(Map<String, Object> map); |
| | | |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | int addToLogTable(OrderDetlPakin orderDetl); |
| | | |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("workQty")Double workQty); |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("workQty")Double workQty); |
| | | } |
| | |
| | | @Repository |
| | | public interface OrderDetlPakoutMapper extends BaseMapper<OrderDetlPakout> { |
| | | |
| | | OrderDetlPakout selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetlPakout selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, |
| | | @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3); |
| | | |
| | | OrderDetlPakout selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3); |
| | | OrderDetlPakout selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, |
| | | @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3); |
| | | |
| | | List<OrderDetlPakout> selectWorkingDetls(Long orderId); |
| | | |
| | |
| | | |
| | | Integer getPakoutPageCount(Map<String, Object> map); |
| | | |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | int addToLogTable(OrderDetlPakout orderDetl); |
| | | |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("qty")Double qty); |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("qty")Double qty); |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, @Param("standby1")String standby1, @Param("standby2")String standby2, @Param("standby3")String standby3, @Param("workQty")Double workQty); |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("brand")String brand, |
| | | @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("workQty")Double workQty); |
| | | |
| | | } |
| | |
| | | @Select("select count(1) from asr_wrk_mast where 1=1 and io_type = #{ioType} and sta_no = #{staNo}") |
| | | int selectWrkMastBareBoardStaNo(Integer ioType,Integer staNo); |
| | | |
| | | List<WrkMast> selectWrkMastWrkDetlMatnrBatch(@Param("ioType") Integer ioType, @Param("matnr") String matnr , @Param("batch") String batch , @Param("grade") String grade , @Param("crnNo") Integer crnNo); |
| | | List<WrkMast> selectWrkMastWrkDetl(@Param("ioType") Integer ioType, @Param("matnr") String matnr , @Param("batch") String batch , @Param("brand") String brand |
| | | , @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); |
| | | |
| | | } |
| | |
| | | |
| | | Page<OrderDetlPakin> getPakoutPage(Page<OrderDetlPakin> page); |
| | | |
| | | OrderDetlPakin selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakin selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetlPakin selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakin selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetlPakin findByLook(List<OrderDetlPakin> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakin findByLook(List<OrderDetlPakin> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3); |
| | | |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | boolean addToLogTable(OrderDetlPakin orderDetl); |
| | | |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty); |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3, Double workQty); |
| | | } |
| | |
| | | |
| | | Page<OrderDetlPakout> getPakoutPage(Page<OrderDetlPakout> page); |
| | | |
| | | OrderDetlPakout selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakout selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetlPakout selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakout selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetlPakout findByLook(List<OrderDetlPakout> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetlPakout findByLook(List<OrderDetlPakout> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | boolean addToLogTable(OrderDetlPakout orderDetl); |
| | | |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty); |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty); |
| | | } |
| | |
| | | |
| | | Page<OrderDetl> getPakoutPage(Page<OrderDetl> page); |
| | | |
| | | OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | boolean addToLogTable(OrderDetl orderDetl); |
| | | |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty); |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.result.FindLocNoAttributeVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | int selectWrkMastBareBoardStaNo(Integer ioType,Integer staNo); |
| | | |
| | | List<WrkMast> selectWrkMastWrkDetlMatnrBatch(Integer ioType,String matnr , String batch ,String grade,Integer crnNo); |
| | | List<WrkMast> selectWrkMastWrkDetl(Integer ioType, FindLocNoAttributeVo findLocNoAttributeVo, Integer crnNo); |
| | | |
| | | } |
| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), |
| | | elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.findDto(detlDtos, detlDto); |
| | | assert one != null; |
| | |
| | | |
| | | // 订单明细数量校验 |
| | | // OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), |
| | | elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3()); |
| | | if (elem.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | |
| | | // if (!orderDetlService.increaseWorkQty(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) { |
| | | // throw new CoolException("修改单据作业数量失败"); |
| | | // } |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.TRUE,order.getId(), elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), elem.getAnfme()); |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.TRUE,order.getId(), elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), |
| | | elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), |
| | | elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.findDto(detlDtos, detlDto); |
| | | assert one != null; |
| | |
| | | } |
| | | Mat analyse = MatUtils.analyseMat(elem.getMatnr()); |
| | | // 条码、物料代码、序列号、数量 |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),analyse.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),analyse.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), |
| | | elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3(), elem.getAnfme()); |
| | | |
| | | // DetlDto detlDto = new DetlDto(elem.getMatnr(), analyse.getMatnr(), analyse.getBarcode(), elem.getAnfme()); |
| | | // DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | |
| | | // 修改作业数量 ---------------------------------------- |
| | | // 订单明细数量校验 |
| | | // OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), detlDto.getMatnr(), detlDto.getBatch()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3() |
| | | ,detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3()); |
| | | if (detlDto.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | |
| | | // if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | // throw new CoolException("修改单据作业数量失败"); |
| | | // } |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.TRUE,order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme()); |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.TRUE,order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3() |
| | | ,detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme()); |
| | | // 保存入库通知档 |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),detail.getStandby2(),detail.getStandby3(),detail.getLineNumber(), detail.getAnfme()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),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.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber()); |
| | | DetlDto detlDto = DetlDto.findLineNumber(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | |
| | | List<OpenOrderCompeteResult> results = new ArrayList<>(); |
| | | if (!Cools.isEmpty(param) && !Cools.isEmpty(param.getOrderNo())) { |
| | | // 指定订单 |
| | | // Order order = orderService.selectByNo(param.getOrderNo()); |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.TRUE,param.getOrderNo()); |
| | | // Order order = OrderInAndOutUtil.selectByNo(Boolean.TRUE,param.getOrderNo()); |
| | | |
| | | if (null != order) { |
| | | OpenOrderCompeteResult result = new OpenOrderCompeteResult(); |
| | |
| | | result.setOrderNo(order.getOrderNo()); |
| | | result.setOrderTime(order.getOrderTime()); |
| | | result.setOrderType(order.getDocType$()); |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty())); |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getLineNumber(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3(), orderDetl.getQty())); |
| | | } |
| | | if (order.getSettle() == 4L) { |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | |
| | | result.setOrderNo(order.getOrderNo()); |
| | | result.setOrderTime(order.getOrderTime()); |
| | | result.setOrderType(order.getDocType$()); |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty())); |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getLineNumber(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3(), |
| | | orderDetl.getQty())); |
| | | } |
| | | // // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | // if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),detail.getStandby2(),detail.getStandby3(),detail.getLineNumber(), detail.getAnfme()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),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.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber()); |
| | | DetlDto detlDto = DetlDto.findLineNumber(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getLineNumber(), |
| | | dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | |
| | | List<OpenOrderCompeteResult> results = new ArrayList<>(); |
| | | if (!Cools.isEmpty(param) && !Cools.isEmpty(param.getOrderNo())) { |
| | | // 指定订单 |
| | | // Order order = orderService.selectByNo(param.getOrderNo()); |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, param.getOrderNo()); |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | // Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, param.getOrderNo()); |
| | | if (null != order) { |
| | | OpenOrderCompeteResult result = new OpenOrderCompeteResult(); |
| | | results.add(result); |
| | | result.setOrderNo(order.getOrderNo()); |
| | | result.setOrderTime(order.getOrderTime()); |
| | | result.setOrderType(order.getDocType$()); |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(),order.getId()); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(),order.getId()); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty())); |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getLineNumber(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3(), orderDetl.getQty())); |
| | | } |
| | | if (order.getSettle() == 4L) { |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | |
| | | result.setOrderNo(order.getOrderNo()); |
| | | result.setOrderTime(order.getOrderTime()); |
| | | result.setOrderType(order.getDocType$()); |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty())); |
| | | result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), |
| | | orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getLineNumber(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3(), orderDetl.getQty())); |
| | | } |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | // if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakin selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetlPakin selectItem(Long orderId, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakin selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetlPakin selectItem(String orderNo, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakin findByLook(List<OrderDetlPakin> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetlPakin findByLook(List<OrderDetlPakin> orderDetls, Long orderId, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | for (OrderDetlPakin orderDetl : orderDetls) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) && orderDetl.getBrand().equals(brand) && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3)) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) && orderDetl.getBrand().equals(brand) |
| | | && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3) |
| | | && orderDetl.getBoxType1().equals(boxType1) && orderDetl.getBoxType2().equals(boxType2) && orderDetl.getBoxType3().equals(boxType3) |
| | | ) { |
| | | if (Cools.eq(batch, orderDetl.getBatch())) { |
| | | return orderDetl; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | if (decrease == 0) { |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3, qty) > 0; |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } else { |
| | | return true; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, |
| | | String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3, workQty) > 0; |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty) > 0; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakout selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetlPakout selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakout selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetlPakout selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetlPakout findByLook(List<OrderDetlPakout> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetlPakout findByLook(List<OrderDetlPakout> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | for (OrderDetlPakout orderDetl : orderDetls) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) && orderDetl.getBrand().equals(brand) && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3)) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) && orderDetl.getBrand().equals(brand) |
| | | && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3) |
| | | && orderDetl.getBoxType1().equals(boxType1) && orderDetl.getBoxType2().equals(boxType2) && orderDetl.getBoxType3().equals(boxType3) |
| | | ) { |
| | | if (Cools.eq(batch, orderDetl.getBatch())) { |
| | | return orderDetl; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | if (decrease == 0) { |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3, qty) > 0; |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } else { |
| | | return true; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3, workQty) > 0; |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty) > 0; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) && orderDetl.getBrand().equals(brand) && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3)) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr) |
| | | && orderDetl.getBrand().equals(brand) |
| | | && orderDetl.getStandby1().equals(standby1) && orderDetl.getStandby2().equals(standby2) && orderDetl.getStandby3().equals(standby3) |
| | | && orderDetl.getBoxType1().equals(boxType1) && orderDetl.getBoxType2().equals(boxType2) && orderDetl.getBoxType3().equals(boxType3) |
| | | ) { |
| | | if (Cools.eq(batch, orderDetl.getBatch())) { |
| | | return orderDetl; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | if (decrease == 0) { |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3, qty) > 0; |
| | | return this.baseMapper.decrease(orderNo, matnr, "",brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } else { |
| | | return true; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty) > 0; |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return this.baseMapper.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty) > 0; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3, workQty) > 0; |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty) > 0; |
| | | } |
| | | } |
| | |
| | | try { |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), wrkDetl.getAnfme())); |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme())); |
| | | }); |
| | | String orderNo = "HAND" + snowflakeIdWorker.nextId(); |
| | | if (pakin) { |
| | |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), |
| | | detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | // 修改订单作业数量 |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), |
| | | detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | } |
| | |
| | | try { |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), wrkDetl.getAnfme())); |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(),wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme())); |
| | | }); |
| | | String orderNo = "HAND" + snowflakeIdWorker.nextId(); |
| | | if (pakin) { |
| | |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3() |
| | | ,detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | // 修改订单作业数量 |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3() |
| | | ,detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | } |
| | |
| | | try { |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), wrkDetl.getAnfme())); |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme())); |
| | | }); |
| | | String orderNo = "HAND" + snowflakeIdWorker.nextId(); |
| | | if (pakin) { |
| | |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(),detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | // 修改订单作业数量 |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(),detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | } |
| | |
| | | // 生成工作档明细 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(),elem.getBoxType1(),elem.getBoxType2(),elem.getBoxType3(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3()); |
| | | DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(),detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3()); |
| | | assert detlDto1 != null; |
| | | detlDto1.setAnfme(detlDto1.getAnfme() + detlDto.getAnfme()); |
| | | } else { |
| | |
| | | if (Cools.isEmpty(owner)) { |
| | | owner = manLocDetl.getOwner$(); |
| | | } |
| | | detlDtos.add(new DetlDto(manLocDetl.getMatnr(), manLocDetl.getBatch(), manLocDetl.getAnfme())); |
| | | // detlDtos.add(new DetlDto(manLocDetl.getMatnr(), manLocDetl.getBatch(),manLocDetl.getBrand(), |
| | | // manLocDetl.getStandby1(),manLocDetl.getStandby2(),manLocDetl.getStandby3(), |
| | | // manLocDetl.getBoxType1(),manLocDetl.getBoxType2(),manLocDetl.getBoxType3(), manLocDetl.getAnfme())); |
| | | manLocDetl.setOwner(param.getOwnerId()); |
| | | try{ |
| | | manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>().eq("loc_no", locNo).eq("matnr",manLocDetl.getMatnr())); |
| | |
| | | if (Cools.isEmpty(owner)) { |
| | | owner = locDetl.getOwner$(); |
| | | } |
| | | detlDtos.add(new DetlDto(locDetl.getMatnr(), locDetl.getBatch(), locDetl.getAnfme())); |
| | | detlDtos.add(new DetlDto(locDetl.getMatnr(), locDetl.getBatch(),locDetl.getBrand(), |
| | | locDetl.getStandby1(),locDetl.getStandby2(),locDetl.getStandby3(), |
| | | locDetl.getBoxType1(),locDetl.getBoxType2(),locDetl.getBoxType3(), locDetl.getAnfme())); |
| | | locDetl.setOwner(param.getOwnerId()); |
| | | try{ |
| | | locDetlService.update(locDetl,new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr",locDetl.getMatnr())); |
| | |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (locDto.getAnfme()==null || locDto.getAnfme() <= 0.0D) { continue; } |
| | | // OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.FALSE, locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getBrand(),locDto.getStandby1(),locDto.getStandby2(),locDto.getStandby3()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.FALSE, locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getBrand() |
| | | ,locDto.getStandby1(),locDto.getStandby2(),locDto.getStandby3(),locDto.getBoxType1(),locDto.getBoxType2(),locDto.getBoxType3()); |
| | | // if (orderDetl == null) { |
| | | //// orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | // orderDetl = OrderInAndOutUtil.selectItem(Boolean.FALSE, locDto.getOrderNo(), locDto.getMatnr(), null); |
| | |
| | | // throw new CoolException("修改订单明细数量失败"); |
| | | // } |
| | | // orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.FALSE,orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), locDto.getAnfme()); |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.FALSE,orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), |
| | | orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3() |
| | | , locDto.getAnfme()); |
| | | OrderInAndOutUtil.updateOrder(Boolean.FALSE,orderDetl.getOrderId(), 2L, userId); |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | |
| | | // if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // throw new CoolException("订单数据回滚失败"); |
| | | // } |
| | | OrderInAndOutUtil.decrease(Boolean.FALSE,wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), wrkDetl.getAnfme()); |
| | | OrderInAndOutUtil.decrease(Boolean.FALSE,wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme()); |
| | | |
| | | //修改订单主表状态,没有作业数量时才可以修改 |
| | | boolean flag = true; |
| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.result.FindLocNoAttributeVo; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<WrkMast> selectWrkMastWrkDetlMatnrBatch(Integer ioType,String matnr , String batch ,String grade ,Integer crnNo) { |
| | | return this.baseMapper.selectWrkMastWrkDetlMatnrBatch(ioType,matnr,batch,grade,crnNo); |
| | | public List<WrkMast> selectWrkMastWrkDetl(Integer ioType, FindLocNoAttributeVo findLocNoAttributeVo, Integer crnNo) { |
| | | return this.baseMapper.selectWrkMastWrkDetl(ioType,findLocNoAttributeVo.getMatnr(),findLocNoAttributeVo.getBatch(),findLocNoAttributeVo.getBrand() |
| | | ,findLocNoAttributeVo.getStandby1(),findLocNoAttributeVo.getStandby2(),findLocNoAttributeVo.getStandby3() |
| | | ,findLocNoAttributeVo.getBoxType1(),findLocNoAttributeVo.getBoxType2(),findLocNoAttributeVo.getBoxType3() |
| | | ,crnNo); |
| | | } |
| | | } |
| | |
| | | List<OrderDetl> orderDetlList = new ArrayList<>(); |
| | | |
| | | for (OrderDetl detail : orderDetls) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),detail.getStandby2(),detail.getStandby3(), detail.getAnfme()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(),detail.getBrand(),detail.getStandby1(),detail.getStandby2(),detail.getStandby3(), |
| | | detail.getBoxType1(),detail.getBoxType2(),detail.getBoxType3(), detail.getAnfme()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3()); |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | |
| | | OrderDetl orderDetl = OrderDetl.find(orderDetlList, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3()); |
| | | OrderDetl orderDetl = OrderDetl.find(orderDetlList, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert orderDetl != null; |
| | | orderDetl.setAnfme(orderDetl.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin==null){ |
| | | orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), |
| | | wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetlPakin)){ |
| | | if(!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(),wrkDetl.getAnfme())){ |
| | | orderDetlPakin.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(),wrkDetl.getAnfme())){ |
| | | // exceptionHandle("全板入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin==null){ |
| | | orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetlPakin)){ |
| | | if(!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(),wrkDetl.getAnfme())){ |
| | | orderDetlPakin.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(),wrkDetl.getAnfme())){ |
| | | // exceptionHandle("拣料入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls101) { |
| | | // 更新订单完成数量 |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | if (orderDetlPakout==null){ |
| | | orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3()); |
| | | orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetlPakout)){ |
| | | if(!orderDetlPakoutService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakout.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(),wrkDetl.getAnfme())){ |
| | | orderDetlPakout.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(),wrkDetl.getAnfme())){ |
| | | // exceptionHandle("全板出库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | |
| | | case SELECT_ORDER_MOVE_STATUS_INITIAL: |
| | | return casual.getDeclaredMethod(OrderMethodVo.SELECT_ORDER_MOVE_STATUS_INITIAL.getCode()); |
| | | case SELECT_ITEM1: |
| | | return casual.getDeclaredMethod(OrderMethodVo.SELECT_ITEM1.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.SELECT_ITEM1.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | case SELECT_ITEM2: |
| | | return casual.getDeclaredMethod(OrderMethodVo.SELECT_ITEM2.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.SELECT_ITEM2.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | case FIND_BY_LOOK: |
| | | return casual.getDeclaredMethod(OrderMethodVo.FIND_BY_LOOK.getCode(), List.class, Long.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.FIND_BY_LOOK.getCode(), List.class, Long.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class); |
| | | case INCREASE: |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | case DECREASE: |
| | | return casual.getDeclaredMethod(OrderMethodVo.DECREASE.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.DECREASE.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | case MODIFY_STATUS: |
| | | return casual.getDeclaredMethod(OrderMethodVo.MODIFY_STATUS.getCode(), Long.class,Integer.class); |
| | | case ADD_TO_LOG_TABLE_ORDERDETL: |
| | | return casual.getDeclaredMethod(OrderMethodVo.ADD_TO_LOG_TABLE_ORDERDETL.getCode(), OrderDetl.class); |
| | | case INCREASE_QTY_BY_ORDER_NO: |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO.getCode(), String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | case INCREASE_WORKING_QTY: |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE_WORKING_QTY.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | return casual.getDeclaredMethod(OrderMethodVo.INCREASE_WORKING_QTY.getCode(), Long.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,String.class,Double.class); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl selectItem(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl selectItem(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM1).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM1).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl selectItem(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl selectItem(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM1).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM1).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl selectItem(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl selectItem(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM2).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM2).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl selectItem(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl selectItem(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM2).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.SELECT_ITEM2).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl findByLook(boolean sign,List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl findByLook(boolean sign,List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.FIND_BY_LOOK).invoke(getOrderInAndOutType(sign), orderDetls, orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.FIND_BY_LOOK).invoke(getOrderInAndOutType(sign), orderDetls, orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static OrderDetl findByLook(String sign,List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3){ |
| | | public static OrderDetl findByLook(String sign,List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.FIND_BY_LOOK).invoke(getOrderInAndOutType(sign), orderDetls, orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | Object invoke = implement(OrderMethodVo.FIND_BY_LOOK).invoke(getOrderInAndOutType(sign), orderDetls, orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return aOrderDetl(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean increase(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean increase(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean increase(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean increase(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean decrease(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean decrease(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.DECREASE).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.DECREASE).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean decrease(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean decrease(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.DECREASE).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.DECREASE).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | |
| | | } |
| | | } |
| | | |
| | | public static boolean increaseQtyByOrderNo(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean increaseQtyByOrderNo(boolean sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean increaseQtyByOrderNo(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty){ |
| | | public static boolean increaseQtyByOrderNo(String sign,String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE_QTY_BY_ORDER_NO).invoke(getOrderInAndOutType(sign), orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean increaseWorkQty(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty){ |
| | | public static boolean increaseWorkQty(boolean sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE_WORKING_QTY).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3, workQty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE_WORKING_QTY).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static boolean increaseWorkQty(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty){ |
| | | public static boolean increaseWorkQty(String sign,Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty){ |
| | | try{ |
| | | Object invoke = implement(OrderMethodVo.INCREASE_WORKING_QTY).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3, workQty); |
| | | Object invoke = implement(OrderMethodVo.INCREASE_WORKING_QTY).invoke(getOrderInAndOutType(sign), orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty); |
| | | return aBoolean(invoke); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getCause().getMessage()); |
| | |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | |
| | | private Long lineNumber = 1L; |
| | | |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | private Double anfme; |
| | | |
| | | public DetlDto() { |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber, Double anfme) { |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber, String boxType1, String boxType2, String boxType3) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.lineNumber = lineNumber; |
| | | this.anfme = anfme; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double anfme) { |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber) { |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber, String boxType1, String boxType2, String boxType3, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.lineNumber = lineNumber; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | } |
| | | |
| | | public DetlDto(String matnr, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | } |
| | | // public DetlDto(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double anfme) { |
| | | // this.orderNo = orderNo; |
| | | // this.matnr = matnr; |
| | | // this.batch = batch; |
| | | // this.brand = brand; |
| | | // this.standby1 = standby1; |
| | | // this.standby2 = standby2; |
| | | // this.standby3 = standby3; |
| | | // this.boxType1 = boxType1; |
| | | // this.boxType2 = boxType2; |
| | | // this.boxType3 = boxType3; |
| | | // this.anfme = anfme; |
| | | // } |
| | | |
| | | public DetlDto(String matnr, String batch, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String orderNo, String matnr, String batch, Double anfme) { |
| | | public DetlDto(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber, String boxType1, String boxType2, String boxType3, Double anfme) { |
| | | this.orderNo = orderNo; |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.lineNumber = lineNumber; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | |
| | | // } |
| | | if (dto.getMatnr().equals(orderDetl.getMatnr()) && Cools.eq(dto.getBatch(), orderDetl.getBatch()) |
| | | && Cools.eq(dto.getBrand(), orderDetl.getBrand()) && Cools.eq(dto.getStandby1(), orderDetl.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3())) { |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3()) |
| | | && Cools.eq(dto.getBoxType1(), orderDetl.getBoxType1()) && Cools.eq(dto.getBoxType2(), orderDetl.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), orderDetl.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | // } |
| | |
| | | if (dto.getMatnr().equals(orderDetl.getMatnr()) && Cools.eq(dto.getBatch(), orderDetl.getBatch()) |
| | | && Cools.eq(dto.getBrand(), orderDetl.getBrand()) && Cools.eq(dto.getStandby1(), orderDetl.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3()) |
| | | && dto.getLineNumber().equals(orderDetl.getLineNumber())) { |
| | | && dto.getLineNumber().equals(orderDetl.getLineNumber()) |
| | | && Cools.eq(dto.getBoxType1(), orderDetl.getBoxType1()) && Cools.eq(dto.getBoxType2(), orderDetl.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), orderDetl.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | // } |
| | |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(orderDetl.getMatnr()) && Cools.eq(dto.getBatch(), orderDetl.getBatch()) |
| | | && Cools.eq(dto.getBrand(), orderDetl.getBrand()) && Cools.eq(dto.getStandby1(), orderDetl.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3())) { |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3()) |
| | | && Cools.eq(dto.getBoxType1(), orderDetl.getBoxType1()) && Cools.eq(dto.getBoxType2(), orderDetl.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), orderDetl.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(orderDetl.getMatnr()) && Cools.eq(dto.getBatch(), orderDetl.getBatch()) |
| | | && Cools.eq(dto.getBrand(), orderDetl.getBrand()) && Cools.eq(dto.getStandby1(), orderDetl.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3())) { |
| | | && Cools.eq(dto.getStandby2(), orderDetl.getStandby2()) && Cools.eq(dto.getStandby3(), orderDetl.getStandby3()) |
| | | && Cools.eq(dto.getBoxType1(), orderDetl.getBoxType1()) && Cools.eq(dto.getBoxType2(), orderDetl.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), orderDetl.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) |
| | | && Cools.eq(dto.getBrand(), detlDto.getBrand()) && Cools.eq(dto.getStandby1(), detlDto.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), detlDto.getStandby2()) && Cools.eq(dto.getStandby3(), detlDto.getStandby3())) { |
| | | && Cools.eq(dto.getStandby2(), detlDto.getStandby2()) && Cools.eq(dto.getStandby3(), detlDto.getStandby3()) |
| | | && Cools.eq(dto.getBoxType1(), detlDto.getBoxType1()) && Cools.eq(dto.getBoxType2(), detlDto.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), detlDto.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) |
| | | && Cools.eq(dto.getBrand(), detlDto.getBrand()) && Cools.eq(dto.getStandby1(), detlDto.getStandby1()) |
| | | && Cools.eq(dto.getStandby2(), detlDto.getStandby2()) && Cools.eq(dto.getStandby3(), detlDto.getStandby3()) |
| | | && dto.getLineNumber().equals(detlDto.getLineNumber())) { |
| | | && dto.getLineNumber().equals(detlDto.getLineNumber()) |
| | | && Cools.eq(dto.getBoxType1(), detlDto.getBoxType1()) && Cools.eq(dto.getBoxType2(), detlDto.getBoxType2()) |
| | | && Cools.eq(dto.getBoxType3(), detlDto.getBoxType3()) ) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1()) |
| | | && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DetlDto findLineNumber(List<DetlDto> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3,Long lineNumber) { |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1()) |
| | | && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3()) |
| | | && lineNumber.equals(detlDto.getLineNumber())) { |
| | | && boxType1.equals(detlDto.getBoxType1()) && boxType2.equals(detlDto.getBoxType2()) |
| | | && boxType3.equals(detlDto.getBoxType3())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DetlDto findLineNumber(List<DetlDto> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3,Long lineNumber, String boxType1, String boxType2, String boxType3) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1()) |
| | | && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3()) |
| | | && lineNumber.equals(detlDto.getLineNumber()) |
| | | && boxType1.equals(detlDto.getBoxType1()) && boxType2.equals(detlDto.getBoxType2()) |
| | | && boxType3.equals(detlDto.getBoxType3())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (detlDtoB.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(detlDtoB.getBatch(), detlDto.getBatch()) |
| | | && detlDtoB.getBrand().equals(detlDto.getBrand()) && detlDtoB.getStandby1().equals(detlDto.getStandby1()) |
| | | && detlDtoB.getStandby2().equals(detlDto.getStandby2()) && detlDtoB.getStandby3().equals(detlDto.getStandby3())) { |
| | | && detlDtoB.getStandby2().equals(detlDto.getStandby2()) && detlDtoB.getStandby3().equals(detlDto.getStandby3()) |
| | | && detlDtoB.getBoxType1().equals(detlDto.getBoxType1()) && detlDtoB.getBoxType2().equals(detlDto.getBoxType2()) |
| | | && detlDtoB.getBoxType3().equals(detlDto.getBoxType3())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | private String orderNo; |
| | | |
| | | private Double anfme; |
| | |
| | | // 汇总不考虑序列码 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | for (LocDto locDto : this.getLocDtos()) { |
| | | DetlDto dto = new DetlDto(locDto.getMatnr(), locDto.getBatch(),locDto.getBrand(),locDto.getStandby1(),locDto.getStandby2(),locDto.getStandby3(), locDto.getAnfme()); |
| | | DetlDto dto = new DetlDto(locDto.getMatnr(), locDto.getBatch(),locDto.getBrand(),locDto.getStandby1(),locDto.getStandby2(),locDto.getStandby3(),locDto.getBoxType1(),locDto.getBoxType2(),locDto.getBoxType3(), locDto.getAnfme()); |
| | | if (DetlDto.has(detlDtos, dto)) { |
| | | DetlDto detlDto = DetlDto.find(detlDtos, locDto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3()); |
| | | DetlDto detlDto = DetlDto.find(detlDtos, locDto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + locDto.getAnfme()); |
| | | } else { |
| | | detlDtos.add(new DetlDto(locDto.getMatnr(), locDto.getBatch(), locDto.getAnfme())); |
| | | detlDtos.add(new DetlDto(locDto.getMatnr(), locDto.getBatch() |
| | | ,locDto.getBrand(),locDto.getStandby1(),locDto.getStandby2(),locDto.getStandby3(),locDto.getBoxType1(),locDto.getBoxType2(),locDto.getBoxType3() |
| | | , locDto.getAnfme())); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakin(orderDetlPakin); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakin(orderDetlPakin); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | List<OrderDetlPakin> orderDetlPakins = OrderTransFormationUtil.transformationDetlListPakin(orderDetls); |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.findByLook(orderDetlPakins, orderId, matnr,batch,brand,standby1,standby2,standby3); |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.findByLook(orderDetlPakins, orderId, matnr,batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakin(orderDetlPakin); |
| | | } |
| | | @Transactional |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakinService.increase(orderId, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakinService.increase(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakinService.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakinService.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean modifyStatus(Long orderId, Integer status) { |
| | |
| | | return orderDetlPakinService.addToLogTable(orderDetlPakin); |
| | | } |
| | | @Transactional |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakinService.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakinService.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | return orderDetlPakinService.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3, workQty); |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return orderDetlPakinService.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty); |
| | | } |
| | | }, |
| | | PAKOUT{ |
| | |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakout(orderDetlPakout); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakout(orderDetlPakout); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | List<OrderDetlPakout> orderDetlPakouts = OrderTransFormationUtil.transformationDetlListPakout(orderDetls); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.findByLook(orderDetlPakouts, orderId, matnr,batch,brand,standby1,standby2,standby3); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.findByLook(orderDetlPakouts, orderId, matnr,batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetlPakout(orderDetlPakout); |
| | | } |
| | | @Transactional |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakoutService.increase(orderId, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakoutService.increase(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakoutService.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakoutService.decrease(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean modifyStatus(Long orderId, Integer status) { |
| | |
| | | return orderDetlPakoutService.addToLogTable(orderDetlPakout); |
| | | } |
| | | @Transactional |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | return orderDetlPakoutService.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3, qty); |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | return orderDetlPakoutService.increaseQtyByOrderNo(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, qty); |
| | | } |
| | | @Transactional |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | return orderDetlPakoutService.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3, workQty); |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return orderDetlPakoutService.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetl(orderDetlPakin,orderDetlPakout); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(orderNo, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3); |
| | | return OrderTransFormationUtil.transformationOrderDetl(orderDetlPakin,orderDetlPakout); |
| | | } |
| | | |
| | | @Transactional |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3) { |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | throw new CoolException("此方法无用!请好好写程序!!!487"); |
| | | } |
| | | @Transactional |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | public boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | throw new CoolException("此方法无用!请好好写程序!!!491"); |
| | | } |
| | | @Transactional |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | public boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | throw new CoolException("此方法无用!请好好写程序!!!495"); |
| | | } |
| | | @Transactional |
| | |
| | | throw new CoolException("此方法无用!请好好写程序!!!503"); |
| | | } |
| | | @Transactional |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty) { |
| | | public boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty) { |
| | | throw new CoolException("此方法无用!请好好写程序!!!507"); |
| | | } |
| | | @Transactional |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty) { |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | throw new CoolException("此方法无用!请好好写程序!!!511"); |
| | | } |
| | | }, |
| | |
| | | |
| | | public abstract Order selectOrderMoveStatusInitial(); |
| | | |
| | | public abstract OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | public abstract OrderDetl selectItem(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | public abstract OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | public abstract OrderDetl selectItem(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | public abstract OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3); |
| | | public abstract OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3); |
| | | |
| | | public abstract boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | public abstract boolean increase(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | public abstract boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | public abstract boolean decrease(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | public abstract boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | public abstract boolean addToLogTableOrderDetl(OrderDetl orderDetl); |
| | | |
| | | public abstract boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double qty); |
| | | public abstract boolean increaseQtyByOrderNo(String orderNo, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double qty); |
| | | |
| | | public abstract boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, Double workQty); |
| | | public abstract boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty); |
| | | |
| | | @Setter |
| | | OrderPakinService orderPakinService; |
| | |
| | | |
| | | /** |
| | | * 生成工作号 |
| | | * |
| | | * @param wrkMk |
| | | * @return workNo(工作号) |
| | | */ |
| | |
| | | int workNo = wrkLastno.getWrkNo(); |
| | | int sNo = wrkLastno.getSNo(); |
| | | int eNo = wrkLastno.getENo(); |
| | | workNo = workNo>=eNo ? sNo : workNo+1; |
| | | workNo = workNo >= eNo ? sNo : workNo + 1; |
| | | while (true) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (null != wrkMast) { |
| | | workNo = workNo>=eNo ? sNo : workNo+1; |
| | | workNo = workNo >= eNo ? sNo : workNo + 1; |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | // 修改序号记录 |
| | | if (workNo > 0){ |
| | | if (workNo > 0) { |
| | | wrkLastno.setWrkNo(workNo); |
| | | wrkLastnoService.updateById(wrkLastno); |
| | | } |
| | |
| | | if (workNo == 0) { |
| | | throw new CoolException("生成工作号失败,请联系管理员"); |
| | | } else { |
| | | if (wrkMastService.selectById(workNo)!=null) { |
| | | if (wrkMastService.selectById(workNo) != null) { |
| | | throw new CoolException("生成工作号" + workNo + "在工作档中已存在"); |
| | | } |
| | | } |
| | |
| | | |
| | | //拆盘机处空板扫码,驱动托盘向码垛位,不入库 |
| | | @Transactional |
| | | public StartupDto getScanBarcodeEmptyBoard(){ |
| | | public StartupDto getScanBarcodeEmptyBoard() { |
| | | StartupDto startupDto = new StartupDto(); |
| | | Integer staNo = 0; |
| | | if (wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 201).eq("staNo", 216))<2){ |
| | | staNo=216; |
| | | if (wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 201).eq("staNo", 216)) < 2) { |
| | | staNo = 216; |
| | | } |
| | | if (wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 201).eq("staNo", 220))<2){ |
| | | staNo=220; |
| | | if (wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 201).eq("staNo", 220)) < 2) { |
| | | staNo = 220; |
| | | } |
| | | |
| | | startupDto.setStaNo(staNo); |
| | |
| | | /** |
| | | * 检索库位号 |
| | | * |
| | | * @param staDescId 路径ID |
| | | * @param sourceStaNo 源站 |
| | | * @param staDescId 路径ID |
| | | * @param sourceStaNo 源站 |
| | | * @param findLocNoAttributeVo 属性 |
| | | * @param locTypeDto 类型 |
| | | * @param locTypeDto 类型 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, FindLocNoAttributeVo findLocNoAttributeVo, LocTypeDto locTypeDto) { |
| | | try{ |
| | | try { |
| | | Integer whsType = Utils.GetWhsType(sourceStaNo); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | RowLastnoType rowLastnoType = rowLastnoTypeService.selectById(rowLastno.getTypeId()); |
| | | /** |
| | | * 库型 1: 标准堆垛机库 2: 平库 3: 穿梭板 4: 四向车 5: AGV 0: 未知 |
| | | */ |
| | | switch (rowLastnoType.getType()){ |
| | | switch (rowLastnoType.getType()) { |
| | | case 1: |
| | | return getLocNoRun(whsType,staDescId,sourceStaNo,findLocNoAttributeVo,0,locTypeDto,0); |
| | | return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 0, locTypeDto, 0); |
| | | case 2: |
| | | log.error("站点={} 未查询到对应的规则",sourceStaNo); |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | break; |
| | | case 3: |
| | | log.error("站点={} 未查询到对应的规则",sourceStaNo); |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | break; |
| | | case 4: |
| | | return getLocNoRun4(whsType,staDescId,sourceStaNo,findLocNoAttributeVo,4,locTypeDto,0); |
| | | return getLocNoRun4(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 4, locTypeDto, 0); |
| | | case 5: |
| | | return getLocNoRun5(whsType,staDescId,sourceStaNo,findLocNoAttributeVo,0,locTypeDto,0); |
| | | return getLocNoRun5(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 0, locTypeDto, 0); |
| | | default: |
| | | log.error("站点={} 未查询到对应的规则",sourceStaNo); |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | break; |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | log.error("站点={} 未查询到对应的规则",sourceStaNo); |
| | | } catch (Exception e) { |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | /** |
| | | * 检索库位号 |
| | | * |
| | | * @param whsType 类型 1:双深式货架 |
| | | * @param staDescId 路径ID |
| | | * @param sourceStaNo 源站 |
| | | * @param whsType 类型 1:双深式货架 |
| | | * @param staDescId 路径ID |
| | | * @param sourceStaNo 源站 |
| | | * @param findLocNoAttributeVo 属性 |
| | | * @param moveCrnNo 源 |
| | | * @param locTypeDto 类型 |
| | | * @param times 轮询次数 |
| | | * @param moveCrnNo 源 |
| | | * @param locTypeDto 类型 |
| | | * @param times 轮询次数 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | |
| | | // ===============>>>> 开始执行 |
| | | curRow = rowLastno.getCurrentRow(); |
| | | |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo != 0) { |
| | | crnNumber = moveCrnNo; |
| | | if (times==0){ |
| | | curRow = moveCrnNo*4-1; |
| | | }else { |
| | | curRow = moveCrnNo*4-2; |
| | | if (times == 0) { |
| | | curRow = moveCrnNo * 4 - 1; |
| | | } else { |
| | | curRow = moveCrnNo * 4 - 2; |
| | | } |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber*2; i++) { |
| | | 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]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").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){ |
| | | log.error(crnNo+"号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | .eq("row1", nearRow).eq("loc_sts", "O").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) { |
| | | log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | nearRow = 0; |
| | | times++; |
| | | continue; |
| | |
| | | boolean signRule2 = false; |
| | | |
| | | |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | // 靠近摆放规则 --- 同天同规格物料 //分离版 |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1){ |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) { |
| | | signRule1 = true; |
| | | } |
| | | // 靠近摆放规则 --- 同天同规格物料 //互通版 |
| | |
| | | signRule2 = true; |
| | | } |
| | | |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) { |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) { |
| | | signRule1 = true; |
| | | } |
| | | } |
| | | |
| | | if (signRule1){ |
| | | if (nearRow!=curRow){ |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | for (LocMast locMast1:locMasts){ |
| | | .eq("row1", nearRow).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")){ |
| | | 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.getMatnr().equals(locDetl.getMatnr()) |
| | | && findLocNoAttributeVo.getBatch().equals(locDetl.getBatch()) |
| | | && findLocNoAttributeVo.getBrand().equals(locDetl.getBrand())) { |
| | | if (!Cools.isEmpty(locDetl) && findLocNoAttributeVo.beSimilar(locDetl)) { |
| | | //获取目标库位所在巷道最深空库位 |
| | | locMast = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | locMast = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else if (signRule2){ |
| | | } else if (signRule2) { |
| | | List<String> locNos = locDetlService.getSameDetlToday(findLocNoAttributeVo.getMatnr(), sRow, eRow); |
| | | for (String locNo : locNos) { |
| | | if (Utils.isShallowLoc(slaveProperties, locNo)) { |
| | |
| | | // } |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("whs_type",rowLastnoType.getType().longValue())); |
| | | .eq("loc_sts", "D").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())) { |
| | |
| | | log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); |
| | | // throw new CoolException("入库路径不存在"); |
| | | crnNo = 0; |
| | | }else { |
| | | } else { |
| | | staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | log.error("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | log.error("目标站" + staDesc.getCrnStn() + "不可用"); |
| | | // throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | crnNo = 0; |
| | | } |
| | | startupDto.setStaNo(staNo.getDevNo()); |
| | | } |
| | | // 更新库位排号 |
| | | if (Cools.isEmpty(locMast)){ |
| | | if (Cools.isEmpty(locMast)) { |
| | | rowLastno.setCurrentRow(curRow); |
| | | rowLastnoService.updateById(rowLastno); |
| | | } |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | |
| | | } |
| | | } |
| | | |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | |
| | | // 递归查询 |
| | | if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount*2) { |
| | | if (times < rowCount * 2) { |
| | | times = times + 1; |
| | | return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo,moveCrnNo, locTypeDto, times); |
| | | return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, moveCrnNo, locTypeDto, times); |
| | | } |
| | | // // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | // if (locTypeDto.getLocType1() < 2) { |
| | |
| | | return startupDto; |
| | | } |
| | | |
| | | public StartupDto getLocNoRun4(Integer whsType, Integer staDescId, Integer sourceStaNo,FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | public StartupDto getLocNoRun4(Integer whsType, Integer staDescId, Integer sourceStaNo, FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | |
| | | // 初始化参数 |
| | | int crnNo = 0; //堆垛机号 |
| | |
| | | // ===============>>>> 开始执行 |
| | | curRow = rowLastno.getCurrentRow(); |
| | | |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo != 0) { |
| | | crnNumber = moveCrnNo; |
| | | // if (times==0){ |
| | | // curRow = moveCrnNo*4-1; |
| | |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber*2; i++) { |
| | | for (int i = times; i < crnNumber * 2; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | rowCount = locNecessaryParameters[0]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("crn_no", crnNo).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | if (locMasts.size()<=5){ |
| | | .eq("crn_no", crnNo).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (locMasts.size() <= 5) { |
| | | nearRow = 0; |
| | | times++; |
| | | continue; |
| | |
| | | |
| | | |
| | | // 相似工作档案 --- 同天同规格物料 |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 1 || staDescId == 11 || staDescId == 111) ) { |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 1 || staDescId == 11 || staDescId == 111)) { |
| | | //查询相似工作档案 |
| | | List<WrkMast> wrkMasts = wrkMastService.selectWrkMastWrkDetlMatnrBatch(staDescId, findLocNoAttributeVo.getMatnr(), findLocNoAttributeVo.getBatch(),findLocNoAttributeVo.getBrand(), crnNo); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectWrkMastWrkDetl(staDescId, findLocNoAttributeVo, crnNo); |
| | | int nearbay = 0; //相似工作档案 目标库位列 |
| | | int nearlev = 0; //相似工作档案 目标库位层 |
| | | for (WrkMast wrkMast:wrkMasts){ |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | int curRowW = curRow; //相似工作档案 最深库位排 |
| | | int nearRowW = nearRow; //相似工作档案 最浅库位排 |
| | | if (Cools.isEmpty(wrkMast.getLocNo())){ |
| | | if (Cools.isEmpty(wrkMast.getLocNo())) { |
| | | continue; |
| | | } |
| | | //目标排为最外层排 |
| | | if (Utils.getRow(wrkMast.getLocNo())==nearRow){ |
| | | if (Utils.getRow(wrkMast.getLocNo()) == nearRow) { |
| | | continue; |
| | | } |
| | | //起始站不一致 |
| | | if (!wrkMast.getSourceStaNo().equals(sourceStaNo)){ |
| | | if (!wrkMast.getSourceStaNo().equals(sourceStaNo)) { |
| | | continue; |
| | | } |
| | | //相同列、层过滤 |
| | | if (Utils.getBay(wrkMast.getLocNo())==nearbay && Utils.getLev(wrkMast.getLocNo())==nearlev){ |
| | | if (Utils.getBay(wrkMast.getLocNo()) == nearbay && Utils.getLev(wrkMast.getLocNo()) == nearlev) { |
| | | continue; |
| | | }else { |
| | | nearbay=Utils.getBay(wrkMast.getLocNo()); |
| | | nearlev=Utils.getLev(wrkMast.getLocNo()); |
| | | } else { |
| | | nearbay = Utils.getBay(wrkMast.getLocNo()); |
| | | nearlev = Utils.getLev(wrkMast.getLocNo()); |
| | | } |
| | | |
| | | //获取目标库位所在巷道并排序 |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,wrkMast.getLocNo(), curRow>nearRow); |
| | | LocMast locMastGro = locMastService.selectById(wrkMast.getLocNo()); |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | for (int i = 0; i < crnNumber * 2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo()) > nearRowW && Utils.getRow(locMastGro.getLocNo()) <= curRowW) && !(Utils.getRow(locMastGro.getLocNo()) < nearRowW && Utils.getRow(locMastGro.getLocNo()) >= curRowW)) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //获取目标库位所在巷道最浅非空库位 |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW,nearRowW,locMastGro,rowLastnoType.getType().longValue()); |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW, nearRowW, locMastGro, rowLastnoType.getType().longValue()); |
| | | |
| | | //目标库位所在巷道最浅非空库位存在&&非最外侧库位&&入库状态 |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo())!=nearRowW && (locMast2.getLocSts().equals("S") || locMast2.getLocSts().equals("Q"))){ |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo()) != nearRowW && (locMast2.getLocSts().equals("S") || locMast2.getLocSts().equals("Q"))) { |
| | | //获取库存明细 |
| | | WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | //判断同规格物料 |
| | | if (!Cools.isEmpty(wrkDetl) && findLocNoAttributeVo.getMatnr().equals(wrkDetl.getMatnr()) |
| | | && findLocNoAttributeVo.getBatch().equals(wrkDetl.getBatch()) |
| | | && findLocNoAttributeVo.getBrand().equals(wrkDetl.getBrand())){ |
| | | int row2=0; |
| | | if (Utils.getRow(locMast2.getLocNo())>nearRowW){ |
| | | row2=Utils.getRow(locMast2.getLocNo())-1; |
| | | if (!Cools.isEmpty(wrkDetl) && findLocNoAttributeVo.beSimilar(wrkDetl)) { |
| | | int row2 = 0; |
| | | if (Utils.getRow(locMast2.getLocNo()) > nearRowW) { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) - 1; |
| | | } else { |
| | | row2=Utils.getRow(locMast2.getLocNo())+1; |
| | | row2 = Utils.getRow(locMast2.getLocNo()) + 1; |
| | | } |
| | | String targetLocNo = zerofill(String.valueOf(row2), 2) + locMast2.getLocNo().substring(2); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", targetLocNo).eq("loc_sts", "O")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | break; |
| | |
| | | |
| | | // 相似工作档 --- 空托 |
| | | if (Cools.isEmpty(locMast) && staDescId == 10) { |
| | | List<WrkMast> wrkMasts =wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("io_type",10).eq("crn_no",crnNo).eq("whs_type",rowLastnoType.getType().longValue())); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("io_type", 10).eq("crn_no", crnNo).eq("whs_type", rowLastnoType.getType().longValue())); |
| | | int nearbay = 0; |
| | | int nearlev = 0; |
| | | for (WrkMast wrkMast:wrkMasts){ |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | int curRowW = curRow; //相似工作档案 最深库位排 |
| | | int nearRowW = nearRow; //相似工作档案 最浅库位排 |
| | | if (Cools.isEmpty(wrkMast.getLocNo())){ |
| | | if (Cools.isEmpty(wrkMast.getLocNo())) { |
| | | continue; |
| | | } |
| | | if (Utils.getRow(wrkMast.getLocNo())==nearRow){ |
| | | if (Utils.getRow(wrkMast.getLocNo()) == nearRow) { |
| | | continue; |
| | | } |
| | | //起始站不一致 |
| | | if (!wrkMast.getSourceStaNo().equals(sourceStaNo)){ |
| | | if (!wrkMast.getSourceStaNo().equals(sourceStaNo)) { |
| | | continue; |
| | | } |
| | | if (Utils.getBay(wrkMast.getLocNo())==nearbay && Utils.getLev(wrkMast.getLocNo())==nearlev){ |
| | | if (Utils.getBay(wrkMast.getLocNo()) == nearbay && Utils.getLev(wrkMast.getLocNo()) == nearlev) { |
| | | continue; |
| | | }else { |
| | | nearbay=Utils.getBay(wrkMast.getLocNo()); |
| | | nearlev=Utils.getLev(wrkMast.getLocNo()); |
| | | } else { |
| | | nearbay = Utils.getBay(wrkMast.getLocNo()); |
| | | nearlev = Utils.getLev(wrkMast.getLocNo()); |
| | | } |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,wrkMast.getLocNo(), curRow>nearRow); |
| | | LocMast locMastGro = locMastService.selectById(wrkMast.getLocNo()); |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | for (int i = 0; i < crnNumber * 2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo()) > nearRowW && Utils.getRow(locMastGro.getLocNo()) <= curRowW) && !(Utils.getRow(locMastGro.getLocNo()) < nearRowW && Utils.getRow(locMastGro.getLocNo()) >= curRowW)) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW,nearRowW,locMastGro,rowLastnoType.getType().longValue()); |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW, nearRowW, locMastGro, rowLastnoType.getType().longValue()); |
| | | |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo())!=nearRowW && locMast2.getLocSts().equals("S")){ |
| | | int row2=0; |
| | | if (Utils.getRow(locMast2.getLocNo())>nearRowW){ |
| | | row2=Utils.getRow(locMast2.getLocNo())-1; |
| | | }else { |
| | | row2=Utils.getRow(locMast2.getLocNo())+1; |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo()) != nearRowW && locMast2.getLocSts().equals("S")) { |
| | | int row2 = 0; |
| | | if (Utils.getRow(locMast2.getLocNo()) > nearRowW) { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) - 1; |
| | | } else { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) + 1; |
| | | } |
| | | String targetLocNo = zerofill(String.valueOf(row2), 2) + locMast2.getLocNo().substring(2); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", targetLocNo).eq("loc_sts", "O")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | break; |
| | |
| | | boolean signRule2 = false; |
| | | |
| | | |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | // 靠近摆放规则 --- 同天同规格物料 //分离版 |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1){ |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) { |
| | | // signRule1 = true; |
| | | } |
| | | // 靠近摆放规则 --- 同天同规格物料 //互通版 |
| | |
| | | signRule2 = true; |
| | | } |
| | | |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) { |
| | | if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) { |
| | | signRule1 = true; |
| | | } |
| | | } |
| | | |
| | | if (signRule1){ |
| | | if (nearRow!=curRow){ |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())); |
| | | for (LocMast locMast1:locMasts){ |
| | | .eq("row1", nearRow).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 locMastF = locMastService.selectLocByLocStsPakInF(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMastF) && locMastF.getLocSts().equals("F")){ |
| | | 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.getMatnr().equals(locDetl.getMatnr()) |
| | | && findLocNoAttributeVo.getBatch().equals(locDetl.getBatch()) |
| | | && findLocNoAttributeVo.getBrand().equals(locDetl.getBrand())) { |
| | | if (!Cools.isEmpty(locDetl) && findLocNoAttributeVo.beSimilar(locDetl)) { |
| | | //获取目标库位所在巷道最深空库位 |
| | | locMast = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | locMast = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else if (signRule2){ |
| | | } else if (signRule2) { |
| | | List<String> locNos = locDetlService.getSameDetlToday(findLocNoAttributeVo.getMatnr(), sRow, eRow); |
| | | int nearbay = 0; |
| | | int nearlev = 0; |
| | | for (String locNo : locNos) { |
| | | int curRowW = curRow; //相似工作档案 最深库位排 |
| | | int nearRowW = nearRow; //相似工作档案 最浅库位排 |
| | | if (Cools.isEmpty(locNo)){ |
| | | if (Cools.isEmpty(locNo)) { |
| | | continue; |
| | | } |
| | | if (Utils.getRow(locNo)==nearRow){ |
| | | if (Utils.getRow(locNo) == nearRow) { |
| | | continue; |
| | | } |
| | | if (Utils.getBay(locNo)==nearbay && Utils.getLev(locNo)==nearlev){ |
| | | if (Utils.getBay(locNo) == nearbay && Utils.getLev(locNo) == nearlev) { |
| | | continue; |
| | | }else { |
| | | nearbay=Utils.getBay(locNo); |
| | | nearlev=Utils.getLev(locNo); |
| | | } else { |
| | | nearbay = Utils.getBay(locNo); |
| | | nearlev = Utils.getLev(locNo); |
| | | } |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,wrkMast.getLocNo(), curRow>nearRow); |
| | | LocMast locMastGro = locMastService.selectById(locNo); |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | for (int i = 0; i < crnNumber * 2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo()) > nearRowW && Utils.getRow(locMastGro.getLocNo()) <= curRowW) && !(Utils.getRow(locMastGro.getLocNo()) < nearRowW && Utils.getRow(locMastGro.getLocNo()) >= curRowW)) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW,nearRowW,locMastGro,rowLastnoType.getType().longValue()); |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW, nearRowW, locMastGro, rowLastnoType.getType().longValue()); |
| | | |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo())!=nearRowW && locMast2.getLocSts().equals("S")){ |
| | | int row2=0; |
| | | if (Utils.getRow(locMast2.getLocNo())>nearRowW){ |
| | | row2=Utils.getRow(locMast2.getLocNo())-1; |
| | | }else { |
| | | row2=Utils.getRow(locMast2.getLocNo())+1; |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo()) != nearRowW && locMast2.getLocSts().equals("S")) { |
| | | int row2 = 0; |
| | | if (Utils.getRow(locMast2.getLocNo()) > nearRowW) { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) - 1; |
| | | } else { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) + 1; |
| | | } |
| | | String targetLocNo = zerofill(String.valueOf(row2), 2) + locMast2.getLocNo().substring(2); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", targetLocNo).eq("loc_sts", "O")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | break; |
| | |
| | | // } |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | int nearbay = 0; |
| | | int nearlev = 0; |
| | | for (LocMast locMastSign:locMasts){ |
| | | for (LocMast locMastSign : locMasts) { |
| | | int curRowW = curRow; //相似工作档案 最深库位排 |
| | | int nearRowW = nearRow; //相似工作档案 最浅库位排 |
| | | if (Cools.isEmpty(locMastSign.getLocNo())){ |
| | | if (Cools.isEmpty(locMastSign.getLocNo())) { |
| | | continue; |
| | | } |
| | | if (Utils.getRow(locMastSign.getLocNo())==nearRow){ |
| | | if (Utils.getRow(locMastSign.getLocNo()) == nearRow) { |
| | | continue; |
| | | } |
| | | if (Utils.getBay(locMastSign.getLocNo())==nearbay && Utils.getLev(locMastSign.getLocNo())==nearlev){ |
| | | if (Utils.getBay(locMastSign.getLocNo()) == nearbay && Utils.getLev(locMastSign.getLocNo()) == nearlev) { |
| | | continue; |
| | | }else { |
| | | nearbay=Utils.getBay(locMastSign.getLocNo()); |
| | | nearlev=Utils.getLev(locMastSign.getLocNo()); |
| | | } else { |
| | | nearbay = Utils.getBay(locMastSign.getLocNo()); |
| | | nearlev = Utils.getLev(locMastSign.getLocNo()); |
| | | } |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,wrkMast.getLocNo(), curRow>nearRow); |
| | | LocMast locMastGro = locMastService.selectById(locMastSign.getLocNo()); |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | for (int i = 0; i < crnNumber * 2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo()) > nearRowW && Utils.getRow(locMastGro.getLocNo()) <= curRowW) && !(Utils.getRow(locMastGro.getLocNo()) < nearRowW && Utils.getRow(locMastGro.getLocNo()) >= curRowW)) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW,nearRowW,locMastGro,rowLastnoType.getType().longValue()); |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRowW, nearRowW, locMastGro, rowLastnoType.getType().longValue()); |
| | | |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo())!=nearRowW && locMast2.getLocSts().equals("S")){ |
| | | int row2=0; |
| | | if (Utils.getRow(locMast2.getLocNo())>nearRowW){ |
| | | row2=Utils.getRow(locMast2.getLocNo())-1; |
| | | }else { |
| | | row2=Utils.getRow(locMast2.getLocNo())+1; |
| | | if (!Cools.isEmpty(locMast2) && Utils.getRow(locMast2.getLocNo()) != nearRowW && locMast2.getLocSts().equals("S")) { |
| | | int row2 = 0; |
| | | if (Utils.getRow(locMast2.getLocNo()) > nearRowW) { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) - 1; |
| | | } else { |
| | | row2 = Utils.getRow(locMast2.getLocNo()) + 1; |
| | | } |
| | | String targetLocNo = zerofill(String.valueOf(row2), 2) + locMast2.getLocNo().substring(2); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", targetLocNo).eq("loc_sts", "O")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | continue; |
| | | } |
| | | break; |
| | |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.error("入库路径不存在:type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); |
| | | crnNo = 0; |
| | | }else { |
| | | } else { |
| | | staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | log.error("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | log.error("目标站" + staDesc.getCrnStn() + "不可用"); |
| | | crnNo = 0; |
| | | } |
| | | startupDto.setStaNo(staNo.getDevNo()); |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",true));//最浅库位 |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true));//最浅库位 |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | //获取目标库位所在巷道最深空库位 |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast2) && locMast2.getBay1()==curRow) { |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast2) && locMast2.getBay1() == curRow) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | |
| | | } |
| | | |
| | | //未找到 允许混料 |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | //获取目标库位所在巷道并排序 |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow); |
| | | |
| | | //获取目标库位所在巷道最浅非空库位 |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (Cools.isEmpty(locMast2)) { |
| | | LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast3)) { |
| | | locMast = locMast3; |
| | | break; |
| | | } |
| | | } else { |
| | | if ((locMast2.getLocSts().equals("F") && staDescId == 1) || (locMast2.getLocSts().equals("D") && staDescId == 10)){ |
| | | LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | if ((locMast2.getLocSts().equals("F") && staDescId == 1) || (locMast2.getLocSts().equals("D") && staDescId == 10)) { |
| | | LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast3)) { |
| | | locMast = locMast3; |
| | | break; |
| | |
| | | // 递归查询 |
| | | if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount*2) { |
| | | if (times < rowCount * 2) { |
| | | times = times + 1; |
| | | return getLocNoRun4(whsType, staDescId, sourceStaNo, findLocNoAttributeVo,moveCrnNo, locTypeDto, times); |
| | | return getLocNoRun4(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, moveCrnNo, locTypeDto, times); |
| | | } |
| | | log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | throw new CoolException("没有空库位"); |
| | |
| | | startupDto.setLocNo(locNo); |
| | | return startupDto; |
| | | } |
| | | public StartupDto getLocNoRun5(Integer whsType, Integer staDescId, Integer sourceStaNo,FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | |
| | | public StartupDto getLocNoRun5(Integer whsType, Integer staDescId, Integer sourceStaNo, FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | |
| | | // 初始化参数 |
| | | int crnNo = 0; //堆垛机号 |
| | |
| | | } |
| | | int sRow = rowLastno.getsRow(); |
| | | int eRow = rowLastno.geteRow(); |
| | | int crnNumber = eRow-sRow+1; |
| | | int crnNumber = eRow - sRow + 1; |
| | | |
| | | // ===============>>>> 开始执行 |
| | | curRow = rowLastno.getCurrentRow(); |
| | | |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ |
| | | if (!Cools.isEmpty(moveCrnNo) && moveCrnNo != 0) { |
| | | crnNumber = moveCrnNo; |
| | | } |
| | | |
| | |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | |
| | | Wrapper<StaDesc> wrapper = null; |
| | |
| | | log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); |
| | | // throw new CoolException("入库路径不存在"); |
| | | crnNo = 0; |
| | | }else { |
| | | } else { |
| | | staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | log.error("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | log.error("目标站" + staDesc.getCrnStn() + "不可用"); |
| | | // throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | crnNo = 0; |
| | | } |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",true));//最浅库位 |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true));//最浅库位 |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | //获取目标库位所在巷道最深空库位 |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast2) && locMast2.getBay1()==curRow) { |
| | | LocMast locMast2 = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue()); |
| | | if (!Cools.isEmpty(locMast2) && locMast2.getBay1() == curRow) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | |
| | | // 递归查询 |
| | | if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount*2) { |
| | | if (times < rowCount * 2) { |
| | | times = times + 1; |
| | | return getLocNoRun5(whsType, staDescId, sourceStaNo, findLocNoAttributeVo,moveCrnNo, locTypeDto, times); |
| | | return getLocNoRun5(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, moveCrnNo, locTypeDto, times); |
| | | } |
| | | log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | throw new CoolException("没有空库位"); |
| | |
| | | return msg.substring(0, 16); |
| | | } else { |
| | | StringBuilder msgBuilder = new StringBuilder(msg); |
| | | for(int i = 0; i < count - msg.length(); ++i) { |
| | | for (int i = 0; i < count - msg.length(); ++i) { |
| | | msgBuilder.insert(0, "0"); |
| | | } |
| | | return msgBuilder.toString(); |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | and d.batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | and (d.batch IS NULL OR d.batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="brand != null and brand != ''"> |
| | | and d.brand = #{brand} |
| | | </when> |
| | | <otherwise> |
| | | and (d.brand IS NULL OR d.brand = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby1 != null and standby1 != ''"> |
| | | and d.standby1 = #{standby1} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby1 IS NULL OR d.standby1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby2 != null and standby2 != ''"> |
| | | and d.standby2 = #{standby2} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby2 IS NULL OR d.standby2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby3 != null and standby3 != ''"> |
| | | and d.standby3 = #{standby3} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby3 IS NULL OR d.standby3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType1 != null and boxType1 != ''"> |
| | | and d.box_type1 = #{boxType1} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type1 IS NULL OR d.box_type1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType2 != null and boxType2 != ''"> |
| | | and d.box_type2 = #{boxType2} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type2 IS NULL OR d.box_type2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType3 != null and boxType3 != ''"> |
| | | and d.box_type3 = #{boxType3} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type3 IS NULL OR d.box_type3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | </sql> |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | and standby1 = #{standby1} |
| | | and standby2 = #{standby2} |
| | | and standby3 = #{standby3} |
| | | and box_type1 = #{boxType1} |
| | | and box_type2 = #{boxType2} |
| | | and box_type3 = #{boxType3} |
| | | </sql> |
| | | <sql id="standbyAllMemo"> |
| | | -- and line_number = #{lineNumber} |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | and standby1 = #{standby1} |
| | | and standby2 = #{standby2} |
| | | and standby3 = #{standby3} |
| | | and box_type1 = #{boxType1} |
| | | and box_type2 = #{boxType2} |
| | | and box_type3 = #{boxType3} |
| | | </sql> |
| | | <sql id="standbyAllMemo"> |
| | | -- and line_number = #{lineNumber} |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | <sql id="standbyAll"> |
| | |
| | | and standby1 = #{standby1} |
| | | and standby2 = #{standby2} |
| | | and standby3 = #{standby3} |
| | | and box_type1 = #{boxType1} |
| | | and box_type2 = #{boxType2} |
| | | and box_type3 = #{boxType3} |
| | | </sql> |
| | | <sql id="standbyAllMemo"> |
| | | -- and line_number = #{lineNumber} |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <select id="selectWrkMastWrkDetlMatnrBatch" resultMap="BaseResultMap"> |
| | | <select id="selectWrkMastWrkDetl" resultMap="BaseResultMap"> |
| | | select m.* from asr_wrk_mast m,asr_wrk_detl d |
| | | where 1=1 |
| | | and m.wrk_no = d.wrk_no |
| | |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="grade != null and grade != ''"> |
| | | and d.brand = #{grade} |
| | | <when test="brand != null and brand != ''"> |
| | | and d.brand = #{brand} |
| | | </when> |
| | | <otherwise> |
| | | and (d.brand IS NULL OR d.brand = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby1 != null and standby1 != ''"> |
| | | and d.standby1 = #{standby1} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby1 IS NULL OR d.standby1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby2 != null and standby2 != ''"> |
| | | and d.standby2 = #{standby2} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby2 IS NULL OR d.standby2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby3 != null and standby3 != ''"> |
| | | and d.standby3 = #{standby3} |
| | | </when> |
| | | <otherwise> |
| | | and (d.standby3 IS NULL OR d.standby3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType1 != null and boxType1 != ''"> |
| | | and d.box_type1 = #{boxType1} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type1 IS NULL OR d.box_type1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType2 != null and boxType2 != ''"> |
| | | and d.box_type2 = #{boxType2} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type2 IS NULL OR d.box_type2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType3 != null and boxType3 != ''"> |
| | | and d.box_type3 = #{boxType3} |
| | | </when> |
| | | <otherwise> |
| | | and (d.box_type3 IS NULL OR d.box_type3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | </mapper> |