| | |
| | | import com.zy.asrs.service.AgvWorkService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.Synchronized; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | 启动入库,生成工作档 |
| | | */ |
| | | @PostMapping("/pakin/auth") |
| | | @Synchronized |
| | | public R pakin(@RequestBody Map<String,Object> map){ |
| | | List<String> devNos = (List<String>) map.get("devNo"); |
| | | |
| | |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getThreeCode(),orderDetl.getDeadTime()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getThreeCode(),orderDetl.getDeadTime()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | |
| | | Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(3))); |
| | | // 下单时间 |
| | | String timeStr = dataFormatter.formatCellValue(row.getCell(4)); |
| | | // 销售订单号 |
| | | String csocode = dataFormatter.formatCellValue(row.getCell(5)); |
| | | // 销售订单行号 |
| | | String isocode = dataFormatter.formatCellValue(row.getCell(6)); |
| | | Date time = null; |
| | | try { |
| | | time = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss_F); |
| | |
| | | } |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), matnr, null); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), matnr, null,csocode,isocode); |
| | | if (orderDetl == null) { |
| | | orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | | } else { |
| | | if(!orderDetlService.increaseAnfme(order.getId(), matnr, null, anfme)) { |
| | | if(!orderDetlService.increaseAnfme(order.getId(), matnr, null, anfme,csocode,isocode)) { |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | | } |
| | |
| | | if(!Cools.isEmpty(agvLocMast) && !agvLocMast.getLocSts().equals("F")){ |
| | | throw new CoolException("库位号非在库状态,请重新选择出库库位===>>" + locDto.getLocNo()); |
| | | } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getAgvStaNo(), locDto); |
| | | if (TaskDto.has(agvTaskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(agvTaskDtos, taskDto); |
| | | assert dto != null; |
| | | dto.getLocDtos().addAll(taskDto.getLocDtos()); |
| | | return; |
| | | } else { |
| | | agvTaskDtos.add(taskDto); |
| | | } |
| | | |
| | | //寻找空站点位置 |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectEmptyDevpByStation(locDto.getAgvStaNo()); |
| | | if(Cools.isEmpty(agvBasDevp)){ |
| | | //如果没有找到空站点,则生成准备任务 |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getAgvStaNo(), locDto); |
| | | agvTaskDtos.add(taskDto); |
| | | //TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getAgvStaNo(), locDto); |
| | | //agvTaskDtos.add(taskDto); |
| | | //如果库位存在混载 |
| | | |
| | | return; |
| | | } |
| | | // agvBasDevp.setLocSts("S"); |
| | | // agvBasDevpService.updateById(agvBasDevp); |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvBasDevp.getDevNo(),"S",null); |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), agvBasDevp.getDevNo(), locDto); |
| | | agvTaskDtos.add(taskDto); |
| | | //TaskDto taskDto = new TaskDto(locDto.getLocNo(), agvBasDevp.getDevNo(), locDto); |
| | | taskDto.setAgvStaNo(agvBasDevp.getDevNo()); |
| | | |
| | | //agvTaskDtos.add(taskDto); |
| | | |
| | | } |
| | | |
| | |
| | | * 移动类型 |
| | | */ |
| | | @ApiModelProperty(value= "移动类型") |
| | | @ExcelProperty(value = "移动类型") |
| | | //@ExcelProperty(value = "移动类型") |
| | | private String name; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ExcelProperty(value = "规格") |
| | | @ExcelProperty(value = "规格型号") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 批次 |
| | | */ |
| | | @ApiModelProperty(value= "批次") |
| | | @ExcelProperty(value = "批次") |
| | | @ExcelProperty(value = "通用型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @ApiModelProperty(value= "颜色") |
| | | @ExcelProperty(value = "颜色") |
| | | @ExcelProperty(value = "存货分类名称") |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | @ApiModelProperty(value= "品牌") |
| | | @ExcelProperty(value = "品牌") |
| | | @ExcelProperty(value = "存货分类编码") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ExcelProperty(value = "单位") |
| | | @ExcelProperty(value = "计量单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | @ExcelProperty(value = "单价") |
| | | @ExcelProperty(value = "进项税") |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | @ApiModelProperty(value= "sku") |
| | | @ExcelProperty(value = "sku") |
| | | //@ExcelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | /** |
| | | * 包数 |
| | | */ |
| | | @ApiModelProperty(value= "包数") |
| | | @ExcelProperty(value = "包数") |
| | | @ExcelProperty(value = "销项税") |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ExcelProperty(value = "条码") |
| | | //@ExcelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 物料状态 |
| | | */ |
| | | @ApiModelProperty(value= "物料状态") |
| | | @ExcelProperty(value = "物料状态") |
| | | //@ExcelProperty(value = "物料状态") |
| | | private String origin; |
| | | |
| | | /** |
| | | * 厂家 |
| | | */ |
| | | @ApiModelProperty(value= "厂家") |
| | | @ExcelProperty(value = "厂家") |
| | | //@ExcelProperty(value = "厂家") |
| | | private String manu; |
| | | |
| | | /** |
| | | * 单据时间 |
| | | */ |
| | | @ApiModelProperty(value= "单据时间") |
| | | @ExcelProperty(value = "单据时间") |
| | | //@ExcelProperty(value = "单据时间") |
| | | @TableField("manu_date") |
| | | private String manuDate; |
| | | |
| | |
| | | * 品项数 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @ExcelProperty(value = "品项数") |
| | | //@ExcelProperty(value = "品项数") |
| | | @TableField("item_num") |
| | | private String itemNum; |
| | | |
| | |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @ExcelProperty(value = "重量") |
| | | //@ExcelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @ExcelProperty(value = "长度") |
| | | //@ExcelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | @ApiModelProperty(value= "体积") |
| | | @ExcelProperty(value = "体积") |
| | | //@ExcelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 三方编码 |
| | | */ |
| | | @ApiModelProperty(value= "三方编码") |
| | | @ExcelProperty(value = "三方编码") |
| | | //@ExcelProperty(value = "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | @ExcelProperty(value = "供应商") |
| | | @ExcelProperty(value = "建档人") |
| | | private String supp; |
| | | |
| | | /** |
| | | * 供应商编码 |
| | | */ |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @ExcelProperty(value = "供应商编码") |
| | | //@ExcelProperty(value = "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | @TableField("be_batch") |
| | | @ExcelProperty(value = "物料频率") |
| | | private Integer beBatch; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "保质期") |
| | | @TableField("dead_time") |
| | | @ExcelProperty(value = "保质期") |
| | | //@ExcelProperty(value = "保质期") |
| | | private String deadTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "预警天数") |
| | | @TableField("dead_warn") |
| | | @ExcelProperty(value = "预警天数") |
| | | //@ExcelProperty(value = "预警天数") |
| | | private Integer deadWarn; |
| | | |
| | | /** |
| | |
| | | |
| | | //启动日期 |
| | | @TableField("ds_date") |
| | | @ExcelProperty(value = "启用日期") |
| | | private Date dsDate; |
| | | |
| | | //建档日期 |
| | | @TableField("d_inv_create_datetime") |
| | | @ExcelProperty(value = "建档日期") |
| | | private Date dInvCreateDatetime; |
| | | |
| | | public Mat() {} |
| | |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | | case 1: |
| | | return "是"; |
| | | return "高"; |
| | | case 0: |
| | | return "否"; |
| | | return "低"; |
| | | default: |
| | | return String.valueOf(this.beBatch); |
| | | return "低"; |
| | | } |
| | | } |
| | | |
| | |
| | | " group by a.matnr") |
| | | List<AgvLocDetl> getStockStatisExcel(); |
| | | |
| | | @Select("SELECT SUM(anfme) FROM agv_loc_detl WHERE loc_no = #{locNo}") |
| | | Double sumByLocNo(@Param("locNo")String locNo); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface OrderDetlMapper extends BaseMapper<OrderDetl> { |
| | | |
| | | OrderDetl selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch); |
| | | /* |
| | | 如果batch、csocode、isocode为空,则查询结果中batch、csocode、isocode的值为空 |
| | | */ |
| | | OrderDetl selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | OrderDetl selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch); |
| | | /* |
| | | 如果batch、csocode、isocode为空,则查询结果中不考虑batch、csocode、isocode的值 |
| | | */ |
| | | OrderDetl selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | OrderDetl selectItemNoneOfBatch(@Param("orderNo")String orderNo, @Param("matnr")String matnr); |
| | | |
| | |
| | | |
| | | Integer getPakoutPageCount(Map<String, Object> map); |
| | | |
| | | int increaseAnfme(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | int increaseAnfme(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.AgvLocDetl; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * 修改库存明细数量,如果数量为0,则删除记录 |
| | | */ |
| | | boolean updateAnfme(Double anfme, String locNo, String matnr, String batch); |
| | | boolean updateAnfme(Double anfme, String locNo, String matnr, String batch, String csocode, String isocode); |
| | | |
| | | public AgvLocDetl selectByLocNo(String locNo); |
| | | |
| | | public List<AgvLocDetl> selectByTaskDto(TaskDto taskDto); |
| | | |
| | | public AgvLocDetl selectByMatnrAndBatchAndCsocodeAndisoCode(String matnr, String batch, String csocode, String isocode); |
| | | |
| | | public Double selectSumAnfmeByLocNo(String locNo); |
| | | |
| | | } |
| | |
| | | |
| | | Page<OrderDetl> getPakoutPage(Page<OrderDetl> page); |
| | | |
| | | OrderDetl selectItem(Long orderId, String matnr, String batch); |
| | | OrderDetl selectItem(Long orderId, String matnr, String batch, String csocode, String isoCode); |
| | | |
| | | OrderDetl selectItem(String orderNo, String matnr, String batch); |
| | | OrderDetl selectItem(String orderNo, String matnr, String batch, String csocode, String isoCode); |
| | | |
| | | OrderDetl selectItemNoneOfBatch(String orderNo, String matnr); |
| | | |
| | |
| | | |
| | | OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch); |
| | | |
| | | boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty); |
| | | boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty, String csocode, String isoCode); |
| | | |
| | | boolean increase(Long orderId, String matnr, String batch, Double qty); |
| | | boolean increase(Long orderId, String matnr, String batch, Double qty, String csocode, String isoCode); |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, Double qty); |
| | | boolean decrease(String orderNo, String matnr, String batch, Double qty, String csocode, String isoCode); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | |
| | | import com.zy.asrs.service.AgvLocDetlService; |
| | | import com.zy.asrs.service.AgvLocMastService; |
| | | import com.zy.asrs.service.AgvWrkDetlService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return this.selectList(wrapper); |
| | | } |
| | | |
| | | public boolean updateAnfme(Double anfme, String locNo, String matnr, String batch) { |
| | | public boolean updateAnfme(Double anfme, String locNo, String matnr, String batch, String csocode, String isocode) { |
| | | EntityWrapper<AgvLocDetl> wrapper = new EntityWrapper<>(); |
| | | Utils.confirmOnlyMat(wrapper,matnr,batch,csocode,isocode); |
| | | wrapper.eq("loc_no", locNo); |
| | | if (anfme <= 0) { |
| | | return this.delete(new EntityWrapper<AgvLocDetl>().eq("matnr", matnr).eq("loc_no", locNo)); |
| | | return this.delete(wrapper); |
| | | } else { |
| | | AgvLocDetl agvLocDetl = this.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | AgvLocDetl agvLocDetl = this.selectOne(wrapper); |
| | | agvLocDetl.setAnfme(anfme); |
| | | return this.update(agvLocDetl,new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | return this.update(agvLocDetl,wrapper); |
| | | //return baseMapper.updateAnfme(anfme, locNo, matnr, batch) > 0; |
| | | } |
| | | } |
| | |
| | | public AgvLocDetl selectByLocNo(String locNo){ |
| | | return this.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no",locNo)); |
| | | } |
| | | |
| | | @Override |
| | | public List<AgvLocDetl> selectByTaskDto(TaskDto taskDto) { |
| | | List<AgvLocDetl> agvLocDetls = new ArrayList<>(); |
| | | |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | | AgvLocDetl agvLocDetl = this.selectByMatnrAndBatchAndCsocodeAndisoCode(locDto.getMatnr(), locDto.getBatch(), locDto.getCsocode(), locDto.getIsoseq()); |
| | | agvLocDetls.add(agvLocDetl); |
| | | }); |
| | | return agvLocDetls; |
| | | } |
| | | |
| | | @Override |
| | | public AgvLocDetl selectByMatnrAndBatchAndCsocodeAndisoCode(String matnr, String batch, String csocode, String isocode) { |
| | | EntityWrapper<AgvLocDetl> wrapper = new EntityWrapper<>(); |
| | | Utils.confirmOnlyMat(wrapper,matnr,batch,csocode,isocode); |
| | | return this.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Double selectSumAnfmeByLocNo(String locNo) { |
| | | return this.baseMapper.sumByLocNo(locNo); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | private void checkOrderQty(Order order, CombParam.CombMat combMat){ |
| | | // 订单明细数量校验,如果作业数量大于单据数量则抛出异常 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getCsocode(),combMat.getIsoseq()); |
| | | if(Cools.isEmpty(orderDetl)){ |
| | | throw new CoolException("未匹配到该单据下的物料"); |
| | | } |
| | |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(),combMat.getIsoseq())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | agvTaskDtos.forEach(taskDto -> { |
| | | |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(taskDto.getLocNo()); |
| | | AgvLocDetl agvLocDetl = agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no", taskDto.getLocNo())); |
| | | List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectByTaskDto(taskDto); |
| | | |
| | | //AgvLocDetl agvLocDetl = agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no", taskDto.getLocNo())); |
| | | |
| | | //工作档所需参数 |
| | | double anfme = taskDto.getLocDtos().get(0).getAnfme(); |
| | | |
| | | long wrkSts = 21L; |
| | | String sourceLocNo = taskDto.getLocNo(); |
| | | String targetLocNo = taskDto.getAgvStaNo(); |
| | | String barcode = agvLocDetl.getSuppCode(); |
| | | //明细档所需参数 |
| | | String mantr = taskDto.getLocDtos().get(0).getMatnr(); |
| | | String orderNo = taskDto.getLocDtos().get(0).getOrderNo(); |
| | | String batch = taskDto.getLocDtos().get(0).getBatch(); |
| | | String barcode = agvLocDetls.get(0).getSuppCode(); |
| | | |
| | | String csocode = agvLocDetl.getThreeCode(); |
| | | String isoseq = agvLocDetl.getDeadTime(); |
| | | |
| | | //判断是否全板出库 |
| | | int ioType = isPakOut(sourceLocNo,anfme) ? 101 : 103; |
| | | int ioType = isPakOut(sourceLocNo,taskDto) ? 101 : 103; |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,barcode,now,userId,false); |
| | | //生成工作档明细 |
| | | createWrkDetlReWrite(mantr,wrkMast.getWrkNo(),orderNo,batch,anfme,barcode,now,userId,csocode,isoseq); |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | | //明细档所需参数 |
| | | createWrkDetlReWrite(locDto.getMatnr(), |
| | | wrkMast.getWrkNo(), |
| | | locDto.getOrderNo(), |
| | | locDto.getBatch(), |
| | | locDto.getAnfme(), |
| | | locDto.getContainerCode(), |
| | | now, |
| | | userId, |
| | | locDto.getCsocode(), |
| | | locDto.getIsoseq()); |
| | | |
| | | //修改订单信息 |
| | | modifyOrderDetl(taskDto.getLocDtos().get(0), userId); |
| | | modifyOrderDetl(locDto, userId); |
| | | }); |
| | | // //修改订单信息 |
| | | // modifyOrderDetl(taskDto.getLocDtos().get(0), userId); |
| | | //更新源站点信息 |
| | | String locSts = ioType == 101 ? "R" : "P"; |
| | | updateAgvLocMast(agvLocMastService.selectById(sourceLocNo),locSts); |
| | |
| | | agvWrkMast.setIoTime(now); |
| | | agvWrkMastService.updateById(agvWrkMast); |
| | | |
| | | AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", agvWrkMast.getWrkNo())); |
| | | List<AgvWrkDetl> agvWrkDetlList = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", agvWrkMast.getWrkNo())); |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo()); |
| | | AgvLocDetl agvLocDetl = agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no",agvLocMast.getLocNo())); |
| | | //List<AgvLocDetl> agvLocDetlList = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no",agvLocMast.getLocNo())); |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectById(agvWrkMast.getSourceLocNo()); |
| | | |
| | | //拣料入库 |
| | |
| | | //agvWrkDetl.setAnfme(agvLocDetl.getAnfme() - agvWrkDetl.getAnfme()); |
| | | //agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>().eq("wrk_no",agvWrkDetl.getWrkNo())); |
| | | //修改库存信息 |
| | | agvLocDetl.setAnfme(agvLocDetl.getAnfme() - agvWrkDetl.getAnfme()); |
| | | agvLocDetlService.update(agvLocDetl,new EntityWrapper<AgvLocDetl>().eq("loc_no",agvLocDetl.getLocNo())); |
| | | agvWrkDetlList.forEach(agvWrkDetl -> { |
| | | AgvLocDetl agvLocDetl = agvLocDetlService.selectByMatnrAndBatchAndCsocodeAndisoCode(agvWrkDetl.getMatnr(), agvWrkDetl.getBatch(), agvWrkDetl.getThreeCode(), agvWrkDetl.getDeadTime()); |
| | | double updateAnfme = agvLocDetl.getAnfme() - agvWrkDetl.getAnfme(); |
| | | agvLocDetlService.updateAnfme(updateAnfme,agvLocDetl.getLocNo(),agvLocDetl.getMatnr(),agvLocDetl.getBatch(),agvLocDetl.getThreeCode(),agvLocDetl.getDeadTime()); |
| | | }); |
| | | } |
| | | //修改库位信息 |
| | | updateAgvLocMast(agvLocMast,"Q"); |
| | |
| | | if (!locDetl.getAnfme().equals(adjust.getCount())) { |
| | | // todo 盘点记录 |
| | | // 修改库存 |
| | | if (!agvLocDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { |
| | | if (!agvLocDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime())) { |
| | | throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码修改数量失败"); |
| | | } |
| | | // 保存调整记录 |
| | |
| | | // 删除库存 |
| | | for (AgvLocDetl locDetl : locDetls) { |
| | | // todo 盘点记录 |
| | | if (!agvLocDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { |
| | | if (!agvLocDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime())) { |
| | | throw new CoolException("删除" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败"); |
| | | } |
| | | // 保存调整记录 |
| | |
| | | //目标站点 |
| | | String devNo = wrkMast.getLocNo(); |
| | | agvLocMastService.updateLocStsByLocNo(locNo,"F"); |
| | | if(devNo.contains("@")){ |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(devNo,"O",""); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //订单回滚 |
| | | AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectByWrkNo(wrkMast.getWrkNo()).get(0); |
| | | //List<AgvWrkDetl> agvWrkDetlList = agvWrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | List<AgvWrkDetl> agvWrkDetlList1 = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | agvWrkDetlList1.forEach(agvWrkDetl -> { |
| | | |
| | | if(!Cools.isEmpty(agvWrkDetl.getOrderNo())){ |
| | | OrderDetl orderDetl = orderDetlService.selectByOrderNoAndMatnr(agvWrkDetl.getOrderNo(),agvWrkDetl.getMatnr(),agvWrkDetl.getThreeCode(),agvWrkDetl.getDeadTime()); |
| | | orderDetl.setQty(orderDetl.getQty() - agvWrkDetl.getAnfme()); |
| | | orderDetlService.updateById(orderDetl); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //保存工作档以及明细 |
| | | agvWrkMastLogService.save(wrkMast); |
| | |
| | | return wrkMast; |
| | | } |
| | | |
| | | private boolean isPakOut(String locNo, double anfme){ |
| | | AgvLocDetl agvLocDetl = agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo)); |
| | | if(agvLocDetl.getAnfme() > anfme){ |
| | | private boolean isPakOut(String locNo, TaskDto taskDto){ |
| | | Double allAnfme = agvLocDetlService.selectSumAnfmeByLocNo(locNo); |
| | | Double pakOutAnfme = 0.0; |
| | | for (LocDto locDto : taskDto.getLocDtos()){ |
| | | pakOutAnfme += locDto.getAnfme(); |
| | | } |
| | | |
| | | if(allAnfme > pakOutAnfme){ |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | |
| | | if (!BaseController.isJSON(locDto.getOrderNo())) { |
| | | //非合并出库 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getCsocode(),locDto.getIsoseq()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null,locDto.getCsocode(),locDto.getIsoseq()); |
| | | } |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme(),locDto.getCsocode(),locDto.getIsoseq())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | |
| | | Double orderAnfme; |
| | | |
| | | for (OrderDto orderDto : orderDtoList) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getCsocode(),locDto.getIsoseq()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), null); |
| | | orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), null,locDto.getCsocode(),locDto.getIsoseq()); |
| | | } |
| | | |
| | | if(locAnfme > orderDetl.getAnfme()){ |
| | |
| | | orderAnfme = locAnfme; |
| | | } |
| | | |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderAnfme)) { |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderAnfme,orderDetl.getThreeCode(),orderDetl.getDeadTime())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | |
| | | param.getCombMats().forEach(elem -> { |
| | | |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch(),elem.getCsocode(),elem.getIsoseq()); |
| | | if (elem.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getCsocode(),elem.getIsoseq())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | |
| | | |
| | | // 修改作业数量 ---------------------------------------- |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), detlDto.getMatnr(), detlDto.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq()); |
| | | if (detlDto.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme(),detlDto.getCsocode(),detlDto.getIsoseq())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch); |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItem(orderId,matnr,batch,csocode,isoCode); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,csocode,isoCode); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increaseAnfme(orderId, matnr, batch, qty) > 0; |
| | | public boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty, String csocode, String isoCode) { |
| | | return this.baseMapper.increaseAnfme(orderId, matnr, batch, qty, csocode, isoCode) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch, qty) > 0; |
| | | public boolean increase(Long orderId, String matnr, String batch, Double qty, String csocode, String isoCode) { |
| | | return this.baseMapper.increase(orderId, matnr, batch, qty, csocode, isoCode) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean decrease(String orderNo, String matnr, String batch, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch, qty); |
| | | public boolean decrease(String orderNo, String matnr, String batch, Double qty, String csocode, String isoCode) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch, qty, csocode, isoCode); |
| | | if (decrease == 0) { |
| | | return this.baseMapper.decrease(orderNo, matnr, null, qty) > 0; |
| | | return this.baseMapper.decrease(orderNo, matnr, null, qty, csocode, isoCode) > 0; |
| | | } else { |
| | | return true; |
| | | } |
| | |
| | | @Override |
| | | public OrderDetl selectByOrderNoAndMatnr(String orderNo, String matnr, String csocode, String isoseq) { |
| | | Wrapper<OrderDetl> wrapper = new EntityWrapper<OrderDetl>().eq("order_no", orderNo).eq("matnr", matnr); |
| | | Utils.wapperSetCondition(wrapper,"csocode",csocode); |
| | | Utils.wapperSetCondition(wrapper,"isoseq",isoseq); |
| | | Utils.wapperSetCondition(wrapper,"three_code",csocode); |
| | | Utils.wapperSetCondition(wrapper,"dead_time",isoseq); |
| | | |
| | | return this.selectOne(wrapper); |
| | | } |
| | |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme(),detlDto.getCsocode(),detlDto.getIsoseq())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | // 修改订单明细 |
| | | if (!BaseController.isJSON(locDto.getOrderNo())) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getCsocode(),locDto.getIsoseq()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null,locDto.getCsocode(),locDto.getIsoseq()); |
| | | } |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme(),locDto.getCsocode(),locDto.getIsoseq())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | |
| | | Double orderAnfme; |
| | | |
| | | for (OrderDto orderDto : orderDtoList) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(),locDto.getCsocode(),locDto.getIsoseq()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), null); |
| | | orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), null,locDto.getCsocode(),locDto.getIsoseq()); |
| | | } |
| | | |
| | | if(locAnfme > orderDetl.getAnfme()){ |
| | |
| | | orderAnfme = locAnfme; |
| | | } |
| | | |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderAnfme)) { |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderAnfme,orderDetl.getThreeCode(),orderDetl.getDeadTime())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | if (!BaseController.isJSON(wrkDetl.getOrderNo())) { |
| | | if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme(),wrkDetl.getThreeCode(),wrkDetl.getDeadTime())) { |
| | | throw new CoolException("订单数据回滚失败"); |
| | | } |
| | | } else { |
| | |
| | | orderAnfme = wrkDetlAnfme; |
| | | } |
| | | |
| | | if (!orderDetlService.decrease(orderDto.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), orderAnfme)) { |
| | | if (!orderDetlService.decrease(orderDto.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), orderAnfme,wrkDetl.getThreeCode(),wrkDetl.getDeadTime())) { |
| | | throw new CoolException("订单数据回滚失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | |
| | | throw new CoolException("保存商品信息失败,物料号:" + excel.getMatnr()); |
| | | } |
| | | total++; |
| | | }else { |
| | | mat = excel; |
| | | mat.setTagId(tagId); |
| | | matService.update(mat,new EntityWrapper<Mat>().eq("matnr",mat.getMatnr())); |
| | | total++; |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | for (TaskDto taskDto : list) { |
| | | if(Cools.isEmpty(taskDto.getStaNo()) && dto.getLocNo().equals(taskDto.getLocNo())){ |
| | | return true; |
| | | } |
| | | if (dto.getLocNo().equals(taskDto.getLocNo()) && taskDto.getStaNo().equals(dto.getStaNo())) { |
| | | return true; |
| | | } |
| | |
| | | return null; |
| | | } |
| | | for (TaskDto taskDto : list) { |
| | | if(Cools.isEmpty(taskDto.getStaNo()) && dto.getLocNo().equals(taskDto.getLocNo())){ |
| | | return taskDto; |
| | | } |
| | | if (dto.getLocNo().equals(taskDto.getLocNo()) && taskDto.getStaNo().equals(dto.getStaNo())) { |
| | | return taskDto; |
| | | } |
| | |
| | | public AgvLocMast getLocNo(List<AgvWaitPakin> agvWaitPakinList, int floor) { |
| | | // 目标库位 |
| | | AgvLocMast locMast = null; |
| | | if(Cools.isEmpty(agvWaitPakinList)){ |
| | | return getLocNoRule(floor); |
| | | } |
| | | |
| | | //库位规则 |
| | | if(!Cools.isEmpty(agvWaitPakinList)){ |
| | | locMast = getLocByLocRule(agvWaitPakinList.get(0),floor); |
| | | if(!Cools.isEmpty(locMast)){ |
| | | return locMast; |
| | | } |
| | | } |
| | | |
| | | |
| | | //库位编码规则 |
| | | if(!Cools.isEmpty(agvWaitPakinList)){ |
| | | locMast = getLocByLocCodeRule(agvWaitPakinList.get(0),floor); |
| | | if(!Cools.isEmpty(locMast)){ |
| | | return locMast; |
| | | } |
| | | } |
| | | |
| | | // 靠近摆放规则 --- 相同订单号, 同天同规格物料 |
| | |
| | | |
| | | //根据物料频率搜索库位,频率高则搜索离缓存货架最近库位,频率低则搜索最远库位 |
| | | Mat mat = matService.selectByMatnr(agvWaitPakinList.get(0).getMatnr()); |
| | | if(true){ |
| | | |
| | | }else { |
| | | |
| | | if(Cools.isEmpty(mat.getBeBatch())){ |
| | | mat.setBeBatch(0); |
| | | } |
| | | locMast = getLocByFre(mat.getBeBatch(), floor); |
| | | if (locMast != null) { |
| | | return locMast; |
| | | } |
| | | |
| | | // |
| | | // // 靠近摆放规则 --- 空托 |
| | | // locMast = getLocNoStep4(staDescId, locTypeDto); |
| | | // if (locMast != null) { |
| | | // //找到库位,返回dto |
| | | // return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto |
| | | // } |
| | | // |
| | | // // 如果没有相近物料,则按规则轮询货架 |
| | | |
| | | // 开始查找库位 ==============================>> |
| | | locMast = getLocNoRule(floor); |
| | | if (locMast != null) { |
| | |
| | | |
| | | agv: |
| | | # url: localhost:8080 |
| | | # taskCreatePath: /test/task/create |
| | | # containerMoveInPath: /test/container/moveIn |
| | | # taskCreatePath: /agv/task/create |
| | | # containerMoveInPath: /agv/container/moveIn |
| | | # containerMoveOutPath: /agv/container/moveOut |
| | | # containerArrivedPath: /agv/containerArrived |
| | | url: 10.10.10.182:9046 |
| | | taskCreatePath: /task/create |
| | | containerMoveInPath: /expand/api/moveIn/container |
| | |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="csocode != null and csocode != ''"> |
| | | and three_code = #{csocode} |
| | | </when> |
| | | <otherwise> |
| | | and (three_code IS NULL OR three_code = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="isocode != null and isocode != ''"> |
| | | and dead_time = #{isocode} |
| | | </when> |
| | | <otherwise> |
| | | and (dead_time IS NULL OR dead_time = '') |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="selectItemByOrderNo" resultMap="BaseResultMap"> |
| | |
| | | and matnr = #{matnr} |
| | | <if test="batch!=null and batch!='' "> |
| | | and batch = #{batch} |
| | | </if> |
| | | <if test="csocode!=null and csocode!='' "> |
| | | and three_code = #{csocode} |
| | | </if> |
| | | <if test="isocode!=null and isocode!='' "> |
| | | and dead_time = #{isocode} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="csocode != null and csocode != ''"> |
| | | and three_code = #{csocode} |
| | | </when> |
| | | <otherwise> |
| | | and (three_code IS NULL OR three_code = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="isocode != null and isocode != ''"> |
| | | and dead_time = #{isocode} |
| | | </when> |
| | | <otherwise> |
| | | and (dead_time IS NULL OR dead_time = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="increase"> |
| | |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="csocode != null and csocode != ''"> |
| | | and three_code = #{csocode} |
| | | </when> |
| | | <otherwise> |
| | | and (three_code IS NULL OR three_code = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="isocode != null and isocode != ''"> |
| | | and dead_time = #{isocode} |
| | | </when> |
| | | <otherwise> |
| | | and (dead_time IS NULL OR dead_time = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="decrease"> |
| | |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="csocode != null and csocode != ''"> |
| | | and three_code = #{csocode} |
| | | </when> |
| | | <otherwise> |
| | | and (three_code IS NULL OR three_code = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="isocode != null and isocode != ''"> |
| | | and dead_time = #{isocode} |
| | | </when> |
| | | <otherwise> |
| | | and (dead_time IS NULL OR dead_time = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="modifyStatus"> |
| | |
| | | //,{field: 'name', align: 'center',title: '移动类型', hide: true} |
| | | ,{field: 'maktx', align: 'center',title: '存货名称', width: 150} |
| | | ,{field: 'specs', align: 'center',title: '规格型号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: false} |
| | | ,{field: 'beBatch$', align: 'center',title: '物料频率', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '单据时间', hide: false} |
| | | // ,{field: 'weight', align: 'center',title: '重量', hide: false} |
| | | // ,{field: 'units', align: 'center',title: '支数', hide: false} |
| | |
| | | <input name="supp" placeholder="请输入建档人" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注</label> |
| | | <div class="layui-input-block"> |
| | | <input name="memo" placeholder="请输入备注" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">物料频率</label> |
| | | <div class="layui-input-block"> |
| | | <input name="beBatch" type="number" placeholder="1为高频,其他均为低频" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |