| | |
| | | for (AgvLocDetl agvLocDetl : agvLocDetls) { |
| | | // 更新订单 |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("order_no", "DB" + agvLocDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode())); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | orderDetl.setQty(orderDetl.getQty() + agvLocDetl.getAnfme()); |
| | | if (!orderDetlService.update(orderDetl,new EntityWrapper<OrderDetl>().eq("order_no","DB" + agvLocDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode()))){ |
| | | throw new CoolException("修改订单明细失败,请联系管理员"+agvLocDetl.getOrderNo()+agvLocDetl.getMatnr()); |
| | |
| | | /* |
| | | 如果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); |
| | | List<OrderDetl> selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | /* |
| | | 如果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); |
| | | List<OrderDetl> selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); |
| | | |
| | | OrderDetl selectItemByOrderNo2(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("threeCode") String threeCode); |
| | | List<OrderDetl> selectItemByOrderNo2(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("threeCode") String threeCode); |
| | | |
| | | OrderDetl selectItemNoneOfBatch(@Param("orderNo")String orderNo, @Param("matnr")String matnr); |
| | | List<OrderDetl> selectItemNoneOfBatch(@Param("orderNo")String orderNo, @Param("matnr")String matnr); |
| | | |
| | | OrderDetl selectItemOfBatch(@Param("matnr")String matnr, @Param("batch")String batch); |
| | | List<OrderDetl> selectItemOfBatch(@Param("matnr")String matnr, @Param("batch")String batch); |
| | | |
| | | List<OrderDetl> selectWorkingDetls(Long orderId); |
| | | |
| | |
| | | throw new CoolException(matnr + "商品维护失败"); |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderNo, mat.getMatnr(), batch, csocode); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | AgvWrkDetl wrkDetl = new AgvWrkDetl(); |
| | | wrkDetl.sync(mat); |
| | | if (orderDetl != null) { |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItem(orderId,matnr,batch,csocode,isoCode); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItem(orderId, matnr, batch, csocode, isoCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,csocode,isoCode); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch, csocode, isoCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr,String batch, String threeCode) { |
| | | return this.baseMapper.selectItemByOrderNo2(orderNo, matnr, batch, threeCode); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String threeCode) { |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemByOrderNo2(orderNo, matnr, batch, threeCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public OrderDetl selectItemNoneOfBatch(String orderNo, String matnr) { |
| | | return this.baseMapper.selectItemNoneOfBatch(orderNo, matnr); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemNoneOfBatch(orderNo, matnr); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItemOfBatch(String matnr, String batch) { |
| | | return this.baseMapper.selectItemOfBatch(matnr, batch); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemOfBatch(matnr, batch); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @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,"three_code",csocode); |
| | | Utils.wapperSetCondition(wrapper,"dead_time",isoseq); |
| | | Utils.wapperSetCondition(wrapper, "three_code", csocode); |
| | | Utils.wapperSetCondition(wrapper, "dead_time", isoseq); |
| | | |
| | | return this.selectOne(wrapper); |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单", "银座委外材料出库单", "银座生产材料出库单")); |
| | | List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单")); |
| | | //List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单", "银座委外材料出库单", "银座生产材料出库单")); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docNames.contains(docType.getDocName())) { |
| | |
| | | password: sa@123 |
| | | mvc: |
| | | static-path-pattern: /** |
| | | # redis: |
| | | # host: 127.0.0.1 |
| | | # port: 6379 |
| | | # database: 0 |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | database: 0 |
| | | # password: xltys1995 |
| | | servlet: |
| | | multipart: |
| | |
| | | spring: |
| | | profiles: |
| | | #dev loc prod |
| | | active: dev |
| | | active: prod |